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.
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.
{# 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.
Lite is, and it is not a trial. One compare set, three items side by side, every core row type, guest and user lists with the merge on login, the bar, the modal, the standalone page, printing, and the full Twig and JSON API — for nothing. That is a complete comparator for most shops. Pro is a one-off $79 with a $29/year renewal.
No. Commerce is a soft dependency. Compare sets can be entries or categories, and a content site with no shop uses every feature except the price, SKU, stock and add-to-cart rows. Install Commerce and those four rows appear, along with Products and Variants as set types.
Commerce products, Commerce variants, entries and categories. One element type per set — comparing a sofa against a blog post is a novelty rather than a feature — and as many sets as your edition allows.
It compares a normalized value, never the rendered markup. $10.00 and $10 are the same price, Yes and yes are the same answer, two dates on the same day agree, and two relation fields holding the same three entries in a different order agree. Comparing HTML instead would report all of those as differences — which is precisely the noise the "differences only" view exists to remove.
Yes, and it is designed for rather than hoped for. The runtime fetches /compare/session.json for a fresh CSRF token and the visitor's real state, then reconciles the buttons — so a page from {% cache %}, Blitz or a CDN behaves exactly like an uncached one.
Yes. Every compare button is a real button inside a real form posting to a Craft action. The runtime intercepts it and turns it into a fetch; with JavaScript off it submits and reloads. There is one piece of markup, progressively enhanced.
One small stylesheet and one small script, both self-hosted, and only on pages that actually render a compare control. No jQuery, no framework, no CDN, and no outbound requests of any kind. You can also switch the bundled front end off entirely and drive the documented JSON endpoints from your own build.
The table narrows rather than breaking: it drops to three columns and Twig template rows are skipped. The page keeps working, and nothing stored is changed — lists, sets and rows are all untouched, so renewing restores everything.
Element IDs, a random guest token, and — for signed-in visitors — a user ID. No IP addresses, no user agents, no fingerprinting. Guest lists expire; a signed-in user's list is their data and goes with their account. The token cookie is strictly functional and is only ever set when somebody presses a compare button.
Craft CMS 5.3+, PHP 8.2+, and Craft Commerce 5.0+ if you want the Commerce rows.
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.