Table of Contents
When browsing a store with multiple products, one might feel overwhelmed by the available choices. Fortunately, Magento 2 has helpful options such as the Compare Products feature to make shopping easier. However, some customers might find this feature unnecessary, depending on their business demands, and hence consider disabling it.
What is the ‘Add to Compare’ Feature?
The Compare Products feature in Magento 2 allows customers to compare several different products. When one clicks “Add to Compare” button on a product page and then opens ‘Compare products’ appearing above (as shown in the screenshot above), a table comparing details of certain items, such as descriptions, features, and ratings, is shown, which makes it easier to decide which item to buy.
Advantages of the Compare Products Feature in Magento 2
- Improved Customer Experience
Customers can see details of several products on one page and compare them side by side. - Increased Sales
By simplifying product comparisons, customers are more likely to make a purchase, which can increase sales. - Easy to Use
The feature is user-friendly: customers just add an item by clicking “Add to Compare” button, then open “Compare Products” and can proceed to checkout with the “Add to Cart” button. - Time-Saving
Customers get all the information in one place instead of reviewing every product separately. - Flexible Functionality
Storeowners can customize the attributes to be shown in the comparison table, ensuring it meets the needs of their customers specifically.
There are also different extensions that provide more enhanced Compare functionality, such as, for example, SwissUpLabs Compare Module, which expands the default Magento Compare design.
Does Every Store Need Product Comparison enabled?
The Magento Compare Products feature is suitable for stores selling technical or detailed items like gadgets or software, where customers would like to evaluate specifications. However, for simpler products like books or clothing, this feature might not be as required. In such cases, disabling it might be a good idea.
How to Disable Compare Products in Magento 2
Unfortunately, there is no such option to disable the Compare Products feature in the Magento admin panel, thus one needs to use an extension that allows doing that, such as the Compare module from SwissUpLabs, or modify the code. Here’s how:
- Navigate to the folder: Vendor/Extension/view/frontend/layout
- Create a default.xml file.
(Path: app/design/frontend/Vendor_of_Your_Theme/Name_of your_Theme/Magento_Catalog/layout/default.xml)
- Add the following code:
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock name="catalog.compare.link" remove="true" />
<referenceBlock name="catalog.compare.sidebar" remove="true"/>
<referenceBlock name="catalogsearch.product.addto.compare" remove="true"/>
<referenceBlock name="category.product.addto.compare" remove="true"/>
<referenceBlock name="crosssell.product.addto.compare" remove="true" />
<referenceBlock name="related.product.addto.compare" remove="true" />
<referenceBlock name="upsell.product.addto.compare" remove="true" />
<referenceBlock name="view.addto.compare" remove="true" />
</body>
</page>The above code will remove the Compare Products feature from your store.
Conclusion
The Compare Products feature in Magento 2 helps customers decide which items exactly they want to choose. However, it might not be useful for some stores due to their specifics, in such a case, it can be disabled with a simple code change or with the help of an external module. Whether you use it or not, making your store work well for your customers will keep them happy and boost your sales.