Compare for Craft CMS

Free for Craft CMS 5

Let people put your products side by side

WooCommerce shops have had comparison tables for years. Craft has not — because those plugins compare products, and their table is a fixed list of known product properties. Craft content is whatever you modelled it to be. Compare's answer is a table row that reads itself off whatever element it is handed.

Compare

Two lines, and you have a comparator

One line on your product card, one in your layout. The button is a real form posting to a real action, so it works with JavaScript switched off — the runtime intercepts the same markup and turns it into a fetch.

twig
{# On the product card #}
{{ craft.compare.button(product) }}

{# Once, in your layout #}
{{ craft.compare.bar() }}

{# And wherever you want the table itself #}
{{ craft.compare.render() }}
{{ craft.compare.render(products) }}          {# these three, right now #}
{{ craft.compare.render(null, { differencesOnly: true }) }}

Features

A comparison table an admin defines, a list that survives signing in, and a front end that survives a CDN.

A row reads any element

Rows are resolvers, not columns. The same "custom field" row draws a laptop's processor, a sofa's fabric and a case study's industry — so one table definition serves a Commerce product type and an entry section without two implementations.

  • Products, variants, entries and categories
  • Title, image, any custom field, element attributes, link
  • Price, SKU, stock and add-to-cart with Commerce

Differences that are actually differences

Highlighting compares a normalized value, never the rendered HTML. $10.00 and $10 are one price. Two dates on the same day agree. Two relation fields holding the same three entries in a different order agree.

  • Rows that agree can be hidden entirely
  • A blank counts as a difference, because it is one
  • Rows nobody answered are dropped

The list survives signing in

The cookie holds a random token; the list itself lives in the database. So it can be shared by URL, reported on, and folded into an account the moment someone signs in.

  • Add three on a phone, sign in on a laptop, still there
  • A saved list is never overwritten by a guest one
  • The token is cleared on adoption, so a shared computer stays private

Correct on a cached page

Compare buttons live on product cards, and product cards live on pages served by {% cache %}, Blitz or a CDN. The runtime never trusts the HTML it rendered into — it fetches a fresh CSRF token and the visitor's real state, then reconciles the buttons.

  • Cached and uncached pages behave identically
  • Every endpoint is public and documented
  • Works with JavaScript switched off

A page, not just a modal

A comparison is something people bookmark, print and send to whoever else is paying. There is a real URL at /compare with a print stylesheet that removes the chrome and turns off sticky positioning — a sticky header repeats on top of the content on every printed page.

  • Bar, modal and standalone page, all from one table builder
  • Shareable links on Pro, which never overwrite the viewer's own list

What gets weighed against what

Pro records which items get put next to each other. That is your competitive set as customers see it, which is rarely how the catalogue is organised — and it is a report you cannot get anywhere else.

  • Stored as pairs, so the report is an aggregate rather than a guess
  • Element IDs and timestamps only — no personal data
  • A CP browser for one visitor's live comparison, for support calls

Frequently Asked Questions

The questions worth answering before you install it.

Start free, upgrade when the catalogue grows

Lite is free and covers one compare set with three items side by side. Pro is $79 with a $29/year renewal, and adds unlimited sets, up to ten items, difference highlighting, Twig template rows, shareable links and Insights.