Free for Craft Commerce 5

Order numbers people can read down the phone

Commerce gives every completed order a reference derived from its cart hash — 4b55768. It is unique, and it is useless to a customer reading it aloud or an accountant reconciling a spreadsheet. Abacus replaces it with a number you designed.

Abacus

One field, one token

Write the format you want and put {number} where the counter goes. The dates are the order's dates, not today's — which is what makes a backfill of a two-year-old order land in the right year.

twig
INV-{yyyy}-{number}      →  INV-2026-01042
SO-{number}              →  SO-000317
{yyyy}-{mm}-{number}     →  2026-08-0044

{# It writes to Commerce's own reference, so nothing in your
   templates has to change. #}
{{ order.reference }}

Features

A proper counter table, a mutex and a ledger — not a number stashed in a meta field.

Formats that mean something

Prefix, suffix, year, month, day, store and site tokens, with zero-padding, a custom start and a custom increment.

  • A format without {number} is refused
  • So is an unknown token — a typo like {yyy} never reaches an invoice

Resets that actually reset

A scheme keeps one counter per reset period, so "reset every month" means a real counter for 2026-08 and another for 2026-09 — not one number nudged backwards.

No duplicates, under load

Every number comes out of one method holding a per-scheme mutex, checked against both the orders table and the ledger, with a unique index behind it.

A sequence per order type

Pro adds several schemes per store, each matched by a Commerce order condition. First match wins, so wholesale, big orders and everything else can each have their own run of numbers.

Backfill that rehearses first

Renumber orders that completed before Abacus arrived, in completion order. Preview the whole table of now → would become before a single row is written, and put it back afterwards if you need to.

  • A run recomputes rather than replaying the preview
  • Reverting restores references without rewinding the counter

A ledger, not a guess

Every number ever issued, what it replaced, where it came from and what became of it — searchable in the CP and exportable as CSV.

Frequently Asked Questions

The questions worth answering before you install it.

Start free, upgrade when you need to

Lite is free and covers one sequence per store. Pro is $39 with a $19/year renewal, and adds multiple schemes, skip lists, reclaim, backfill and the ledger.