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:
Step 2 – catalog.xml
Open app/design/frontend/deafult/Your Theme name/layout/catalog.xml and delete the following line:
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) ): ?>
<ul>
<li><span class="pipe">|</span> <a href="<?php echo $_compareUrl ?>">< ?php echo $this->__('Add to Compare') ?></a></li>
</ul>
< ?php endif; ?>
Oh, of course theif you don’t want to actually delete the code can always use the following:
That’s it. You should now be free of product comparison for ever and ever 🙂
30 comments
Hello,
I just want to remove the icon link on product pages , but the above refers to XML files ?
thank you… It works!……
It is really helpfull, but my problem is, “Compare Product” icon is missing from the home page.
Actually i am a newbie in magneto, KIndly help to fix this problem( humbly requested).
Any assistance would be appriciated. Thank you.
helper(‘catalog/product_compare’)->getAddUrl($_product) ): ?>
you can simple override Catalog/helper/product/compare.php
public function getAddUrl($product)
{
return false;
}
as the if check if the return isn’t null. This will remove all the add to compare link.
From magento :
http://www.magentocommerce.com/wiki/4_-_themes_and_template_customization/catalog/how_to_remove_add_to_compare
You can use this free extension for disabling product compare functionality http://www.magentocommerce.com/magento-connect/catalog/product/view/id/16044/s/disable-compare-products-1047/
Some of it did work but for it to disappear from the product pages I had to set the .link-compare (line 433) in styles.css to display:none, atleast it’s visually gone now.
Free extension to remove comparison feature:
http://www.magentocommerce.com/magento-connect/niro/extension/6455/et_advancedcompare
Not that hard. The “or” is in the product view.
OK – we finally got rid of it – despite having a custom template the last line above applied to our core files, not the custom template files. Now we have a floating “OR” we don’t want… where the option used to be Add to Cart -OR- Add to Compare – any ideas where that OR is located ? if we grep OR that gets us nowhere. LOL.. its little crap like this that costs us a fortune. Come on Magento !
I want to know who in the world was the idiot who put the compare function in, why its default is on, and why its so freaking hard to disable. I have spent an hour going though all the files here and the POS still shows up on my products page… Magento is a great program, but dear GOD why the stupid compare feature cannot be disabled by the admin panel is beyond me.
Thanks so much. worked perfectly for 1.5.1.0
@mike
That’s just terrible SEO for many reasons.
/* Removing Product Comparison w. css */
.block-compare, .link-compare {display:none;}
@mike thnx worked for me 🙂
dear god why is something like this so difficult? Wishlist has an on / off switch in admin, why can’t this?
Awesome guide!! – By any chance, do you know the procedures for Magetnto1.4.2?… I tried following your guide, but file locations doesn’t match
Thank you for this guide. In my webshop the addto.phtml file was not located in the above location but in app/design/frontend/base/default/template/catalog/product/view
John, that was great! Much easier. Thanks so much for posting that link.
I spent hours finding and deleting code trying to get “add to compare” off my website. Then I found this info:
http://www.aschroder.com/2009/07/removing-the-compare-function-in-magento-the-easy-way/
It was really easy. Just follow the directions and your “add to compare” should not be visible on the website.
Thanks! works very well.
I hope there will be future updates to magento to have this added to the admin backend as an option.
It works! I am using 1.3.2.4. Looks complicated at first but its easier then the rest.
Really nice – thanks for all your support and you taking the time to find all these files to edit. Great forum.
Why you want disable product comparision?
Thanks!!!
It worked! =)
Thanks for the tutorial and additional comments guys – saved me a bunch of time compared to the last time I tried to do the same.
just a note to anyone looking to fully remove the add to compare functionality…
you will need to edit crosssell.phtml to remove the add to compare link as well
app\design\frontend\default\default\template\checkout\cart
Thanks for your help…
its working….
I see you can’t post the code I did in the previous post. And you need to change another file for the “My Account” pages.
app/design/frontend/default/Your Theme name/layout/customer.xml
delete line 191
app/design/frontend/default/Your Theme name/catalog/product/list.phtml
delete line 76, 77, 78, 79, 116, 117, 118
app/design/frontend/default/Your Theme name/
Thank you very much!
“add to compare” doesn’t remove in the product list or grid with this changes. You need to change a little bit more:
app/design/frontend/default/Your Theme name/template\catalog\product\list.phtml
76 |
77 <a href=””>__(‘Add to Compare’) ?>
78
116 getAddToCompareUrl($_product)): ?>
117 <a href=””>__(‘Add to Compare’) ?>
118
@Zeljko I like the last one 🙂