I have a site that has recently viewed products not working for whatever reason. It could very much be because someone stripped out some part of the code somewhere that handles this functionality.

I was able to find the database table report_viewed_product_index which is defined as:


So I searched the code base for reports/viewed_product_index to see if I can find a ->save() going on somewhere but that didn't seem to lead me any where.

Any thoughts on how to go about finding where this happens?


You assume that someone had stripped out the code which calling this.

  • This might be a modification in the core (app/code/core) - so I suggest to diff your code against the original Magento code

  • Also the code could be removed by a class overwrite in an extension: Disable all extensions and see if the problem still persists. Then enable them step by step.

  • 1
    This is helpful, but it turns out my mistake was that the recently added product excludes the current product from its list. Because I didnt realize this, I thought it was broken and not working. :-x – Bryan Ruiz Mar 26 '13 at 9:25

I got lucky and found the event in the config.xml which led me to this method in Reports/Model/Event/Observer.php

public function catalogProductView(Varien_Event_Observer $observer)
    $productId = $observer->getEvent()->getProduct()->getId();


    return $this->_event(Mage_Reports_Model_Event::EVENT_PRODUCT_VIEW, $productId);

Now to figure out why that isnt being called!

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.