How to disable the Compare products functionality?

You can disable the Compare products functionality using a Magento extension which should be installed additionally or by manually editing two of the Magento core files.

1. By installing an extension:

You can install the following Magento extension for your application called ET Advanced Compare.

This will add an option to your Magento administrative area which allows you to disable the Compare feature with just few clicks of your mouse. Detailed instructions about the installation can be found on the extension page above.

After the installation, the Compare feature can be turned off through your Magento admin area -> System -> ET Extensions -> Advanced Compare -> Remove Compare Option.

2. By creating an override of the the Magento core files:

  • First, create a backup of these files in order to avoid any application crashes and data loss!

The file called Compare.php is situated inside the folder ~/app/code/core/Mage/Catalog/Helper/Product/. The other file is called catalog.xml and it is situated inside the folder ~/app/design/frontend/base/default/layout/

  • Copy ~/app/code/core/Mage/Catalog/Helper/Product/Compare.php to ~/app/code/local/Mage/Catalog/Helper/Product/Compare.php and change the following code:


By creating an override of the Compare.php file you make sure that the core file itself will not be changed and this way the app will not be negatively affected. In addition, local override files are never changed during upgrades. This means that your changes will not be reverted when you upgrade your Magento application.

  • 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:


  • When you are ready flush the Magento cache through your Magento admin area -> System -> Cache Management.

You need help with a shopping cart? SiteGround is specialized in eCommerce hosting and provides expert support for a large number of shopping carts. Check out our shopping cart hosting services!