:::: MENU ::::

WooCommerce remove price html

Today we talk about how WooCommerce remove product price HTML.It will remove the price from all the listing pages, product pages, and all other pages too. So let’s start with our example.

add_filter( 'woocommerce_get_price_html' ,  'remove_woocommerce_price_html' , 10, 2 );
function remove_woocommerce_price_html( $price_html ){
          $price_html = "";
          return $price_html;
}
Author: Qaisar Satti
Category: WooCommerce
Last Modified: September 29, 2020


WooCommerce remove add to cart

Today we talk about WooCommerce remove to add to cart to different places. Like listing page, product page. So let’s start with an example.

Lisitng Page

You have to remove the following action to do the trick.

remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart');

Product Page

You have to remove the following action to do the trick.

remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart');

For the simple product use the following code.

remove_action( 'woocommerce_simple_add_to_cart', 'woocommerce_simple_add_to_cart', 30 );

Remove add to cart for variable products without removing the variation selectors
Note: It will remove only the add to cart button and the Quantity box.

remove_action( 'woocommerce_single_variation', 'woocommerce_single_variation_add_to_cart_button', 20 );
Author: Qaisar Satti
Category: WooCommerce
Last Modified: September 29, 2020


Magento 2 Get Store Specific Product Name and Description

Today we’ll talk about how we can get store specific products name and descriptions. Like for example, my shop has six store views: DE, AT, IT, ES, FR, and GB. And each store view uses the same set of the product with appropriately translated but I would for example want to view a product in a specific view like DE.

We can do that just by following the instructions below:

protected $productFactory;  
public function __construct(\Magento\Catalog\Model\ProductFactory $productFactory) {      
 $this->productFactory = $productFactory;            
}

now you can use this like,

$product= $this->_productFactory->create()->setStoreId($storeId)->load($pid);

Where $storeIdis your store Id and
$pidis your product Id.

$productName=$product->getName();

Don’t forget to do

di:compile

by

php bin/magento setup:di:compile

and clearcache

php bin/magento c:f

Product Repository

protected $productRepository;
public function __construct(             \Magento\Catalog\Api\ProductRepositoryInterface $productRepository    )
{        
$this->productRepository = $productRepository;    
}

Now, you can use below

$product = $this->productRepository->getById($pid,false,$storeId);

$productName=$product->getName();

You can see It’s arguments invendor\magento\module-catalog\Api\ProductRepositoryInterface.phppublic function getById($productId, $editMode = false, $storeId = null, $forceReload =

Author: Qaisar Satti
Category: Magento 2
Last Modified: September 29, 2020


Codelobster IDE – a powerful multi-platform Magento IDE

Codelobster IDE – a powerful multi-platform Magento IDE

Magento is the World’s most flexible eCommerce platform.
It empowers thousands of retailers and brands with the framework to rapidly innovate and grow.
For each web developers is important the choice of tools to quickly and efficiently edit code on your site.

Specifically, in order to deal with Magento platform, We have choosen a very convenient development environment – Codelobster IDE .

    Let us consider some important possibilities and advantages of this program:

  • All code highlights depending on a type, the also mixed code is thus supported,
    so the area of HTML will be highlighted as HTML, PHP as PHP, and Javascript as Javascript in a the same file.
    Thre is possibility of choice from color schemes, including popular IDEs.
  • Powerful autocompletion for HTML, PHP, CSS and Javascript, including HTML5 and CSS3.
    For PHP the structure of project is fully recognized, and the complete list of methods falls out in the proper places.
  • HTML/CSS inspector on the type of Firebug, which allows easily to correlate the selected elements of
    page with a code and proper style.
  • Context help on all supported languages. By pressing F1 key the page with detailed description for current tag, attribute or function will be opened.
  • PHP debugger. PHP debugger allows to execute PHP scripts incrementally, watching the values of all
    variables in every line.
  • Support of FTP allows to work straight with a remote server and to do all necessary changes with files;
  • Support for Version Control Systems: SVN, Git etc.
  • The portable option allows to use editor without the preliminary installation.
  • Other useful utilities: collapsing, tooltips, pair highlighting, possibility of blocks selection, navigation on descriptions of functions and included files at withholding of the key of CTRL,
    viewing of structure of files and project, preview in a browser, book-marks, and all other standard possibilities for work with a code.

Codelobster IDE has the following abilities to work with Magento :

  • Ability to create projects automatically installing Magento platform
  • Autocomplete for Magento methods
  • Tooltips for Magento methods
  • Context and Dynamic help

Also Codelobster IDE supports Windows, Mac OS, Linux, Ubuntu, Mint, Fedora etc.
and has special plug-ins for working with: Drupal, Joomla, Twig, JQuery, CodeIgniter, CakePHP, Laravel, Node.js, AngularJS, BackoneJS, EmberJS, Phalcon, VueJS, Symfony, Magento, Yii and WordPress.

Developer Codelobster Software
Web Site http://www.codelobster.com/
Language English, , German, French, Italian, Spanish, Russian, Chinese,
Japanese, Portuguese, Hungarian, Czech, Slovak, Turkish,
Persian
Author: Qaisar Satti
Last Modified: September 17, 2020


Mage Psycho Magento 2 Regular, Special & Tier Price Importer

Today we write review about the Mage Psycho Magento 2 Regular, Special & Tier Price Importer extension. We will talk about what extension have. We don’t test this extension so we cannot guarantee the 100% extension working.

Overview

This Price Importer Extension for Magento 2 is the fastest import tool for bulk updating different prices like regular, cost, MSRP/MAP, special, tier & customer group price.

Magento 2 has built-in data transfer for importing products and advanced pricing. But it lacks the functionality of updating all types of prices whether it’s regular or advanced pricing in a single go.
Also, the native import has very limited options for pricing.

With this extension, store admin can achieve the simplest & the fastest way to import all types of pricing with just a single CSV file(more import sources will be added soon).
And with the export pricing option, store admin can easily prepare the import file.

Key Features

  • Provides bulk import functionality for all types of the price (regular, cost, MSRP/MAP, special, tier & customer group price) with just a single CSV file
  • Option to preview the uploaded file which gives the glance view of the file data
  • The detailed error message provided during import validation helps to fix the price data faster
  • Support for different types of price rounding (whole number to the psychological pricing)
  • Price values can be increased(+), decreased(-) by a fixed amount value or percentage
  • Price values can also be set as a certain percentage of some reference attribute value
  • Ability to import prices via different methods (admin, command-line interface (CLI) & cron jobs)
  • Ability to export the different prices makes import file preparation much easier

You can buy extension form here. Also you can use the coupon code to get discount COUPON-458

Author: Qaisar Satti
Category: Extension Review
Last Modified: March 10, 2020


magento 2 get current quote

Today we talk about how Magento 2 get current quote. You can get quote data from the checkout session. You can get data to manipulate the data in the cart. So let start with our example.

<div>::CODECOLORER_BLOCK_14::</div>

Now we call our function and get a quote data.

$allItems = $this->getQuotes()->getAllVisibleItems();
foreach ($allItems as $item) {
    echo $item->getProductId();
}
Author: Qaisar Satti
Category: Magento 2
Last Modified: September 29, 2020


magento 2 get all customers

Today we talk about how Magento 2 get all customers. Sometimes you need to list down all the customers for many reasons. For exporting the customer the data or show all customer listing. So let start with our example to list down all the customer.

namespace QaisarSatti/HelloWorld/Block;

use Magento\Backend\App\Action;


class Delete extends Action
{

    protected $customerCollection;

    public function __construct(
        \Magento\Customer\Model\ResourceModel\Customer\CollectionFactory $customerCollection
    )
    {
        $this->customerCollection = $customerCollection;
    }

    public function getAllCustomers()
    {
            return $this->customerCollection->create();

       
    }
}

Now we call the function and list down all the customer data.

$allCustomers = $this->getAllCustomers();
foreach ($allCustomers as $customer) {
    echo $customer->getEmail();
    echo $customer->getFirstname();
    echo $customer->getLastname();
}
Author: Qaisar Satti
Category: Magento 2
Last Modified: February 17, 2020


Pages:1234567...25