How to Disable Compare Products in Magento 2?

Shopping can be overwhelming sometimes, especially when your catalogue is full of first-rate items that all seem to match customers' needs. Thus, having product recommendations and a compare products option in your store will assist your shoppers immensely.

Fortunately, Magento 2 users have this functionality in the default setup. Yet, depending on the type of your business and strategy, the compare products might be redundant. So, you should know how to disable them.

That said, in this article, you'll learn how to remove compare products in Magento 2.

What is Compare Products in Magento 2?

Compare products is a default Magento 2 feature that allows customers to compare the options of two or more items from your catalogue while shopping. The corresponding items are displayed in the grid, where shoppers can see their descriptions, best features, and ratings. 

The mechanism is pretty simple. All customers have to do is press the Add to Compare button on the corresponding product page and then click Compare in the Compare Products section in the sidebar. This gives them the comparison table of the chosen items.

Magento remove compare products

Besides, you can also display recently viewed products. Since they are added with the help of widgets, you are free to choose any location to display them.  

Benefits of Magento Compare Products

We already see that the Magento 2 compare product feature can be of great use for your store. So let's look at the benefits it can offer in closer detail now. 

Improved customer experience

High levels of customer satisfaction are efficient criteria for a successful store. Thus, this aspect will benefit greatly from the compare products option. 

Your customers do not have to check all the products they are interested in separately. Instead, they can see the comparison chart on one page. It makes it easier for shoppers to pick the right item and prompts them to finalize the purchase.

Magento compare products

Improved sales

Correspondingly, if your customers can find a necessary product, they are less likely to abandon their carts. Thus, your sales and general performance will only grow.    

Uncomplicated usage

Compare products are as user-friendly as it gets. All your customers need is to press a few buttons to add some items to the comparison table and then just review it. Moreover, all the products have the Add to Cart button right on the table, so customers can go to checkout straight away.

Add product to compare

Timesaving shopping experience

Needless to say, Magento compare products can save customers' time immensely. Just like we've mentioned, they don't need to analyze every item one by one. They have all the needed info on a platter and don't need to waste their time looking for the right details.

Flexible functionality

Even though Magento doesn't offer any additional settings for the compare products, you can still specify what attributes to display. You just need to make the corresponding attributes Comparable on Storefront to show the exact details your customers might need. Thus, you can adjust this functionality to make it a perfect fit.

Attributes comparable on storefront

Does Everyone Need Compare Products?

Having all the advantages in mind, you can at least give this option a try to see how it works out. It might be useful if you sell some gadgets, software, or any other specialized equipment. That is if the technical characteristics of your items are of crucial importance and have to be explored in closer detail due to compatibility or any other reasons.

Yet, if you run an apparel or book business, for instance, the compare products functionality might not be of great significance. It's a rare occurrence to check all the features too meticulously in this case. Thus, you might want to disable Magento 2 compare products. Jump to the next section to find out how.      

How to Disable Compare Products?

By default, Magento doesn't have an option to disable compare products via the admin panel. So, you'll need to do it programmatically. 

Navigate to Vendor/Extension/view/frontend/layout, create a default.xml  file, and run the following code:

<page xmlns:xsi="" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
        <referenceBlock name="" remove="true" />
        <referenceBlock name="" remove="true"/>
        <referenceBlock name="" remove="true"/>
        <referenceBlock name="" remove="true"/>
        <referenceBlock name="" remove="true" />
        <referenceBlock name="" remove="true" />
        <referenceBlock name="" remove="true" />
        <referenceBlock name="" remove="true" />

These simple steps will help you remove Magento compare products feature with little to no effort. And since you already know more about this functionality you can reconsider using it in your store.

If you decide to remove the compare products in the sidebar, you might instead enable the advanced compare products template for the related products. In this scenario, your customers will have a chance to examine the available options and choose the best one right on the product page.