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:
to
- Flush the Magento cache from your Magento admin area > System > Cache Management.
-
View more threads in the same category:
- Prevent an array filter warning while adding products
- Best Development Practices in Magento 2
- How to Secure Magento Against SQL Injections
- How To Backup And Rollback In Magento 2
- Implement Your Custom API In Magento Backend
- How to Create Simple Twitter Feed Module in Magento 2
- How To Secure cron.php In Magento 2
- How To Create & Configure Multi Store In Magento 2
- Create Your Own Widget In Magento
- Third Part of Magento Theme Development
Bookmarks