/** * Emulate 'viewed products' block with persistent data * * @param Mage_Reports_Block_Product_Viewed $block * @return null */ public function emulateViewedProductsBlock(Mage_Reports_Block_Product_Viewed $block) { if (!Mage::helper('enterprise_persistent')->isViewedProductsPersist()) { return; } $customerId = $this->_getCustomerId(); $block->getModel()->setCustomerId($customerId)->calculate(); $block->setCustomerId($customerId); }