Sunday, June 12, 2022

How to Programmatically Display Recently Viewed Products in Magento 2

Showing recently viewed items on your online store makes it easier for the customers to return to their product hunt, which may boost the conversions and sales. The default Magento 2 provides a ‘Recently Viewed Products’ widget to display the recently viewed products to the customers.


If you are a developer, sometimes you may require to add such functionality to the Magento 2  without accessing the admin panel. In such cases, you may require to programmatically display recently viewed products in Magento 2.


You can easily add such functionality in Magento 2 programmatically by adding few lines of code into the catalog_product_view.xml in the layout folder.


Learn the complete solution at: https://meetanshi.com/blog/programmatically-display-recently-viewed-products-in-magento-2/


No comments:

Post a Comment