How to Remove Add to Compare Magento

Do you want to remove the add to compare list in your Magento site?

There is only bad news to do that.

First of all there is no an easy-admin-button to turn it off. Yeah Magento rocks...

And of course you will have to to into some code. But don't worry is quite simple.

0. Turn cache Off

Turn off the Magento Cache just to be sure the changes work. You can turn it on again once you're done.

Reminder: System-> Cache Management

1. reports.xml

Open the app/design/frontend/deafult/YourTheme/layout/reports.xml

Look for and comment or delete this line:

<block type="reports/product_compared" before="right.permanent.callout" name="right.reports.product.compared" template="reports/product_compared.phtml" />

And also this one:

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

2. catalog.xml

Open the app/design/frontend/deafult/YourTheme/layout/catalog.xml

Comment or delete this line:

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

3. addto.phtml

Open the file app/design/frontend/default/YourTheme/template/catalog/product/view/addto.phtml

Comment or delete this line:

<?php if($_compareUrl=$this->helper('catalog/product_compare')->getAddUrl($_product) ): ?> <li><span class="pipe">|</span> <a href="<?php echo $_compareUrl ?>"><?php echo $this->__('Add to Compare') ?></a></li> <?php endif; ?>

Done!

The add to compare list should not be there anymore.

I've tested this tutorial in a Magento 1.4 version.

One comment
  • Rick! Nice tips…

    I found one other place to get rid of the Compare on your List / Grid Views is in the YOUR_PACKAGE/YOUR_TEMPLATE/catalog/product/list.phtml
    Rem out the

    helper('wishlist')->isAllow()) : ?> getAddUrl($_product) ?>" class="link-wishlist">__('Add to Wishlist') ?> getAddToCompareUrl($_product)): ?> | __('Add to Compare') ?>

Leave a Reply

Add <code> Some Code </code> by using this tags.

*
*