Free for Craft Commerce 5
An invoice is a record, not a report
Commerce can take the money. It cannot hand the customer a numbered invoice, print eighty packing slips, or put a credit note in an email. Donky does all four — and freezes what the document said the day it was issued, so an order edited three months later does not quietly rewrite last quarter's paperwork.
Every document is a Twig template
There is no layout builder here, and that is the point. The bundled templates are real files you can copy into your own templates/ folder and own outright — and the Designer keeps feeding them your logo, colours and issuer block after you do.
{# templates/donky/_render/invoice.twig — your copy, your markup #}
{% for line in snapshot.lines ?? [] %}
<tr>
<td>{{ line.description }}</td>
<td>{{ line.qty }}</td>
<td>{{ document.money(line.total) }}</td>
</tr>
{% endfor %}
{# Guard every snapshot read: devMode turns on strict_variables. #}
{# Customer download links, signed and expiring #}
{% for doc in craft.donky.customerDocuments(order) %}
<a href="{{ doc.publicUrl }}">{{ doc.formattedNumber }}</a>
{% endfor %}
{# Nothing in the Twig API issues a document or spends a number. #}
Features
A counter table with a lock on it, a frozen snapshot per document, and rules that fire when the email is actually sent.
Numbers that hold up
One place hands out a number, under a mutex, with a unique index behind it. Counters never rewind on their own.
- Formats take {number}, {yyyy}, {mm}, {storeHandle} and more
- Reset yearly, monthly or daily — one counter per reset period
- Voiding keeps the number; deleting keeps it spent
- Or borrow the order reference and let the invoice number be the order number
A snapshot, not a re-render
Issuing freezes line items, addresses, adjustments, totals and payments onto the document row.
- An order edited months later does not restyle last quarter's invoice
- The live order is still passed to the template as `order`
- Every snapshot is stamped with its version, so an old one is identifiable
Restyle without touching Twig
Paper size, margins, fonts, colours, logo, the issuer block, and which parts of the document get drawn.
- The design produces the stylesheet, so your own template still gets the merchant's colours
- Toggle the SKU column, tax column, shipping address, paid stamp, terms and footer
- Preview any design against a real order
Print a hundred at once
Select orders on the Commerce index, pick a document, get one PDF back with continuous page numbers.
- Merging happens in HTML, not in PDF — no second engine to keep in step
- Donky issues whatever is missing as it goes
- bulkPrintLimit caps the selection, because a bundle renders whole in memory
Attached to the right email
Rules are matched when the email is sent, not when the status changes — the only moment the customer actually sees.
- Match on order status and, on Pro, on an order condition
- A document that cannot be built sends the email anyway and logs why
- The other stance is one setting away
Pick lists and credit notes
One document about a shelf rather than an order, and one that records a credit rather than moving money.
- A pick list collapses every line across the selected orders by the thing you reach for
- Credit notes credit at what was actually billed, per unit, and refuse to over-credit
- Commerce still moves the money; the credit note is the paperwork
Frequently Asked Questions
The questions worth answering before you install it.
Lite is, and it is not a trial. You get one invoice and one packing slip, one design, Donky's own sequential numbering with formats and resets, one attachment rule, and customer download links — for nothing. Pro is $99 with a $49/year renewal.
No. Installing seeds a default design and, per store, an Invoice and a Packing slip — both set to only when asked. Nothing is issued until you say so. Adding a document suite to a live store must never start numbering by itself.
Because builders emit markup the merchant cannot read and the developer cannot maintain. Every Donky document is a Twig template. Copy src/templates/_render/ into templates/donky/_render/, point the type at your copy, and it is yours — while the Designer keeps supplying the logo, colours and issuer block.
Yes. Set the invoice type's number source to The order reference. With Abacus installed that reference is already a real sequential order number, so the invoice number is the order number — which is what most merchants mean when they ask for this. Donky's own sequence exists for shops that need invoice numbers to run independently of orders, which is the law in several places.
No. Rendering uses dompdf, which Craft Commerce already requires. Donky lists it as a suggest rather than a require, so a Composer audit policy cannot make the plugin uninstallable.
Nothing happens to the invoice. Issuing freezes line items, addresses, adjustments, totals and payments into a snapshot on the document row, and the bundled templates read that snapshot. An invoice that quietly restates itself every time it is reprinted is not an invoice, it is a report.
Mark a document type available to customers and Donky builds a signed, expiring link. A logged-in customer can also fetch their own order's documents without a signature. The signature parameter is sig, not token — Craft reserves token for preview links.
Every row stays readable and the downgrade is reversible. The edition gates live in the services and controllers, not in the models — so Pro documents, designs and rules are still there, still listed, and come straight back when you upgrade again.
Start free, upgrade when you need to
Lite covers one invoice, one packing slip and one design, with real sequential numbering. Pro is $99 with a $49/year renewal, and adds credit notes, pick lists, proforma invoices, any number of types and designs, bulk printing, rules matched by status and condition, backfilling, and the document ledger with CSV export.