eZ Commerce adds the following blocks to the Page Builder:
- Last viewed items - list of products recently viewed by the current user
- Bestsellers - list of bestsellers for a given product category
- Product slider - slider for products grouped with tabs
|Last viewed items||
Last viewed products¶
1 2 3 4 5
After each call, the cache for the last viewed product slider is purged. By default, the view is rendered by an ESI block and cached per user. When the customer visits a new product, the list is purged and regenerated the next time it is displayed.
Products are stored in the session.
To display a list of recently viewed products, place the following code in a template:
1 2 3 4 5
The controller is able to render a different template if required (a parameter template).
SilversolutionsEshopBundle:Catalog:slider.html.twig is used by default.
The caching strategy can be defined in the config file. The strategy is dynamic, so use
1 2 3 4
You can configure the maximum number of last viewed products by selecting eCommerce -> Configuration Settings -> Catalog -> Last viewed product limit.
The default value is set in: