Welcome to PotatoCommerce - Magento Extensions Store

Home > Blog > Magento 2 Product Comparison

Magento 2 Product Comparison — Features Overview and How to Remove It

Posted on 26 June 2018

This article reveals an overview of the possibilities offered by Magento 2 for comparing products. This article also contains a guide which will help you to remove (disable) the comparison functionality in Magento 2, if you do not need this feature.

Why you may need comparative tables

Not all online purchases are equal. Sometimes we buy products online quickly, without much effort and investigation, such purchases are called non-considered purchases. For example, it is unlikely that you will spend much time in order to study in detail the characteristics of a book, a set of colored pencils or a T-shirt.

However, there are considered purchases, which have a completely different character. This is especially true for compound mid-and-high-price products, in which the characteristics of products play a crucial role — electronics and household appliances, goods for children, sports equipment. Indeed, when buying a TV, smartphone, bicycle or child car seat many users can spend hours studying the characteristics because such goods are valued not for appearance, but primarily for their capabilities.

Magento 2 Product Comparison — Features Overview and How to Remove It

When a buyer goes to an offline store to buy a smartphone, then usually a user first narrows down the range of phones to 2-5, and then compare products to find the winner.

When purchasing online people think quite the same way. In an online store users can use layered navigation (faceted search) to narrow down the range of products, and then users can use product comparison to compare products with each other. Comparative tables show the characteristics of several products in one place, which allows you to quickly determine pros and cons of the products.

Thus, comparative tables are an important element of the online store, if you sell electronics, electronic appliances, sports equipment, children's products, or some stuff for home repair. Product comparison helps your customers to make an informed choice.

In addition, well-implemented comparative tables can drive your sales as customers can a more likely to make a purchase if they can find a good product at a good price, and product comparison helps to find it.

The good news is that Magento 2 has a built-in product comparison functionality.
The bad news is that this functionality is very far from perfect, it lacks important features, and it is very inconvenient to use it.

Magento 2 Compare Products — Review

Adding products to comparison

The product can be added to the comparison list from the catalog page or from the product page.

  • The functionality is built into Magento 2 platform
  • The link to add a product to the comparison list is conveniently located on the page.
  • The link to add a product to the comparison list is not only on the category page but also available on product pages.

  • Each time you add a product to a comparison list, it causes the page to reload, which can irritate users, especially if your pages load slowly.
  • The link to the comparison page is not very noticeable on Magento 2 pages.
  • It is not possible to disable (remove) product comparison for a particular product, product category, or for the entire store.
  • It is not displayed for mobile devices (at least on default theme)
Add product to compare in Magento 2
Add product to compare on Magento 2 product page

Comparison List

The comparison page is a table in which one axis is used for product attributes, and the products are on the second axis.

  • A user has to compare the values ​​in the columns himself. Ideally, this work should be performed by the platform, and better values ​​should be displayed with a different background color.
  • The page is absolutely not suitable for mobile devices.
  • The page does not have a permanent URL that would allow you to add a page to bookmarks, or send a link to someone for study. Such a URL could also be used in marketing.
  • In Magento 2, it is not possible to change the order of attributes on the comparison page (at least I did not find how to do it).
  • In Magento 2, it is not possible to group attributes into groups.
  • It is not possible to hide attributes whose values ​​are the same for all products on the list.
  • Removing a product from the comparison list causes a page to reload.
  • It would be better to display Yes/No attributes not with text, but with icons.
Add product to compare on Magento 2 product page

Compare products on mobile devices

As we’ve noted above, the comparison of the products is not available for users who came to your site using a mobile device. This is a significant drawback, as mobile traffic has already exceeded desktop traffic for many online stores, and the share of mobile traffic will increase every year. That is, about half of users will not be able to take advantage of this feature.

Some Magento 2 themes display Add To Compare button for mobile devices. However, this does not solve the problem to the end, since the comparison page is a static table that is incorrectly displayed on mobile devices - a horizontal scroll appears, which is very frustrating.

Many stores tried to make a convenient comparison on mobile devices, but many few managed to do this since the screen of mobile devices is not suitable for correctly displaying a table with data.

Add product to compare on Magento 2 product page

How to remove/disable product comparison in Magento 2

It's no secret that many online stores do not need comparison feature. This is especially true for fashion & accessories niche, cheap stuff, spare parts, books, as well as products of art. For such products, it is better to disable the comparison function to make the pages cleaner and more convenient.

Unfortunately, the developers of Magento 2 for some reason did not make the option in the admin panel to quickly disable the comparison functionality.

Now we'll show you how to hide product compare in Magento 2:

  1. We need to change the file list.phtml in the folder of your theme. <theme_dir>/Magento_Catalog/templates/product/list.phtml
  2. Make a backup of the original file
  3. Now you need to delete the following lines in the file:
$compareHelper = $this->helper('Magento\Catalog\Helper\Product\Compare');
<a href="#"
   class="action tocompare"
   title="<?php echo $block->escapeHtml(__('Add to Compare')); ?>"
   aria-label="<?php echo $block->escapeHtml(__('Add to Compare')); ?>"
   data-post='<?php /* @escapeNotVerified */ echo $compareHelper->getPostDataParams($_product); ?>'
      <span><?php /* @escapeNotVerified */ echo __('Add to Compare') ?></span>

PotatoCommerce company has Magento 2 Compare Product PRO extension in the roadmap. You can subscribe to our newsletter/Telegram/Facebook/twitter to be informed upon the release of PotatoCommerce Compare extension for Magento 2. You can also contact us to learn about the release date.

About the Author

Author Stanislav Golodov
Stanislav Golodov, Product Management & Marketing in PotatoCommerce

Stanislav has written most of PotatoCommerce blog posts. He belives that blog posts should be really helpful and be written primarily for people, not for Googlebot. Stanislav started working with Magento in 2011 as QA, and later as Product Manager. He joined PotatoCommerce in 2017, where he is responsible for marketing, web analytics, product specifications and finalizing the scope of our products and major extension updates.