Magento – Add compare products block to the left column 1.9 rwd theme

blocksmagento-1.9

I am using the rwd theme in magento 1.9 and want to add the compare products block below the "shop by" section. I thought i could do it be editing the catalog.xml file and moving the code for the block from under the right section to the left, but it didn't seem to work even after flushing the cache.

from catalog.xml:

<!-- Mage_Catalog -->
        <reference name="left">
<block type="catalog/product_compare_sidebar" before="cart_sidebar" name="catalog.compare.sidebar" template="catalog/product/compare/sidebar.phtml"/>
            <!--<block type="core/template" name="left.permanent.callout" template="callouts/left_col.phtml">-->
                <!--<action method="setImgSrc"><src>images/media/col_left_callout.jpg</src></action>-->
                <!--<action method="setImgAlt" translate="alt" module="catalog"><alt>Our customer service is available 24/7. Call us at (555) 555-0123.</alt></action>-->
                <!--<action method="setLinkUrl"><url>checkout/cart</url></action>-->
            <!--</block>-->
        </reference>
        <reference name="right">

            <!--<block type="core/template" name="right.permanent.callout" template="callouts/right_col.phtml">-->
                <!--<action method="setImgSrc"><src>images/media/col_right_callout.jpg</src></action>-->
                <!--<action method="setImgAlt" translate="alt" module="catalog"><alt>Keep your eyes open for our special Back to School items and save A LOT!</alt></action>-->
            <!--</block>-->

Best Answer

First you need remove default compare sidebar from category pages which is called in right side of all page using xml code: <remove name="catalog.compare.sidebar" /> and create new sidebar at category page then align it after layer navagation using after tag try this code

For Non-Anchor Category :

 <catalog_category_default translate="label">
     <remove name="catalog.compare.sidebar" />
        <reference name="left">
        <block type="catalog/product_compare_sidebar" after="catalog.leftnav" name="catalog.compare.newsidebar" template="catalog/product/compare/sidebar.phtml"/>
     </reference>
  </catalog_category_default>

For Non-Anchor Category :

 <catalog_category_layered translate="label">
<remove name="catalog.compare.sidebar" />
        <reference name="left">
        <block type="catalog/product_compare_sidebar" after="catalog.leftnav" name="catalog.compare.newsidebar" template="catalog/product/compare/sidebar.phtml"/>
     </reference>
  </catalog_category_layered>
Related Topic