How to Include Recently Viewed Product Block on Product Page Right Column

blockscatalogproducts-view

I'm trying to standardise my right column navigation across my category pages and my product pages.

I have all my required blocks coming through but on my product page I'm not getting the Recently viewed products block displayed.

I tried adding the following to catalog_product_view in my catalog.xml file in y custom template but it doesn't seem to work

<reference name="right">
    <block type="reports/product_viewed" before="right.permanent.callout" name="right.reports.product.viewed" template="reports/product_viewed.phtml" />
</reference>

Is there something wrong with my method?

Best Answer

Make sure your product view page actually has a right column by setting the template of that page to either 3columns or 2columns-right from your local.xml and then add the block from there too to make sure it's not overwritten by any other XML file.

[...]
<catalog_product_view>
   <reference name="root">
      <action method="setTemplate"><template>page/3columns.phtml</template></action>
   </reference>
   <reference name="right">
      <block type="reports/product_viewed" before="right.permanent.callout" name="right.reports.product.viewed" template="reports/product_viewed.phtml" />
   </reference>
</catalog_product_view>
[...]
Related Topic