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!


  1. Reply May 22, 2015 / 21:39 BrianSiteGround Team

    Recommending that core files are modified is a horrible idea. If disabling the compare block using step 2, the Compare.php file should be copied from app/code/core/Mage/Catalog/Helper/Product/Compare.php to app/code/local/Mage/Catalog/Helper/Product and then modified there. That way it is applied as an override and not as a core file modification!

    • Reply May 25, 2015 / 08:38 Daniel KanchevSiteGround Team

      Thank you for the comment! We updated the article in order to advise people to create overrides instead of modifying the core files.

* (Required)