Skip to content
Vova Yatsyuk edited this page Aug 13, 2015 · 7 revisions

Configuration

Navigate to the System > Configuration > Catalog > Also Viewed Products to enable Also Viewed block on the product page.

Configuration

Module configuration provides ability to show Also Viewed Products in one of the following containers:

  • Left or Right column
  • Product additional information

Please note, that your theme is responsible to output the required container.

Each of the sections has options that allows to configure title, list mode, products count, columns count (in case of grid mode) and image dimensions.

Widget

Since version 1.1.0 Alsoviewed blocks can be placed in any section of the site with Magento widget feature.

Widget allows you to configure title, list mode, products count, columns count (in case of grid mode) and image dimensions.

You can also configure basis to build recommendations:

  • Current Product (default)
  • Recently Compared Products
  • Shopping Cart products

widget

Manual

Sometimes you will need to show the block in custom place. Below you'll find some examples.

Moving existing block to another container

This approach is used to move the block to RWD and Argento tabs.

  1. Enable Also Viewed products block in Product Additional Container.
  2. Open local.xml file on your theme and add the following code to move the block:
   <catalog_product_view>
       <reference name="product.info.additional">
           <action method="unsetChild"><name>alsoviewed.collateral.wrapper</name></action>
       </reference>
       <reference name="CUSTOM.BLOCK.NAME">
           <action method="append"><name>alsoviewed.collateral.wrapper</name></action>
       </reference>
   </catalog_product_view>

Create new block from layout file

  1. Open local.xml file on your theme and add the following code:
   <catalog_product_view>
       <reference name="CUSTOM.BLOCK.NAME">
           <block type="core/template" name="alsoviewed.custom.wrapper" before="-">
               <action method="setTemplate">
                   <template>yavva/alsoviewed/wrapper/collateral.phtml</template>
               </action>
               <block type="alsoviewed/products" name="alsoviewed.list" template="yavva/alsoviewed/products.phtml">
                   <action method="setMode"><mode>grid</mode></action>
                   <action method="setProductsCount"><count>4</count></action>
                   <action method="setColumnCount"><count>4</count></action>
                   <action method="setImageWidth"><width>170</width></action>
                   <action method="setImageHeight"><height>170</height></action>
               </block>
           </block>
       </reference>
   </catalog_product_view>