| 1 |
<!-- |
| 2 |
Minimal / Modern Receipt — compact, structured POS receipt. |
| 3 |
|
| 4 |
A trimmed receipt with a centered store header, a bold double-border |
| 5 |
order band, dense item rows (no table header), inline right-aligned |
| 6 |
totals and a single payment band. Same essentials as the Standard |
| 7 |
Receipt (store, order #/date/cashier, items, totals, payment) packed |
| 8 |
into less vertical space. |
| 9 |
|
| 10 |
Uses the logicless template engine with section blocks: |
| 11 |
{{#key}}...{{/key}} — iterate arrays or show block for truthy values |
| 12 |
{{^key}}...{{/key}} — show block when value is empty/falsy |
| 13 |
{{.}} — current value (for arrays of strings) |
| 14 |
{{key.path}} — dot-path placeholder substitution |
| 15 |
|
| 16 |
Money fields are auto-formatted as currency. |
| 17 |
No PHP required — just HTML, CSS, and placeholder variables. |
| 18 |
|
| 19 |
Note: Logicless output passes through wp_kses_post, which strips |
| 20 |
<style>, <head>, and document-level tags. Use inline styles only. |
| 21 |
|
| 22 |
@see https://docs.wcpos.com/templates/receipt-data-reference |
| 23 |
--> |
| 24 |
<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;"> |
| 25 |
|
| 26 |
<!-- ── Store identity (centered, logo above name) ─────────────── --> |
| 27 |
<div style="text-align: center; margin-bottom: 14px;"> |
| 28 |
{{#store.logo}} |
| 29 |
<div style="margin-bottom: 8px;"> |
| 30 |
<img src="{{store.logo}}" alt="{{store.name}}" style="max-width: 140px; height: auto; display: inline-block;"> |
| 31 |
</div> |
| 32 |
{{/store.logo}} |
| 33 |
<div style="font-size: 22px; font-weight: 700; letter-spacing: -0.01em;">{{store.name}}</div> |
| 34 |
{{#store.tax_ids}} |
| 35 |
<div style="margin-top: 2px; color: #6b7280; font-size: 12px;">{{#label}}{{label}} {{/label}}{{value}}</div> |
| 36 |
{{/store.tax_ids}} |
| 37 |
{{#store.address_lines.0}} |
| 38 |
{{#store.phone}} |
| 39 |
<div style="margin-top: 2px; color: #6b7280; font-size: 12px;"> |
| 40 |
{{#store.address_lines}}{{.}} · {{/store.address_lines}}{{store.phone}} |
| 41 |
</div> |
| 42 |
{{/store.phone}} |
| 43 |
{{^store.phone}} |
| 44 |
{{#store.address_lines}} |
| 45 |
<div style="margin-top: 2px; color: #6b7280; font-size: 12px;">{{.}}</div> |
| 46 |
{{/store.address_lines}} |
| 47 |
{{/store.phone}} |
| 48 |
{{/store.address_lines.0}} |
| 49 |
{{^store.address_lines.0}} |
| 50 |
{{#store.phone}} |
| 51 |
<div style="margin-top: 2px; color: #6b7280; font-size: 12px;">{{store.phone}}</div> |
| 52 |
{{/store.phone}} |
| 53 |
{{/store.address_lines.0}} |
| 54 |
</div> |
| 55 |
|
| 56 |
<!-- ── Order band: bold double border ─────────────── --> |
| 57 |
<div style="display: flex; justify-content: space-between; align-items: baseline; padding: 10px 0; border-top: 2px solid #111827; border-bottom: 2px solid #111827; font-size: 13px;"> |
| 58 |
<div> |
| 59 |
<span style="font-size: 10px; letter-spacing: 0.12em; color: #6b7280; text-transform: uppercase; margin-right: 6px;">{{i18n.order}}</span> |
| 60 |
<strong>#{{order.number}}</strong> |
| 61 |
</div> |
| 62 |
<div style="color: #6b7280;"> |
| 63 |
{{order.created.datetime}}{{#cashier.name}} · {{i18n.cashier}}: {{cashier.name}}{{/cashier.name}}{{#customer.name}} · {{i18n.customer}}: {{customer.name}}{{/customer.name}} |
| 64 |
</div> |
| 65 |
</div> |
| 66 |
|
| 67 |
<!-- ── Items (no table header) ─────────────── --> |
| 68 |
<div style="margin-top: 18px;"> |
| 69 |
{{#lines}} |
| 70 |
<div style="display: flex; justify-content: space-between; align-items: baseline; padding: 8px 0; border-bottom: 1px solid #f3f4f6;"> |
| 71 |
<div> |
| 72 |
<div><strong>{{name}}</strong> <span style="color: #6b7280; font-size: 12px;">× {{qty}}</span></div> |
| 73 |
{{#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}} |
| 74 |
</div> |
| 75 |
<div style="font-variant-numeric: tabular-nums;">{{line_total_display}}</div> |
| 76 |
</div> |
| 77 |
{{/lines}} |
| 78 |
{{#fees}} |
| 79 |
<div style="display: flex; justify-content: space-between; align-items: baseline; padding: 8px 0; border-bottom: 1px solid #f3f4f6;"> |
| 80 |
<div><strong>{{label}}</strong></div> |
| 81 |
<div style="font-variant-numeric: tabular-nums;">{{total_display}}</div> |
| 82 |
</div> |
| 83 |
{{/fees}} |
| 84 |
{{#shipping}} |
| 85 |
<div style="display: flex; justify-content: space-between; align-items: baseline; padding: 8px 0; border-bottom: 1px solid #f3f4f6;"> |
| 86 |
<div><strong>{{label}}</strong></div> |
| 87 |
<div style="font-variant-numeric: tabular-nums;">{{total_display}}</div> |
| 88 |
</div> |
| 89 |
{{/shipping}} |
| 90 |
{{#discounts}} |
| 91 |
<div style="display: flex; justify-content: space-between; align-items: baseline; padding: 8px 0; border-bottom: 1px solid #f3f4f6; color: #15803d;"> |
| 92 |
<div><strong>{{i18n.discount}}</strong>{{#label}} · {{label}}{{/label}}</div> |
| 93 |
<div style="font-variant-numeric: tabular-nums;">-{{total_display}}</div> |
| 94 |
</div> |
| 95 |
{{/discounts}} |
| 96 |
</div> |
| 97 |
|
| 98 |
<!-- ── Totals (inline, right-aligned) ─────────────── --> |
| 99 |
<div style="margin-top: 18px; max-width: 280px; margin-left: auto; font-size: 13px;"> |
| 100 |
<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> |
| 101 |
{{#totals.tax_total}} |
| 102 |
<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> |
| 103 |
{{/totals.tax_total}} |
| 104 |
<div style="border-top: 2px solid #111827; margin: 8px 0;"></div> |
| 105 |
<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> |
| 106 |
{{#totals.total_saved_incl}} |
| 107 |
<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> |
| 108 |
{{/totals.total_saved_incl}} |
| 109 |
{{#totals.refund_total}} |
| 110 |
<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> |
| 111 |
<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> |
| 112 |
{{/totals.refund_total}} |
| 113 |
</div> |
| 114 |
|
| 115 |
<!-- ── Customer note (only when present) ─────────────── --> |
| 116 |
{{#order.customer_note}} |
| 117 |
<div style="margin-top: 18px; padding: 10px 12px; background: #fffbeb; border-left: 3px solid #fde68a; font-size: 12px; line-height: 1.5;"> |
| 118 |
<div style="color: #92400e; white-space: pre-wrap;">{{order.customer_note}}</div> |
| 119 |
</div> |
| 120 |
{{/order.customer_note}} |
| 121 |
|
| 122 |
<!-- ── Payments (bordered band) ─────────────── --> |
| 123 |
{{#payments.0}} |
| 124 |
<div style="margin-top: 24px; padding: 14px 0; border-top: 1px solid #e5e7eb; border-bottom: 1px solid #e5e7eb;"> |
| 125 |
<div style="font-size: 10px; letter-spacing: 0.12em; color: #6b7280; text-transform: uppercase; margin-bottom: 8px;">{{i18n.paid}}</div> |
| 126 |
{{#payments}} |
| 127 |
<div style="display: flex; justify-content: space-between; align-items: baseline;"> |
| 128 |
<div> |
| 129 |
<strong>{{method_title}}</strong> |
| 130 |
</div> |
| 131 |
<div style="font-variant-numeric: tabular-nums;">{{amount_display}}</div> |
| 132 |
</div> |
| 133 |
{{#tendered}} |
| 134 |
<div style="margin-top: 4px; display: flex; justify-content: space-between; font-size: 11px; color: #6b7280;"> |
| 135 |
<span>{{i18n.tendered}}</span><span style="font-variant-numeric: tabular-nums;">{{tendered_display}}</span> |
| 136 |
</div> |
| 137 |
{{/tendered}} |
| 138 |
{{#change}} |
| 139 |
<div style="margin-top: 4px; display: flex; justify-content: space-between; font-size: 11px; color: #6b7280;"> |
| 140 |
<span>{{i18n.change}}</span><span style="font-variant-numeric: tabular-nums;">{{change_display}}</span> |
| 141 |
</div> |
| 142 |
{{/change}} |
| 143 |
{{/payments}} |
| 144 |
</div> |
| 145 |
{{/payments.0}} |
| 146 |
|
| 147 |
<!-- ── Footer ─────────────── --> |
| 148 |
<div style="margin-top: 24px; text-align: center; color: #6b7280; font-size: 12px; font-style: italic;"> |
| 149 |
{{#store.personal_notes}}{{store.personal_notes}}{{/store.personal_notes}} |
| 150 |
{{^store.personal_notes}}{{i18n.thank_you_purchase}}{{/store.personal_notes}} |
| 151 |
</div> |
| 152 |
{{#store.footer_imprint}} |
| 153 |
<div style="margin-top: 8px; text-align: center; font-size: 11px; color: #6b7280;">{{store.footer_imprint}}</div> |
| 154 |
{{/store.footer_imprint}} |
| 155 |
|
| 156 |
</div> |
| 157 |
|