| 1 |
<!-- |
| 2 |
Standard Receipt — Default POS Receipt Template. |
| 3 |
|
| 4 |
A clean, streamlined receipt that covers the essentials most stores |
| 5 |
need: store identity (with logo when present), order number / date / |
| 6 |
cashier, itemized lines (name × qty + total), a single tax line, |
| 7 |
payments and change, and a footer imprint. It deliberately leaves |
| 8 |
out per-line SKU / unit price / tax columns, the bill-to / ship-to |
| 9 |
grid, per-rate VAT breakdown, refunds, customer note, barcode, terms |
| 10 |
and opening hours. Reach for the Detailed Receipt when you need any |
| 11 |
of those. |
| 12 |
|
| 13 |
Uses the logicless template engine with section blocks: |
| 14 |
{{#key}}...{{/key}} — iterate arrays or show block for truthy values |
| 15 |
{{^key}}...{{/key}} — show block when value is empty/falsy |
| 16 |
{{.}} — current value (for arrays of strings) |
| 17 |
{{key.path}} — dot-path placeholder substitution |
| 18 |
|
| 19 |
Money fields are auto-formatted as currency. |
| 20 |
No PHP required — just HTML, CSS, and placeholder variables. |
| 21 |
|
| 22 |
Note: Logicless output passes through wp_kses_post, which strips |
| 23 |
<style>, <head>, and document-level tags. Use inline styles only. |
| 24 |
|
| 25 |
@see https://docs.wcpos.com/templates/receipt-data-reference |
| 26 |
--> |
| 27 |
<div style="box-sizing: border-box; -webkit-print-color-adjust: exact; print-color-adjust: exact; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; font-size: 13px; line-height: 1.45; color: #1f2937; padding: 32px 36px;"> |
| 28 |
|
| 29 |
<!-- ── Header: logo + store info + order meta ─────────────── --> |
| 30 |
<header style="display: flex; align-items: flex-start; gap: 22px; padding-bottom: 18px; border-bottom: 2px solid #111827;"> |
| 31 |
{{#store.logo}} |
| 32 |
<div style="flex: 0 0 auto;"> |
| 33 |
<img src="{{store.logo}}" alt="{{store.name}}" style="width: 88px; height: auto; display: block;"> |
| 34 |
</div> |
| 35 |
{{/store.logo}} |
| 36 |
<div style="flex: 1 1 auto; min-width: 0;"> |
| 37 |
<div style="font-size: 22px; font-weight: 700; letter-spacing: -0.01em;">{{store.name}}</div> |
| 38 |
{{#store.address_lines}} |
| 39 |
<div style="margin-top: 2px; color: #6b7280; font-size: 12px;">{{.}}</div> |
| 40 |
{{/store.address_lines}} |
| 41 |
{{#store.phone}}<div style="color: #6b7280; font-size: 12px;">{{store.phone}}</div>{{/store.phone}} |
| 42 |
{{#store.tax_ids}} |
| 43 |
<div style="color: #6b7280; font-size: 12px;">{{#label}}{{label}} {{/label}}{{value}}</div> |
| 44 |
{{/store.tax_ids}} |
| 45 |
</div> |
| 46 |
<div style="flex: 0 0 auto; text-align: right;"> |
| 47 |
{{#order.status_label}} |
| 48 |
<div style="display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; background: #f3f4f6; color: #1f2937; border-radius: 999px; font-weight: 700; font-size: 10px; letter-spacing: 0.10em; text-transform: uppercase; margin-bottom: 8px;"> |
| 49 |
<span style="width: 6px; height: 6px; border-radius: 50%; background: #6b7280;"></span> {{order.status_label}} |
| 50 |
</div> |
| 51 |
{{/order.status_label}} |
| 52 |
{{^order.status_label}} |
| 53 |
{{#order.wc_status}} |
| 54 |
<div style="display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; background: #f3f4f6; color: #1f2937; border-radius: 999px; font-weight: 700; font-size: 10px; letter-spacing: 0.10em; text-transform: uppercase; margin-bottom: 8px;"> |
| 55 |
<span style="width: 6px; height: 6px; border-radius: 50%; background: #6b7280;"></span> {{order.wc_status}} |
| 56 |
</div> |
| 57 |
{{/order.wc_status}} |
| 58 |
{{/order.status_label}} |
| 59 |
<div style="font-size: 11px; letter-spacing: 0.16em; color: #6b7280; text-transform: uppercase;">{{#fiscal.document_label}}{{fiscal.document_label}}{{/fiscal.document_label}}{{^fiscal.document_label}}{{i18n.receipt}}{{/fiscal.document_label}}</div> |
| 60 |
<div style="font-size: 22px; font-weight: 700; margin-top: 2px;">#{{order.number}}</div> |
| 61 |
<div style="color: #6b7280; font-size: 12px; margin-top: 6px;">{{order.created.datetime}}</div> |
| 62 |
{{#cashier.name}}<div style="color: #6b7280; font-size: 12px;">{{i18n.cashier}}: {{cashier.name}}</div>{{/cashier.name}} |
| 63 |
{{#customer.name}}<div style="color: #6b7280; font-size: 12px;">{{i18n.customer}}: {{customer.name}}</div>{{/customer.name}} |
| 64 |
{{#customer.tax_ids}}<div style="color: #6b7280; font-size: 11px; margin-top: 2px;">{{#label}}{{label}} {{/label}}{{value}}</div>{{/customer.tax_ids}} |
| 65 |
</div> |
| 66 |
</header> |
| 67 |
|
| 68 |
<!-- ── Items ─────────────── --> |
| 69 |
<table style="width: 100%; border-collapse: collapse; margin-top: 22px; font-size: 13px;"> |
| 70 |
<thead> |
| 71 |
<tr> |
| 72 |
<th style="text-align: left; font-weight: 600; color: #6b7280; padding: 8px 6px; border-bottom: 1px solid #e5e7eb; font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em;">{{i18n.item_short}}</th> |
| 73 |
<th style="text-align: right; font-weight: 600; color: #6b7280; padding: 8px 6px; border-bottom: 1px solid #e5e7eb; font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap;">{{i18n.qty_short}}</th> |
| 74 |
<th style="text-align: right; font-weight: 600; color: #6b7280; padding: 8px 6px; border-bottom: 1px solid #e5e7eb; font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap;">{{i18n.total}}</th> |
| 75 |
</tr> |
| 76 |
</thead> |
| 77 |
<tbody> |
| 78 |
{{#lines}} |
| 79 |
<tr> |
| 80 |
<td style="padding: 10px 6px; border-bottom: 1px solid #f3f4f6;"> |
| 81 |
<div style="font-weight: 600;">{{name}}</div> |
| 82 |
{{#line_savings}}<div style="color: #6b7280; font-size: 10px;"><span style="text-decoration: line-through;">{{line_regular_total_display}}</span><span style="color: #15803d;"> · {{i18n.savings}} -{{line_savings_display}}</span></div>{{/line_savings}} |
| 83 |
</td> |
| 84 |
<td style="padding: 10px 6px; border-bottom: 1px solid #f3f4f6; text-align: right; font-variant-numeric: tabular-nums;">{{qty}}</td> |
| 85 |
<td style="padding: 10px 6px; border-bottom: 1px solid #f3f4f6; text-align: right; font-variant-numeric: tabular-nums;">{{line_total_display}}</td> |
| 86 |
</tr> |
| 87 |
{{/lines}} |
| 88 |
{{#fees}} |
| 89 |
<tr> |
| 90 |
<td style="padding: 10px 6px; border-bottom: 1px solid #f3f4f6;"><div style="font-weight: 600;">{{label}}</div></td> |
| 91 |
<td style="padding: 10px 6px; border-bottom: 1px solid #f3f4f6; text-align: right; font-variant-numeric: tabular-nums;">1</td> |
| 92 |
<td style="padding: 10px 6px; border-bottom: 1px solid #f3f4f6; text-align: right; font-variant-numeric: tabular-nums;">{{total_display}}</td> |
| 93 |
</tr> |
| 94 |
{{/fees}} |
| 95 |
{{#shipping}} |
| 96 |
<tr> |
| 97 |
<td style="padding: 10px 6px; border-bottom: 1px solid #f3f4f6;"><div style="font-weight: 600;">{{label}}</div></td> |
| 98 |
<td style="padding: 10px 6px; border-bottom: 1px solid #f3f4f6; text-align: right; font-variant-numeric: tabular-nums;">1</td> |
| 99 |
<td style="padding: 10px 6px; border-bottom: 1px solid #f3f4f6; text-align: right; font-variant-numeric: tabular-nums;">{{total_display}}</td> |
| 100 |
</tr> |
| 101 |
{{/shipping}} |
| 102 |
{{#discounts}} |
| 103 |
<tr style="color: #15803d;"> |
| 104 |
<td style="padding: 10px 6px; border-bottom: 1px solid #f3f4f6;"><div style="font-weight: 600;">{{i18n.discount}}{{#label}} · {{label}}{{/label}}</div></td> |
| 105 |
<td style="padding: 10px 6px; border-bottom: 1px solid #f3f4f6; text-align: right;">—</td> |
| 106 |
<td style="padding: 10px 6px; border-bottom: 1px solid #f3f4f6; text-align: right; font-variant-numeric: tabular-nums;">-{{total_display}}</td> |
| 107 |
</tr> |
| 108 |
{{/discounts}} |
| 109 |
</tbody> |
| 110 |
</table> |
| 111 |
|
| 112 |
<!-- ── Totals (right-aligned) ─────────────── --> |
| 113 |
<div style="margin-top: 20px; max-width: 280px; margin-left: auto; font-size: 13px;"> |
| 114 |
<div style="display: flex; justify-content: space-between; padding: 2px 0;"><span style="color: #6b7280;">{{i18n.subtotal}}</span><span style="font-variant-numeric: tabular-nums;">{{totals.subtotal_display}}</span></div> |
| 115 |
{{#totals.tax_total}} |
| 116 |
<div style="display: flex; justify-content: space-between; padding: 2px 0;"><span style="color: #6b7280;">{{#tax.display_excl}}{{i18n.total_tax}}{{/tax.display_excl}}{{#tax.display_incl}}{{i18n.included_tax}}{{/tax.display_incl}}</span><span style="font-variant-numeric: tabular-nums;">{{totals.tax_total_display}}</span></div> |
| 117 |
{{/totals.tax_total}} |
| 118 |
<div style="border-top: 2px solid #111827; margin: 8px 0;"></div> |
| 119 |
<div style="display: flex; justify-content: space-between; padding: 4px 0; font-size: 18px; font-weight: 700;"><span>{{i18n.total}}</span><span style="font-variant-numeric: tabular-nums;">{{totals.total_incl_display}}</span></div> |
| 120 |
{{#totals.total_saved_incl}} |
| 121 |
<div style="display: flex; justify-content: space-between; padding: 2px 0; color: #15803d;"><span>{{i18n.total_saved}}</span><span style="font-variant-numeric: tabular-nums;">{{totals.total_saved_incl_display}}</span></div> |
| 122 |
{{/totals.total_saved_incl}} |
| 123 |
{{#totals.refund_total}} |
| 124 |
<div style="display: flex; justify-content: space-between; padding: 2px 0; font-size: 12px; color: #b91c1c;"><span>{{i18n.refunded}}</span><span style="font-variant-numeric: tabular-nums;">-{{totals.refund_total_display}}</span></div> |
| 125 |
<div style="display: flex; justify-content: space-between; padding: 4px 0; font-size: 13px; font-weight: 600; border-top: 1px solid #e5e7eb;"><span>{{i18n.net_total}}</span><span style="font-variant-numeric: tabular-nums;">{{totals.net_total_display}}</span></div> |
| 126 |
{{/totals.refund_total}} |
| 127 |
</div> |
| 128 |
|
| 129 |
<!-- ── Refunds summary (only when refunds present) ─────────────── --> |
| 130 |
{{#refunds.0}} |
| 131 |
<div style="margin-top: 20px; padding: 14px 16px; background: #fff1f2; border: 1px solid #fecdd3; border-radius: 8px; font-size: 12px; line-height: 1.5;"> |
| 132 |
<div style="font-size: 10px; letter-spacing: 0.12em; color: #6b7280; text-transform: uppercase; margin-bottom: 8px; font-weight: 700;">{{i18n.returned_items}}</div> |
| 133 |
{{#refunds}} |
| 134 |
<div style="display: flex; justify-content: space-between; gap: 12px; padding: 4px 0;"> |
| 135 |
<div> |
| 136 |
<strong>#{{id}}</strong>{{#date.datetime}} <span style="color: #6b7280; font-size: 11px;">· {{date.datetime}}</span>{{/date.datetime}} |
| 137 |
{{#reason}}<div style="color: #6b7280; font-size: 11px;">{{reason}}</div>{{/reason}} |
| 138 |
</div> |
| 139 |
<div style="font-variant-numeric: tabular-nums; font-weight: 700;">{{amount_display}}</div> |
| 140 |
</div> |
| 141 |
{{/refunds}} |
| 142 |
</div> |
| 143 |
{{/refunds.0}} |
| 144 |
|
| 145 |
<!-- ── Customer note (only when present) ─────────────── --> |
| 146 |
{{#order.customer_note}} |
| 147 |
<div style="margin-top: 20px; padding: 14px 16px; background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px; font-size: 12px; line-height: 1.5;"> |
| 148 |
<div style="font-size: 10px; letter-spacing: 0.12em; color: #6b7280; text-transform: uppercase; margin-bottom: 6px; font-weight: 700;">{{i18n.customer_note}}</div> |
| 149 |
<div style="color: #92400e; white-space: pre-wrap;">{{order.customer_note}}</div> |
| 150 |
</div> |
| 151 |
{{/order.customer_note}} |
| 152 |
|
| 153 |
<!-- ── Payments ─────────────── --> |
| 154 |
{{#payments.0}} |
| 155 |
<div style="margin-top: 24px; padding-top: 18px; border-top: 1px solid #e5e7eb;"> |
| 156 |
<div style="font-size: 10px; letter-spacing: 0.12em; color: #6b7280; text-transform: uppercase; margin-bottom: 8px;">{{i18n.paid}}</div> |
| 157 |
{{#payments}} |
| 158 |
<div style="display: flex; justify-content: space-between; padding: 2px 0;"><span><strong>{{method_title}}</strong></span><span style="font-variant-numeric: tabular-nums;">{{amount_display}}</span></div> |
| 159 |
{{#tendered}}<div style="font-size: 11px; color: #6b7280; padding-left: 4px; display: flex; justify-content: space-between;"><span>{{i18n.tendered}}</span><span style="font-variant-numeric: tabular-nums;">{{tendered_display}}</span></div>{{/tendered}} |
| 160 |
{{#change}}<div style="font-size: 11px; color: #6b7280; padding-left: 4px; display: flex; justify-content: space-between;"><span>{{i18n.change}}</span><span style="font-variant-numeric: tabular-nums;">{{change_display}}</span></div>{{/change}} |
| 161 |
{{/payments}} |
| 162 |
</div> |
| 163 |
{{/payments.0}} |
| 164 |
|
| 165 |
<!-- ── Footer ─────────────── --> |
| 166 |
<div style="margin-top: 24px; padding-top: 14px; border-top: 1px solid #e5e7eb; text-align: center; color: #6b7280; font-size: 12px; font-style: italic;"> |
| 167 |
{{#store.personal_notes}}{{store.personal_notes}}{{/store.personal_notes}} |
| 168 |
{{^store.personal_notes}}{{i18n.thank_you_purchase}}{{/store.personal_notes}} |
| 169 |
</div> |
| 170 |
{{#store.footer_imprint}} |
| 171 |
<div style="margin-top: 10px; text-align: center; font-size: 11px; color: #6b7280;">{{store.footer_imprint}}</div> |
| 172 |
{{/store.footer_imprint}} |
| 173 |
|
| 174 |
</div> |
| 175 |
|