How to disable the Compare products functionality

~ 0 min
04-05-2020 05:33

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 
name="catalog.compare.sidebar" 
template="catalog/product/compare/sidebar.phtml"/>
to
<!-- <block 
before="cart_sidebar" name="catalog.compare.sidebar" 
template="catalog/product/compare/sidebar.phtml"/> -->

Flush the Magento cache from your Magento admin area > System > Cache Management.

Average rating 0 (0 Votes)

You cannot comment on this entry