Welcome to our blog!

Magento 2 tutorial

Blog for Magento 2

Menu

Magento 2: Load product by peoduct id.

January 28, 2020 at 5:58 am | Magento, Magento 2 | arpit kumar | : Thumbtack

In this artical we learn how to get product data by product id. we create a block file and add below code. To acheave it we use \Magento\Catalog\Model\ProductFactory. And then we call below code to associated .phtml file

Magento 2: newsletter subscribe by ajax

January 23, 2020 at 2:09 pm | Magento, Magento 2 | arpit kumar | : Thumbtack

In this tutorial we learn how to use plugin in magento 2. In below code we create a plugin to make a ajax hit for newsletter subscription for users rest of all setting are same as default magento provides. Di.xml New Controller extended from Magento\Newsletter\Controller\Subscriber\NewAction newsletter_subscripe.phtml (Override it for core newsletter_subscripe.phtml) formsubmitnow.js file for Ajax

Continue reading…

“Magento 2: newsletter subscribe by ajax”

Magento 2: how to call .phtml file from CMS Page

January 19, 2020 at 2:04 pm | Magento, Magento 2 | arpit kumar | : Thumbtack

Hello Friends, In this atrtical we learn how to call .phtml file from cms page, layout file and another .phtml file. From CMS Page {{block class=”Magento\Bannerslider\Block\Slideshow” template=”Magento_Bannerslider::bannerslider.phtml”}} From another .xml file From another .phtml

Get Base Url in Magento 2

January 17, 2020 at 12:26 pm | Magento, Magento 2 | admin | : Thumbtack

In Magento 1, its very easy just use code: Mage::getBaseUrl(); But in Magento 2 There are 2 ways to get Base Url. Object Manages Magento Core Method Object Manages Magento Core Method