Question

In magento 2.2.5 I added a recently viewed widget block that way:

<block class="Magento\Catalog\Block\Widget\RecentlyViewed" name="category.recently_viewed" template="Magento_Catalog::product/widget/viewed/grid.phtml" after="-">
    <arguments>
        <argument name="uiComponent" xsi:type="string">widget_recently_viewed</argument>
        <argument name="page_size" xsi:type="number">4</argument>
        <argument name="show_attributes" xsi:type="string">name,image,price,learn_more</argument>
    </arguments>
</block>

It does work but noticed that products in that listing only last a few minutes before being "forgotten" is there a way to increase that cookie lifetime to few hours.

Was it helpful?

Solution

You just need to set below configuration

Stores > Configuration > Catalog > Catalog > Recently Viewed/Compared Products > Lifetime of products in Recently Viewed Widget

enter image description here

You can set any higher value depends upon your requirement, like I set 50000.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top