How Can I Disable Magento Compare Products Functionality

How can I disable or remove the Magento products comparison feature

To disable or remove the Magento products comparison feature, you may need to modify file

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"/> -->

Once its done, Need to flush the Magento cache from Magento backend area > System > Cache Management.

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments