Sunday, April 22, 2012

Show recent view product in product view page in magento

What I have done to enable recently viewed on the product page was:
in catalog.xml inside the content block of catalog_product_view:

<block type="reports/product_viewed" name="reports.product.viewed" 
 as="recently_viewed" template="reports/product_viewed.phtml">
  <action method="setColumnCount"><columns>4</columns></action>
  <action method="setItemLimit"><type>recently_viewed</type><limit>4</limit></action>
</block>
 
in the template file: catalog/product/view.phtml:
 
<?php echo $this->getChildHtml('recently_viewed') ?>
 

1 comment:

  1. hello... i ask something? how I can shows the recently viewed without login?
    Thanks

    ReplyDelete