Magento 2 – Disable Compare Products

Magento 2 provides many useful features out of the box. However, not every store requires product comparison functionality and it should be removed.

Unfortunately, there is no simple way to disable compare products in Magento 2.
The most popular way of removing is using layout updates. You can add layout instructions to remove compare blocks from the sidebar, category view, and other locations.

But there are lot of places in the templates with compare products links. And to cover all areas, we should override a lot of these templates to remove compare links.
For example, in Magento 2.1.3 there are 12 templates containing compare links:

  1. module-catalog-widget/view/frontend/templates/product/widget/content/grid.phtml
  2. module-catalog/view/frontend/templates/product/listing.phtml
  3. module-catalog/view/frontend/templates/product/list/addto/compare.phtml
  4. module-catalog/view/frontend/templates/product/view/addto/compare.phtml
  5. module-catalog/view/frontend/templates/product/widget/new/content/new_grid.phtml
  6. module-catalog/view/frontend/templates/product/widget/new/content/new_list.phtml
  7. module-reports/view/frontend/templates/product/widget/viewed/item.phtml
  8. module-reports/view/frontend/templates/widget/compared/content/compared_grid.phtml
  9. module-reports/view/frontend/templates/widget/compared/content/compared_list.phtml
  10. module-reports/view/frontend/templates/widget/viewed/content/viewed_grid.phtml
  11. module-reports/view/frontend/templates/widget/viewed/content/viewed_list.phtml
  12. module-wishlist/view/frontend/templates/item/configure/addto.phtml

This is quite big list and it takes some time to override each template.
And if you don’t want to spend your time on this, you should try this nice extension from MageryThemes – Disable Compare Products for Magento 2.
This tiny extension doesn’t use template overrides and simply does its job.

I hope you will enjoy it too!