Home » Magento Guide

Removing Product Comparison in Magento

6 October 2009 No Comment

Removing Product Comparison in Magento

As many things in Magento, removing product comparison is not available thru the admin interface. Thus, leaving us with the only option of getting down and dirty with theme files editing.

This guide is pretty straightforward and is based on the Magento ver. 1.3.1.1

Before beginning of this procedure please Go to: System-> Cache Management and disable cache. You can turn it on after you’re done.

Step 1 – reports.xml

Open: app/design/frontend/deafult/Your Theme name/layout/reports.xml and delete the following lines:

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

Step 2 – catalog.xml

Open app/design/frontend/deafult/Your Theme name/layout/catalog.xml and delete the following line:

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

Save the files and refresh the page you we’re checking. Product comparison should not be there but if you click on any of the products you ‘ll see that the “Add to compare” text link is still there.

The way to remove it:
Step 3 – addto.phtml

Open up app/design/frontend/default/Your Theme name/template/catalog/product/view/addto.phtml and delete the following line:

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

Oh, of course theif you don’t want to actually delete the code can always use the following:

<remove name="name_of_the_ol_block"/>

That’s it. You should now be free of product comparison for ever and ever :)

By Željko Prša from Inchoo.net

Related posts:

  1. Moving / Removing Callouts on the left / right columns
  2. Move mini-cart in the sidebar to the header (or anywhere) in Magento
  3. How to Customize Magento Product Page
  4. Add New Reference in Magento
  5. Simple product with custom options in grouped product in Magento

Leave your response!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Spam Protection by WP-SpamFree

Security Code: