banner How to add a static block in a sidebar column Magento 2

Undoubtedly, Magento provides the store customization beyond we can think and implement. And as such comparatively, if you want to add a static block in the page content section then it’s not a big deal to achieve. However, to customize the sidebar column it requires a bit of tricky work from you. Following such practice to …

How to set a custom price programmatically when adding a product to the cart in magento 2 blog banner

In this article, you will be learning how to set a custom price for product programmatically when adding a product to the cart in magento 2. Here we are using Aureatelabs as Vendor name and CustomPrice as the name of module.  You can change this according to your Vendor and Module name The first thing …

How to use a custom price template in Magento 2 blog banner

If you’re familiar with the Magento basic fundamentals then you certainly know Magento has been developed to show a variety of prices to your buyers. And below is the bunch of all prices that have their own explanation: Special Price. Tier Price. Grouped Price. The minimum price of composite products The price range of composite …

How to create a new custom tab in the product detail page in magento 2 blog banner

In this post we will guide you how to add a new custom tab in the product detail page in magento2. To start with create a file ‘catalog_product_view.xml’ in the app/code/<VendorName>/<ModuleName>/view/frontend/layout folder. Change “Aureatelabs_Training” with <VendorName>_<ModuleName> in the catalog_product_view.xml Now create the custom_tab.phtml file in app/code/<VendorName>/<ModuleName>/view/frontend/layout folder and add the below snippet in the phtml …

How to convert the price from one currency to another in the magento 2 blog banner

In this article, we will be guiding you on how to convert the price from one currency to another in the magento 2. The first thing you need to do is to create an instance of “\Magento\Directory\Model\CurrencyFactory” and “\Magento\Store\Model\StoreManagerInterface” as given below: Then you need to use the function given below to get the price …

blog banner How to create a shipping method in Magento 2

This piece of information will throw some light on how one can create a shipping method in Magento 2. For this, we need to create a custom module in order to add a new shipping method. Step 1 Create a file named config.xml at app/code/Aureatelabs/Customshipping/etc/config.xml This file is used for defining the shipping method code, …

Recurring setup script in Magento 2 blog banner

The title “setup script” itself demonstrates that script files are utilized to execute some operations on the data or the table while installing or upgrading a module. You can find all the setup scripts files in a Setup folder which is located at:  Let’s dig deep and master more about what recurring script is and …

blog banner How to create a new router in Magento 2

This article will help you to create a new custom router in Magento 2. A router is a PHP class responsible for matching and processing of the URL request. In order to add custom router in lib/internal/Magento/Framework/App/RouterList.php we need to add our configuration for the new router in di.xml module. Let’s take a real example, …