In order to disable Magento compare functionality, slight changes need to be made to several files within the default Magento installation. Please note that should you be using a customized version of Magento, the paths may differ. Please see below:
- Login to your cPanel web hosting account via FTP
- Navigate to the Magento Installation directory
- Next, go to the following location:
- # /app/code/core/Mage/Catalog/Helper/Product/
- Edit the following file called "Compare.php" and make these adjustments:
- FROM:
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;
}
- Save the needed changes, and go to the next file location at: # /app/design/frontend/base/default/layout/
- Edit the following file called "catalog.xml" and perform these adjustments:
FROM:
<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"/> -->
Upon completion, all that is needed is for you to save the changes to your web hosting environment. After that, you'll need to flush the cache within Magento to make your changes visible.
To do this, please follow the short step-by-step instructions outlined below:
- Login to your Magento Admin Panel
- Next, go to "System" and then onto "Cache Management"
- Drop the cache located within to apply the changes
Should you have any additional questions pertaining to your Magento hosting account, please feel free to get in contact with our web hosting support team.