17 Apr 2014 
Support Center » Knowledgebase » How do I disable the Compare products functionality in Magento?
 How do I disable the Compare products functionality in Magento?
Solution You can disable the Compare products functionality by following the steps listed below:

1. 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;
}

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

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


Article Details
Article ID: 90
Created On: 14 Feb 2011 08:40 PM

 This answer was helpful  This answer was not helpful

 Back
 Login [Lost Password] 
Email:
Password:
Remember Me:
 
 Search
 Article Options
Home | Register | Submit a Ticket | Knowledgebase | News | Downloads
Language:

Help Desk Software Help Desk Software By Kayako eSupport v3.60.03