I've got the problem that i have to highly customize a magento ecommerce shop. Therefore it would be great if i could have the data requested in
\app\design\frontend\avalanche\default\template\reports\product_viewed_details.phtml
via
$this->getRecentlyViewedProducts()
I already tried to get it via
Mage::getBlockSingleton('report/product_view')->getRecentlyViewedProducts();
, but the only thing i get is an empty array.
Could someone please help me? I'm driving a little bit crazy over here.
Have you tried :
$collection = Mage::getSingleton('Mage_Reports_Block_Product_Viewed')->getItemsCollection();
You can also use aliases, to produce more 'friendly' code:
$collection = Mage::getBlockSingleton('reports/product_viewed')->getItemsCollection();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With