Disable Magento’s Compare products function

530 views
asked Jan 7, 2013 in E-commerce by reema40 (820 points)
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
commented Jun 23, 2013 by Cathy Daunt (100 points)
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 like 0 dislike
answered Jan 7, 2013 by expert (14,380 points)
Hi Reema40
This is what you are looking for
 http://www.siteground.com/tutorials/magento/magento_issues.htm#compare
commented Jan 7, 2013 by reema40 (820 points)
thanks expert
0 like 0 dislike
answered Oct 2, 2014 by perrysun (680 points)
edited Sep 22, 2016 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.
...