I have a recently viewed block, it works fine with registered users and with guest users, but when guest users close the browser and enter the web again, the recently viewed products are empty.
I need to keep the recently viewed for guest users in a cookie to retrieve them when comes back to the page.
But I do not find where the function
getRecentlyViewedProducts() is, or any other code to store and retrieve recently viewed products.
I know that logged users save their recently viewed products in
report_viewed_product_index, but I'm not sure how are stored with guest users... maybe in session?
magento version: 18.104.22.168
I changed the configuration of the cookie in the
magento admin>system>config>web>Session Cookie Management.
I had cookie path empty, cookie domain empty, use http only set to no and a low time of cookie (3600). Now this is the new configuration, and seems to work correctly.
It's strange because the cart worked properly when close and reopen, I only lost the recently viewed items... but now everything seems ok.