The “Recently Viewed Products” plugin enhances your storefront by displaying a slider with products that a customer has recently viewed. This powerful marketing tool helps remind customers of products they were interested in, increasing the likelihood of a purchase.
The plugin offers extensive configuration options, allowing you to control where and how the sliders appear. You can automatically add a slider to all product detail pages and other CMS pages, or you can manually place and customize individual sliders using the Shopping Experiences editor.
System Requirements
- Shopware Version: 6.7.0.0 or newer
- PHP Version: 8.2 or newer
Installation Process
You can install the plugin through the Shopware Plugin Store or by uploading it as a zip file. The process is standard for all Shopware 6 plugins.
- Download: Obtain the plugin from the official Shopware Store or another source.
- Upload: In the Shopware Admin, navigate to Extensions > My extensions. Click the Upload extension button and select the plugin’s zip file.
- Install & Activate: Once the upload is complete, the plugin will appear in your list of extensions.
- Click the ”…” button for the “Todpdata Recently viewed products” plugin and select Install.
- After the installation is finished, enable the plugin by toggling the switch to the active position.
- Clear Cache: For the changes to take effect, it is recommended to clear the shop’s cache.
No additional console commands or server configurations are required for the installation.
To configure the plugin, navigate to Extensions > My extensions, find the “Todpdata Recently viewed products” plugin in the list, and click on the ”…” button to select Configuration.
The settings are divided into two main sections:
1. Recently Viewed Product Configuration
This section controls the core behavior of the tracking functionality.
-
Maximum Items:
- Description: The maximum number of recently viewed products to store for each customer. If a customer views more products than this limit, the oldest entry will be removed.
- Default: 10
-
Show on product detail page:
- Description: If enabled, a recently viewed products slider will automatically be displayed at the bottom of every product detail page. The slider will not appear if the customer has no viewing history.
- Default: Enabled
-
Automatically show on every CMS Page:
- Description: If enabled, a slider will automatically be added to the bottom of all CMS pages (e.g., landing pages, category pages). This does not apply to the product detail page, which is controlled by the setting above.
- Default: Disabled
-
Show the recent products in random order:
- Description: If enabled, the products in the slider will be displayed in a random order. If disabled, they will be displayed in reverse chronological order (most recently viewed first).
- Default: Disabled
2. Default Element Configuration
This section defines the default appearance and behavior for all automatically displayed sliders (on product detail pages or other CMS pages). These settings also serve as the initial values when you add a new “Recently Viewed Product Slider” element in the Shopping Experiences.
- Slider title: The default heading displayed above the slider.
- Display Mode: The layout style for the product boxes inside the slider (
Standard,Cover, orContain). - Vertical align: The vertical alignment of the slider content (
Top,Center, orBottom). - Navigation: If enabled, shows next/previous arrows for the slider.
- Automatic sliding: If enabled, the slider will automatically scroll through the products.
- Border: If enabled, adds a border around the slider.
- Minimal width (px only): The minimum width for each product box in pixels (e.g.,
250px). This influences how many products are visible at once. - Show product price: If enabled, the product price will be displayed in the product box.
- Show box actions: If enabled, the “Add to cart” button (or similar actions) will be shown in the product box.
- Show product ratings: If enabled, the product’s average star rating will be shown.
faq
Q: The recently viewed products slider is not appearing on any page. Why?
A: There are a few possible reasons:
- The customer has not viewed any products yet. The slider only appears after at least one product has been visited.
- The product currently being viewed is excluded from the slider on the product detail page to avoid duplication.
- The feature may be disabled in the plugin configuration. Check that Show on product detail page or Automatically show on every CMS Page is enabled.
- The products that were viewed are no longer active or are not visible in the current Sales Channel. The plugin automatically filters out unavailable products.
Q: How does the plugin track products for customers who are not logged in?
A: For guest users, the recently viewed products are associated with the current session token (sw-context-token). This means the history is maintained as they browse the site.
Q: What happens to a guest’s viewing history when they log in?
A: When a guest with a viewing history logs in, their session token is updated to their customer account token. The plugin ensures that the product history is carried over seamlessly, so they do not lose their list of recently viewed items.
Q: Can I have different slider styles on different pages?
A: Yes. The settings in the plugin configuration are only defaults. When you use the Recently Viewed Product Slider block in the Shopping Experiences editor, you can override every visual setting (like title, display mode, border, etc.) for that specific slider, giving you full control over its appearance on a per-page basis.
Q: Will this plugin slow down my site?
A: The plugin is designed with performance in mind. The slider content is loaded via an asynchronous AJAX request after the main page has loaded. This ensures that it does not block the page from rendering and is compatible with Shopware’s full-page caching mechanisms.
Beyond the automatic placement configured in the settings, the plugin’s main feature is its integration with Shopware’s Shopping Experiences. This allows you to place a recently viewed products slider on any CMS layout you create.
Adding the Slider to a CMS Page
- Navigate to Content > Shopping Experiences in the Shopware Admin.
- Open an existing layout or create a new one.
- Click the
+icon to add a new block. - In the block selection menu, choose the Commerce category.
- Drag and drop the Recently viewed products slider block onto your layout.

Configuring the Slider Element
Once you have added the block, the “Recently Viewed Product Slider” element will be inside it. Click on the element to open its settings in the right-hand sidebar.
Here, you can override all the default settings that were defined in the plugin configuration. This allows you to customize each slider individually to match the design of a specific page.
The available settings include:
- Slider title
- Display Mode
- Vertical Align
- Navigation
- And all other visual options.
When you are finished, click Save to apply your changes to the layout.