1

I am using theme254k in Magento 1. I would like to remove Compare Products section of side bar of Category Page. How can I do that ??

I found below code in catalog.xml

<default>
        <!-- Mage_Catalog -->
        <reference name="right">
            <!--<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="left">
            <block type="catalog/product_compare_sidebar" after="cart_sidebar" name="catalog.compare.sidebar" template="catalog/product/compare/sidebar.phtml"/>
            <block type="core/text_list" name="side.menu" as="sideMenu" translate="label" before="-">
                <label>Navigation Bar</label>
                <block type="page/html_topmenu" name="catalog.topnav2" template="page/html/sidemenu.phtml"/>
            </block>

        </reference>
        <reference name="footer_links">
            <action method="addLink" translate="label title" module="catalog" ifconfig="catalog/seo/site_map"><label>Site Map</label><url helper="catalog/map/getCategoryUrl" /><title>Site Map</title></action>
        </reference>
        <block type="catalog/product_price_template" name="catalog_product_price_template" />
    </default>

enter image description here

I removed below code from above code

<block type="catalog/product_compare_sidebar" after="cart_sidebar" name="catalog.compare.sidebar" template="catalog/product/compare/sidebar.phtml"/>

But Compare Product is not removed.

enter image description here

4

there are many ways, simply use following from page where you want to remove

app/code/design/YOUR_PACKAGE/YOUR_THEME/layout/local.xml

<?xml version="1.0"?>
<layout version="0.1.0">
<catalog_category_layered>
<reference name="left">
          <remove name="catalog.compare.sidebar" />

     </reference>
</catalog_category_layered>
</layout>
| improve this answer | |
  • 1
    Thanks for your reply. But your solution is not working. Thanks – abu abu Oct 29 '16 at 6:48
1

You need to remove compare product from category page as below.

1. app/design/frontend/[Your Theme]/layout/catalog.xml

find the block, and added code

<catalog_category_default>
<!-- either "left" or "right" -->
  <reference name="right">
            <action method="unsetChild"><name>catalog.compare.sidebar</name></action>
        </reference>
</catalog_category_default>

<catalog_category_layered>
<!-- either "left" or "right" -->
      <reference name="right">
                <action method="unsetChild"><name>catalog.compare.sidebar</name></action>
            </reference>
</catalog_category_layered>

and if this not work for you, then open your current theme local.xml file avilable at

app/design/frontend/[Your Theme]/layout/local.xml

add this code.

    <catalog_category_default>
<!-- either "left" or "right" -->
  <reference name="right">
            <action method="unsetChild"><name>catalog.compare.sidebar</name></action>
        </reference>
</catalog_category_default>

<catalog_category_layered>
<!-- either "left" or "right" -->
      <reference name="right">
                <action method="unsetChild"><name>catalog.compare.sidebar</name></action>
            </reference>
</catalog_category_layered>
| improve this answer | |
  • 1
    Thanks @Dhiren Vasoya for your reply. But you solution is not working. Thanks – abu abu Oct 29 '16 at 17:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.