Magento 2 recently viewed products and Magento compare products are the default features of the platform. They allow you to use widgets to display products customers have recently viewed or compared.
Your customers don't have to spend time going through the catalogue looking for the products they liked on their last visit. Once they come back to your website, these products will be waiting for them.
Want to offer product recommendations based on frequently viewed products? Check out our guide on how to set up Who Viewed This Also Viewed block.
Before adding the recently viewed and compared products to any of your Magento 2 store pages you need to go through the list of general options.
Post Contents [hide]
Configure Magento 2 Recently Viewed/Compared Products
Follow these steps to configure the Magento 2 recently viewed and compared products:
- Go to Stores > Configuration > Catalog > Catalog and unfold the Recently Viewed/Compared Products section.
- Choose whether to Synchronize widget products with backend storage.
- Decide if you want to Show recently viewed /compared products for Current Website, Store or Store View.
- Define the maximum number of products to be shown in Default Recently Viewed Products Count and Default Recently Compared Products Count fields.
- Set the Lifetime of products in Recently Viewed Widget and Lifetime of products in Recently Compared Widget to define the period of time Magento 2 products will be displayed.
- Don't forget to Save Config.
Once you finish with the general configurations, you can move to the next step which is adding recently viewed and compared product to Magento 2 pages.
Display Recently Viewed and Compared Products in Magento 2
As it has already been said Magento 2 Recently Viewed and Compared Products are set with the help of widgets. Both widget options are the same, but for this example, we will use the recently viewed products widget.
Follow these steps to add recently viewed and compared products to Magento 2 pages:
1. Navigate to Content > Widgets and press the Add New Widget button.
2. Fill out widget Settings.
- Select Recently Viewed Products as a widget Type.
- Choose the Design Theme and Continue.
3. Configure widget Storefront Properties.
Once you set widget Type and Design Theme, you won't be able to change it.
- Set the Widget Title.
- Assign it to Store Views.
- Set the Sort Order that defines the place of the widget in the list of widgets.
Note: The smaller the number, the higher widget is placed.
4. Set the widget Layout Updates.
- Choose what kind of Magento 2 CMS page to Display the widget on.
- Select the page Container or the exact place you want the widget to be placed.
- Add other Layout Updates if you want the recently viewed products widget to be displayed on different pages.
5. Manage Widget Options.
- Set the Number of products to display in the recently viewed product widget.
- Choose what Product Attributes and Buttons to show in the widget. Select the features customers would find relevant to go back to that product again.
- Save widget.
When you finish setting up the Magento 2 recently viewed products widget, follow the same instructions to set the compared products widget in Magento 2. It is also recommended to flush Magento cache to be able to see the following widgets on the storefront.
Based on certain widget options, recently viewed product section can be displayed like this:
Magento Compare Products widget is usually displayed on the left sidebar under the layered navigation. Customers can only see the number and names of the products they have added to the compare list. They can also choose to Compare or Clear All products from the list.
If the customer decides to compare the products, they will be directed to the Compare Product Page. The product information they set to be displayed during widget configuration will appear there.
You need to provide a great shopping experience for your customers so they enjoy, recommend and come back to your store.
So displaying Magento 2 Recently Viewed and Compared Products is a great way to improve customer engagement. It also helps to increase the likelihood of them making a purchase.
However, that's not the only way.
You can also enable the compare products template for related products and allow customers to compare product features while shopping.