Donky for Craft CMS

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.

Donky

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.

twig
{# 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.

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.