| 1 |
<!-- |
| 2 |
Gift Receipt — Classic Invoice layout. |
| 3 |
|
| 4 |
Centred store masthead, GIFT RECEIPT title between hairline rules, |
| 5 |
order meta strip, ruled item table (Item / SKU / Qty — no prices), |
| 6 |
product attributes listed under each item name, gift message in a |
| 7 |
left-bar block quote, and a footer with return policy and a repeated |
| 8 |
order reference. |
| 9 |
|
| 10 |
Designed for clean black-and-white printing on any office printer. |
| 11 |
|
| 12 |
Uses the logicless template engine with section blocks: |
| 13 |
{{#key}}...{{/key}} — iterate arrays or show block for truthy values |
| 14 |
{{^key}}...{{/key}} — show block when value is empty/falsy |
| 15 |
{{.}} — current value (for arrays of strings) |
| 16 |
{{key.path}} — dot-path placeholder substitution |
| 17 |
|
| 18 |
Note: Logicless output passes through wp_kses_post, which strips |
| 19 |
<style>, <head>, and document-level tags. Use inline styles only. |
| 20 |
|
| 21 |
@see https://docs.wcpos.com/templates/receipt-data-reference |
| 22 |
--> |
| 23 |
<div style="box-sizing: border-box; -webkit-print-color-adjust: exact; print-color-adjust: exact; font-family: Georgia, 'Times New Roman', serif; font-size: 13px; line-height: 1.55; color: #111; padding: 44px 56px; background: #fff;"> |
| 24 |
|
| 25 |
<!-- ── Header: centred logo + store identity ─────────────── --> |
| 26 |
<div style="text-align: center;"> |
| 27 |
{{#store.logo}} |
| 28 |
<div style="margin-bottom: 10px;"> |
| 29 |
<img src="{{store.logo}}" alt="{{store.name}}" style="max-width: 140px; height: auto; display: inline-block;"> |
| 30 |
</div> |
| 31 |
{{/store.logo}} |
| 32 |
<div style="font-size: 24px; font-weight: 600; letter-spacing: 0.01em;">{{store.name}}</div> |
| 33 |
{{#store.address_lines}} |
| 34 |
<div style="font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; font-size: 12px; color: #4b4b4b; margin-top: 2px;">{{.}}</div> |
| 35 |
{{/store.address_lines}} |
| 36 |
{{#store.phone}} |
| 37 |
<div style="font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; font-size: 12px; color: #4b4b4b; margin-top: 2px;">{{store.phone}}{{#store.email}} · {{store.email}}{{/store.email}}</div> |
| 38 |
{{/store.phone}} |
| 39 |
{{^store.phone}} |
| 40 |
{{#store.email}} |
| 41 |
<div style="font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; font-size: 12px; color: #4b4b4b; margin-top: 2px;">{{store.email}}</div> |
| 42 |
{{/store.email}} |
| 43 |
{{/store.phone}} |
| 44 |
{{#store.tax_ids}} |
| 45 |
<div style="font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; font-size: 11px; color: #6b6b6b; margin-top: 2px; letter-spacing: 0.02em;">{{label}}: {{value}}</div> |
| 46 |
{{/store.tax_ids}} |
| 47 |
</div> |
| 48 |
|
| 49 |
<!-- ── Document title between hairline rules ─────────────── --> |
| 50 |
<div style="display: flex; align-items: center; gap: 18px; margin: 26px 0 6px;"> |
| 51 |
<div style="flex: 1; height: 0; border-top: 1px solid #111;"></div> |
| 52 |
<div style="font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; font-size: 11px; letter-spacing: 0.42em; text-transform: uppercase; color: #111; font-weight: 600;">{{i18n.gift_receipt}}</div> |
| 53 |
<div style="flex: 1; height: 0; border-top: 1px solid #111;"></div> |
| 54 |
</div> |
| 55 |
|
| 56 |
<!-- ── Order meta strip ─────────────── --> |
| 57 |
<div style="display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 14px 0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; font-size: 12px;"> |
| 58 |
<div><span style="color: #6b6b6b;">{{i18n.order}}</span> <strong>#{{order.number}}</strong></div> |
| 59 |
<div><span style="color: #6b6b6b;">{{i18n.date}}</span> <strong>{{order.created.datetime_long}}</strong></div> |
| 60 |
{{#cashier.name}} |
| 61 |
<div><span style="color: #6b6b6b;">{{i18n.cashier}}</span> <strong>{{cashier.name}}</strong></div> |
| 62 |
{{/cashier.name}} |
| 63 |
{{#customer.name}} |
| 64 |
<div><span style="color: #6b6b6b;">{{i18n.customer}}</span> <strong>{{customer.name}}</strong></div> |
| 65 |
{{/customer.name}} |
| 66 |
</div> |
| 67 |
|
| 68 |
<!-- ── Items: name + attributes + SKU + qty (no prices) ─────────────── --> |
| 69 |
<table style="width: 100%; border-collapse: collapse; margin-top: 14px; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;"> |
| 70 |
<thead> |
| 71 |
<tr> |
| 72 |
<th style="text-align: left; padding: 10px 8px 10px 0; font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: #6b6b6b; border-top: 1.5px solid #111; border-bottom: 1px solid #111; font-weight: 600;">{{i18n.item}}</th> |
| 73 |
<th style="text-align: left; padding: 10px 8px; font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: #6b6b6b; border-top: 1.5px solid #111; border-bottom: 1px solid #111; font-weight: 600; width: 130px; white-space: nowrap;">{{i18n.sku}}</th> |
| 74 |
<th style="text-align: right; padding: 10px 0 10px 8px; font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: #6b6b6b; border-top: 1.5px solid #111; border-bottom: 1px solid #111; font-weight: 600; width: 56px; white-space: nowrap;">{{i18n.qty}}</th> |
| 75 |
</tr> |
| 76 |
</thead> |
| 77 |
<tbody> |
| 78 |
{{#lines}} |
| 79 |
<tr> |
| 80 |
<td style="padding: 10px 8px 10px 0; vertical-align: top; border-bottom: 1px solid #e5e5e5;"> |
| 81 |
<div style="font-size: 14px; color: #111;">{{name}}</div> |
| 82 |
{{#attributes}}<div style="font-size: 11px; color: #6b6b6b; margin-top: 2px;">{{key}}: {{value}}</div>{{/attributes}} |
| 83 |
</td> |
| 84 |
<td style="padding: 10px 8px; vertical-align: top; border-bottom: 1px solid #e5e5e5; font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 11px; color: #6b6b6b;">{{#sku}}{{sku}}{{/sku}}</td> |
| 85 |
<td style="padding: 10px 0 10px 8px; vertical-align: top; border-bottom: 1px solid #e5e5e5; text-align: right; font-variant-numeric: tabular-nums; font-size: 14px;">{{qty}}</td> |
| 86 |
</tr> |
| 87 |
{{/lines}} |
| 88 |
</tbody> |
| 89 |
</table> |
| 90 |
|
| 91 |
<!-- ── Gift message (only when present) ─────────────── --> |
| 92 |
{{#order.customer_note}} |
| 93 |
<div style="margin-top: 22px; padding-left: 14px; border-left: 3px solid #111;"> |
| 94 |
<div style="font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; color: #6b6b6b; font-weight: 600; margin-bottom: 6px;">{{i18n.a_message_for_you}}</div> |
| 95 |
<div style="font-style: italic; font-size: 15px; line-height: 1.6; white-space: pre-wrap;">{{order.customer_note}}</div> |
| 96 |
</div> |
| 97 |
{{/order.customer_note}} |
| 98 |
|
| 99 |
<!-- ── Personal notes (only when present) ─────────────── --> |
| 100 |
{{#store.personal_notes}} |
| 101 |
<div style="margin-top: 18px; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; font-size: 12px; color: #4b4b4b; line-height: 1.55; white-space: pre-wrap;">{{store.personal_notes}}</div> |
| 102 |
{{/store.personal_notes}} |
| 103 |
|
| 104 |
<!-- ── Footer: return policy + repeated order reference ─────────────── --> |
| 105 |
<div style="margin-top: 30px; padding-top: 14px; border-top: 1px solid #111; display: flex; justify-content: space-between; align-items: baseline; gap: 18px; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; font-size: 11px; color: #4b4b4b;"> |
| 106 |
<div style="flex: 1; line-height: 1.55; white-space: pre-wrap;"> |
| 107 |
{{#store.policies_and_conditions}}{{store.policies_and_conditions}}{{/store.policies_and_conditions}} |
| 108 |
{{^store.policies_and_conditions}}{{i18n.gift_return_policy}}{{/store.policies_and_conditions}} |
| 109 |
</div> |
| 110 |
<div style="font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; letter-spacing: 0.06em; white-space: nowrap;">#{{order.number}} · {{order.created.date_ymd}}</div> |
| 111 |
</div> |
| 112 |
|
| 113 |
{{#store.footer_imprint}} |
| 114 |
<div style="margin-top: 12px; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; font-size: 11px; color: #6b6b6b; text-align: center; white-space: pre-wrap;">{{store.footer_imprint}}</div> |
| 115 |
{{/store.footer_imprint}} |
| 116 |
|
| 117 |
</div> |
| 118 |
|