How to set Magento 2 recently viewed products?
Recently viewed products widget allows you to make shopping process at your store easier for customers. To show recently viewed products on specific pages, you will need to set additional widget in the Admin Panel.
How to display recently viewed products on definite pages in Magento 2?
To show recently viewed products on your frontend, use Magento 2 Widgets settings. For this, go to:
- the Admin Panel>Content>Widgets:
- Click the Add Widget button to create a new widget instance:
- Make the next settings:
Type: Recently Viewed Products;
Design Theme: choose the theme, which is in use on your website:
- Then you’ll be switched to the Storefront Properties setting:
- Continue with the settings:
Widget Title: give a title for the widget instance;
Assign to Store Views: select All Store Views;
Configure the instances order within one container, use the Sort Order field. E.g.: 1,2,3;
In the Layout Updates section choose to Add Layout Update;
From the Display on drop-down menu select Generic Pages>Specified Page:
You can choose any option you actually need here.
- Select Page and Container from the drop-down options:
- As soon as you select one of the containers, you’ll see Template drop-down options. Select the one you need:
- Switch to Widget Options settings to add the number of products to display:
- Click Save and Flush Magento Cache.
By way of example, we applied the next settings:
Page: Catalog Product View (Any);
Container: Main Content Area;
Template: Viewed Product List Template.
Let’s see what we have:
The new ‘example’ widget appeared on the Widget Grid and on the frontend:
Use the Magento 2 Frequently Bought Together extension to help your visitors make their purchase decision faster.