Recently Viewed¶
The recently_viewed
integration module contains a template with a product tile that includes the id of the currently viewed product. This module is required for the proper functioning of the roster-recently-viewed.
Configuration parameters¶
none
Module source code¶
{% from "@macros/product_tile.twig" import product_tile %}
{% set product = ObjectApi.getProduct(product_id) %}
{% set moduleInstanceId = 'roster-product-promotions-' ~ moduleInstance %}
{% set productTileSettings = {
"recentlyViewedOptions" : '1',
"showViewProductButton" : '1',
"shouldShortenLongProductName": "1"
}
%}
<template product-id='{{product.id}}' id="recently-viewed-template">
<li class="splide__slide">
{{ product_tile(product, productTileSettings|merge({ instanceId: moduleInstanceId, imageSize: systemConfig.lSize })) }}
</li>
</template>