1

I'm using default magento Recently Viewed Products block on a CMS page

{{block type="reports/product_viewed" template="reports/product_viewed.phtml"}}

But default magento Recently Viewed Products block only support for logged in users, so it only show when i logged in

I checked the file

/public_html/app/code/core/Mage/Reports/Block/Product/Abstract.php

and It's line number 138 function set a customer id for product collection for filter the results.

But i think normal site visitors not have that kind of id.

if ($this->getCustomerId()) { 
                       $this->_collection->setCustomerId($this->getCustomerId());
 }

Anyone know how to get recently viewed products by setting an id to above or by using another way.

i also tried this answer but it didn't work at all

https://stackoverflow.com/questions/15682483/how-to-get-recently-view-product-for-guest-user-in-magento

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.