DocsShow on your store

Comparison table block

The comparison table block places the product of the page next to similar products, using their specifications. Customers see at a glance what sets them apart.

Comparison table with a product dropdown

Add the block

Before adding the block, choose the products to compare in the app.

  1. Open the theme editor on your product template.
  2. Click Add section › Apps › Comparison table (comparison tables are wide, so a full-width section usually works best). You can also add it as a block inside an existing section.
  3. Click Save.

The table compares the product of the page with the products selected in its Compare with card in the app. It uses the attributes of the main product’s table; only attributes marked as Comparable are displayed.

A comparison table needs at least one product to compare with. With only the main product, nothing is displayed — use a specification table instead.

Settings

Product

The main product. Filled in automatically on product pages.

Compare with

Optional list of up to 20 products. When empty, the table uses the products chosen in the app. Useful to build comparison landing pages.

Fallback to related productsDefault: Off

Compare with Shopify related products when no products are selected. Learn more.

Exclude sold out productsDefault: Off

Hide products that are sold out from the comparison.

Enable differences switchDefault: Off

Adds a switch to help customers spot differences. Learn more.

Show variant selectorDefault: Off

Lets customers choose the variant of each product. Learn more.

Show group namesDefault: On

Display group headings in the table.

Visible rowsDefault: 10

Number of rows shown before the View more button.

Visible productsDefault: 3

Number of products displayed at once (2 to 20). Learn more.

Show in modalDefault: Off

Replaces the table with a button that opens it in a modal. Learn more.

Show image / vendor / price / rating / view details

Choose which product information appears at the top of each column. Image, price, rating and the View details button are shown by default; the vendor is hidden. The rating requires a compatible review app.

AI analysisPro

Displays AI-generated buying advice above the table. Learn more.

Vertical margin, Width, Parent target selector

Layout settings shared with the other blocks.

Limit the number of products

When many products are compared, the table becomes hard to read on smaller screens. The Visible products setting limits how many products are shown at once — 3 by default, and we recommend 2 or 3. Hidden products can be selected by customers from a dropdown at the top of each column.

Visible products setting

To display every product in a horizontally scrollable table instead, increase the value.

Choosing products manually can be time-consuming for large catalogs. Turn on Fallback to related products to use the products recommended by Shopify for the product page when you haven’t selected any.

Products you select manually always take priority. You can fine-tune recommendations in Shopify’s Search & Discovery app.

Highlight differences

When products have many attributes but only a few differences, a switch helps customers focus. Turn on Enable differences switch, then choose the Differences switch mode:

  • Highlight differences (default): rows with different values get a colored background.
  • Hide similarities: rows where all products have the same value are hidden.

When customers turn the switch on:

Highlighted differences in a comparison table

The highlight color (pale blue by default) can be changed in the table editor.

Variant selector

When specifications depend on the variant — per-variant attributes, variant metafields, prices — it helps to let customers choose which variant they compare. Turn on Show variant selector: a dropdown appears in each column, and values update when a variant is selected.

Comparison table with variant selectors

With the selector enabled, the column of the main product also follows the variant selected on the product page.

Comparing variants of one product?

To build a table where each column is a variant of the same product, use the variant comparison table instead.

Hide the selector for some products

Some products have variants with identical specifications, and a selector would only add noise. You can hide it for specific products, even when the setting is on:

  1. Open the product in your Shopify admin.
  2. In the Metafields card, click View all.
  3. Find Hide comparison table variant selector and set it to True.
Hide comparison table variant selector metafield

Exclude variants from the selector

You may want to keep the selector but remove some variants from it — for example a “Custom” variant whose specifications depend on the customer’s choices.

  1. Open the product in your Shopify admin and click the variant.
Variants list in the Shopify admin
  1. In the variant Metafields card, click View all.
  2. Find Exclude from comparison variant selector and set it to True.
Exclude from comparison variant selector metafield

Show in a modal

Comparison tables take space. On long product pages, turn on Show in modal: the table is replaced by a button (“Compare products” by default, customizable with Modal button text) that opens the comparison in a modal.

IMAGE A INSERER

Comparison table in a modal

A product page with the “Compare products” button, and the modal opened over the page showing the comparison table.

Still stuck?

Our support team answers every email, usually within one business day.

Contact support