The "Recently Viewed Products" widget can be added to any CMS page or Static Block by using markup tags.
Adding Recently Viewed Products to CMS pages
- In the Admin panel, navigate to Cms > Pages and open the CMS page where you want to insert the widget.
- Click the Content tab.
- Insert the following markup tag in the Content area:
{{widget type="reports/product_widget_viewed" page_size="10" template="reports/widget/viewed/content/viewed_grid.phtml"}}
- Click the Save Page button
- Flush Magento cache
Adding Recently Viewed Products to a Static Block
- In the Admin panel, navigate to Cms > Static Blocks and open the static block where you want to insert the widget.
- Insert the following markup tag in the Content field:
{{widget type="reports/product_widget_viewed" page_size="10" template="reports/widget/viewed/content/viewed_grid.phtml"}}
- Click the Save Block button
- Flush Magento cache
Adding Recently Viewed Products to a template
To add the Recently Viewed Products widget to a .phtml file, use the following code:
<?php echo $this->getLayout()->createBlock('reports/product_viewed')->setTemplate('reports/widget/viewed/content/viewed_grid.phtml')->toHtml(); ?>