Web Hosting Geeks | Web Hosting Experts
Need help? Call us 1(866)TOP-HOST

14625 reviews 1734 hosting providers

Questions & Answers

Disable Magento’s Compare products function

Jan 7, 2013 by reema40
Hi all..
I am using Magento in my ecommerce site and I noticed that it has a built in function for comparing products. I don’t need that function and so I don’t want it to appear at all. How can I remove and disable the compare product function from Magento?
Thanks in advanced
Hi, I would suggest to follow this instruction:

You can disable the Compare products functionality in Magento by following these steps:

Edit app/code/core/Mage/Catalog/Helper/Product/Compare.php and change the following code:
public function getAddUrl($product)
{
return $this->_getUrl(’catalog/product_compare/add’, $this->_getUrlParams($product));
}

to

public function getAddUrl($product)
{
//return $this->_getUrl(’catalog/product_compare/add’, $this->_getUrlParams($product)); return false;
}

Edit ./app/design/frontend/base/default/layout/catalog.xml (if you are using a different Magento theme, enter its name instead of default) and change the following code:
<block type="catalog/product_compare_sidebar" before="cart_sidebar" name="catalog.compare.sidebar" template="catalog/product/compare/sidebar.phtml"/>

to

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


Source: http://php.quicoto.com/how-to-remove-add-to-compare-magento/#comment-66217

Cathy
Magento Ajax Add to Cart = http://www.apptha.com/magento/ajax-cart-pro

2 Answers

0 votes
Jan 7, 2013 by expert
Hi Reema40
This is what you are looking for
 http://www.siteground.com/tutorials/magento/magento_issues.htm#compare
thanks expert
0 votes
Oct 2, 2014 by perrysun
You can also use a ready-made extension http://amasty.com/magento-hide-price.html . Among all its features, there's also an ability to disable compare option.