Disable Compare Products for Magento 2

disable compare products for magento 2


Magento 2 provides compare products functionality out of the
box. But not every store needs this feature. Unfortunately, there
is no simple way to
disable compare products in Magento. This simple
extension will allow you to remove compare products feature. The
main advantage of this module is that it doesn’t
use template rewrites or modifications, so it can be used on
different themes.


Unpack the archive. You will be able to find src directory in
the root folder. Copy contents of the src directory to the root
directory of your Magento installation.

Connect via SSH and run the following commands in the root

php bin/magento module:enable Magery_DisableCompare
php bin/magento setup:upgrade

Then clear the cache. Go to admin page under
System -> Cache Management and
press Flush Magento Cache button.

Now the module is enabled in the system and it is ready to be
configured and used.


Configuration of the module is pretty simple. In Magento admin
navigate to
Stores -> Configuration -> Catalog -> Catalog.
In the Storefront section, you will see the new dropdown
Disable Compare Products. Just set the value to
Yes and save the config. You can manage this setting on the store
level (for example if you want to disable compare functionality for
the one store, and leave it turned on for another store).

After clearing the cache compare product functionality will be
disabled for the desired store.

If you have any questions feel free to contact us