PluginProbe
WCPOS – Point of Sale (POS) plugin for WooCommerce / 1.10.16
WCPOS – Point of Sale (POS) plugin for WooCommerce v1.10.16
1.10.19 1.10.18 1.10.17 1.10.16 1.10.15 1.10.13 1.10.14 1.10.12 1.10.11 1.10.10 1.10.9 1.10.8 untagged-3d9b7ccddc54df87c672 1.10.7 1.10.6 1.10.5 1.10.3 1.10.4 1.10.2 1.10.1 1.10.0 1.9.17 1.9.15 1.9.16 1.9.14 All 163 releases
woocommerce-pos / includes / Templates / Gallery_Registry.php

Gallery_Registry.php in WCPOS – Point of Sale (POS) plugin for WooCommerce 1.10.16, at includes/Templates/Gallery_Registry.php

226 lines 10.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Gallery Template Registry.
4 *
5 * Translatable catalogue of bundled receipt/report templates. Returned per
6 * request so locale changes produce the right translation. Content lives
7 * in sibling files (templates/gallery/<key>.html|xml|php) located by
8 * Templates::get_gallery_templates().
9 *
10 * @package WCPOS\WooCommercePOS\Templates
11 */
12
13 namespace WCPOS\WooCommercePOS\Templates;
14
15 /**
16 * Gallery_Registry class.
17 */
18 class Gallery_Registry {
19
20 /**
21 * Return the full gallery template catalogue keyed by template key.
22 *
23 * @return array<string,array<string,mixed>>
24 */
25 public static function all(): array {
26 return array(
27 'detailed-receipt' => array(
28 /* translators: Gallery template name shown in the admin Template Gallery. */
29 'title' => __( 'Detailed Receipt', 'woocommerce-pos' ),
30 /* translators: Gallery template description shown in the admin Template Gallery. */
31 'description' => __( 'Extended info with SKU, unit price, full tax breakdown, customer address, and cashier details.', 'woocommerce-pos' ),
32 'type' => 'receipt',
33 'category' => 'receipt',
34 'engine' => 'logicless',
35 'output_type' => 'html',
36 'paper_width' => null,
37 'version' => 1,
38 'preview_data' => 'base-receipt',
39 ),
40 'gift-receipt' => array(
41 /* translators: Gallery template name shown in the admin Template Gallery. */
42 'title' => __( 'Gift Receipt', 'woocommerce-pos' ),
43 /* translators: Gallery template description shown in the admin Template Gallery. */
44 'description' => __( 'Items listed without prices. Includes gift message from customer note and return reference.', 'woocommerce-pos' ),
45 'type' => 'receipt',
46 'category' => 'gift-receipt',
47 'engine' => 'logicless',
48 'output_type' => 'html',
49 'paper_width' => null,
50 'version' => 1,
51 'preview_data' => 'gift-receipt',
52 ),
53 'invoice' => array(
54 /* translators: Gallery template name shown in the admin Template Gallery. */
55 'title' => __( 'Invoice', 'woocommerce-pos' ),
56 /* translators: Gallery template description shown in the admin Template Gallery. */
57 'description' => __( 'Full-page A4/Letter invoice with bill-to/ship-to addresses, an itemised products table, and an optional "How to pay" panel (bank transfer + QR-encoded order-pay URL) shown when the order still needs payment.', 'woocommerce-pos' ),
58 'type' => 'receipt',
59 'category' => 'invoice',
60 'engine' => 'logicless',
61 'output_type' => 'html',
62 'paper_width' => null,
63 'version' => 1,
64 'preview_data' => 'invoice',
65 ),
66 'minimal-receipt' => array(
67 /* translators: Gallery template name shown in the admin Template Gallery. */
68 'title' => __( 'Minimal / Modern', 'woocommerce-pos' ),
69 /* translators: Gallery template description shown in the admin Template Gallery. */
70 'description' => __( 'Compact receipt with a centered store header, bold double-border order band and dense item rows. Same essentials as Standard, less vertical space.', 'woocommerce-pos' ),
71 'type' => 'receipt',
72 'category' => 'receipt',
73 'engine' => 'logicless',
74 'output_type' => 'html',
75 'paper_width' => null,
76 'version' => 1,
77 'preview_data' => 'base-receipt',
78 ),
79 'narrow-receipt' => array(
80 /* translators: Gallery template name shown in the admin Template Gallery. */
81 'title' => __( 'Narrow Receipt', 'woocommerce-pos' ),
82 /* translators: Gallery template description shown in the admin Template Gallery. */
83 'description' => __( 'Compact monospace receipt sized for narrow paper or HTML-capable thermal printers. Prints cleanly in black and white.', 'woocommerce-pos' ),
84 'type' => 'receipt',
85 'category' => 'receipt',
86 'engine' => 'logicless',
87 'output_type' => 'html',
88 'version' => 1,
89 'preview_data' => 'base-receipt',
90 ),
91 'packing-slip' => array(
92 /* translators: Gallery template name shown in the admin Template Gallery. */
93 'title' => __( 'Packing Slip', 'woocommerce-pos' ),
94 /* translators: Gallery template description shown in the admin Template Gallery. */
95 'description' => __( 'Fulfillment companion with items and quantities only. No pricing. Shipping address prominent.', 'woocommerce-pos' ),
96 'type' => 'receipt',
97 'category' => 'receipt',
98 'engine' => 'logicless',
99 'output_type' => 'html',
100 'paper_width' => null,
101 'version' => 1,
102 'preview_data' => 'packing-slip',
103 ),
104 'quote' => array(
105 /* translators: Gallery template name shown in the admin Template Gallery. */
106 'title' => __( 'Quote / Estimate', 'woocommerce-pos' ),
107 /* translators: Gallery template description shown in the admin Template Gallery. */
108 'description' => __( 'Pre-sale document with items and pricing. No payment section. Includes validity notice and terms.', 'woocommerce-pos' ),
109 'type' => 'receipt',
110 'category' => 'purchase-order',
111 'engine' => 'logicless',
112 'output_type' => 'html',
113 'paper_width' => null,
114 'version' => 1,
115 'preview_data' => 'quote',
116 ),
117 'standard-receipt' => array(
118 /* translators: Gallery template name shown in the admin Template Gallery. */
119 'title' => __( 'Standard Receipt', 'woocommerce-pos' ),
120 /* translators: Gallery template description shown in the admin Template Gallery. */
121 'description' => __( 'Streamlined receipt with logo, store info, itemized lines, totals and payment — covers what most stores need without the kitchen sink.', 'woocommerce-pos' ),
122 'type' => 'receipt',
123 'category' => 'receipt',
124 'engine' => 'logicless',
125 'output_type' => 'html',
126 'paper_width' => null,
127 'version' => 1,
128 'preview_data' => 'base-receipt',
129 ),
130 'standard-receipt-rtl' => array(
131 /* translators: Gallery template name shown in the admin Template Gallery. The (RTL) suffix marks right-to-left layout. */
132 'title' => __( 'Standard Receipt (RTL)', 'woocommerce-pos' ),
133 /* translators: Gallery template description shown in the admin Template Gallery. */
134 'description' => __( 'Right-to-left version of the Standard Receipt for Arabic, Hebrew, Persian and Urdu sites. Mirrors layout and uses an RTL-friendly font stack.', 'woocommerce-pos' ),
135 'type' => 'receipt',
136 'category' => 'receipt',
137 'direction' => 'rtl',
138 'engine' => 'logicless',
139 'output_type' => 'html',
140 'paper_width' => null,
141 'version' => 1,
142 'preview_data' => 'standard-receipt-rtl',
143 ),
144 'thermal-detailed-58mm' => array(
145 /* translators: Gallery template name shown in the admin Template Gallery. */
146 'title' => __( 'Detailed Thermal Receipt (58mm)', 'woocommerce-pos' ),
147 /* translators: Gallery template description shown in the admin Template Gallery. */
148 'description' => __( 'Kitchen-sink 58mm receipt: full customer + addresses, tax breakdown, refunds, payments, terms and order barcode.', 'woocommerce-pos' ),
149 'type' => 'receipt',
150 'category' => 'receipt',
151 'engine' => 'thermal',
152 'output_type' => 'escpos',
153 'paper_width' => '58mm',
154 'version' => 1,
155 'preview_data' => 'base-receipt',
156 ),
157 'thermal-detailed-80mm' => array(
158 /* translators: Gallery template name shown in the admin Template Gallery. */
159 'title' => __( 'Detailed Thermal Receipt (80mm)', 'woocommerce-pos' ),
160 /* translators: Gallery template description shown in the admin Template Gallery. */
161 'description' => __( 'Kitchen-sink 80mm receipt: full customer + addresses, tax breakdown, refunds, payments, terms and order barcode.', 'woocommerce-pos' ),
162 'type' => 'receipt',
163 'category' => 'receipt',
164 'engine' => 'thermal',
165 'output_type' => 'escpos',
166 'paper_width' => '80mm',
167 'version' => 1,
168 'preview_data' => 'base-receipt',
169 ),
170 'thermal-kitchen-ticket' => array(
171 /* translators: Gallery template name shown in the admin Template Gallery. */
172 'title' => __( 'Kitchen Ticket', 'woocommerce-pos' ),
173 /* translators: Gallery template description shown in the admin Template Gallery. */
174 'description' => __( 'Order items only with large font, no pricing. Designed for kitchen display or prep stations.', 'woocommerce-pos' ),
175 'type' => 'receipt',
176 'category' => 'kitchen-ticket',
177 'engine' => 'thermal',
178 'output_type' => 'escpos',
179 'paper_width' => '80mm',
180 'version' => 1,
181 'preview_data' => 'thermal-kitchen-ticket',
182 ),
183 'thermal-simple-58mm' => array(
184 /* translators: Gallery template name shown in the admin Template Gallery. */
185 'title' => __( 'Simple Thermal Receipt (58mm)', 'woocommerce-pos' ),
186 /* translators: Gallery template description shown in the admin Template Gallery. */
187 'description' => __( 'Clean, minimal thermal receipt for narrow 58mm paper. Same layout as 80mm, adjusted for 32-character width.', 'woocommerce-pos' ),
188 'type' => 'receipt',
189 'category' => 'receipt',
190 'engine' => 'thermal',
191 'output_type' => 'escpos',
192 'paper_width' => '58mm',
193 'version' => 1,
194 'preview_data' => 'base-receipt',
195 ),
196 'thermal-simple-80mm' => array(
197 /* translators: Gallery template name shown in the admin Template Gallery. */
198 'title' => __( 'Simple Thermal Receipt (80mm)', 'woocommerce-pos' ),
199 /* translators: Gallery template description shown in the admin Template Gallery. */
200 'description' => __( 'Clean, minimal thermal receipt for standard 80mm paper. Store header, line items, totals, and barcode.', 'woocommerce-pos' ),
201 'type' => 'receipt',
202 'category' => 'receipt',
203 'engine' => 'thermal',
204 'output_type' => 'escpos',
205 'paper_width' => '80mm',
206 'version' => 1,
207 'preview_data' => 'base-receipt',
208 ),
209 'thermal-simple-80mm-rtl' => array(
210 /* translators: Gallery template name shown in the admin Template Gallery. The (RTL) suffix marks right-to-left layout. */
211 'title' => __( 'Simple Thermal Receipt 80mm (RTL)', 'woocommerce-pos' ),
212 /* translators: Gallery template description shown in the admin Template Gallery. CP864 / Windows-1256 are printer codepages; keep them verbatim. */
213 'description' => __( 'Right-to-left thermal receipt for 80mm printers. Mirrors column alignments for Arabic, Hebrew, Persian and Urdu. Requires a printer that supports an Arabic codepage (CP864 or Windows-1256) — check your printer\'s manual before ordering.', 'woocommerce-pos' ),
214 'type' => 'receipt',
215 'category' => 'receipt',
216 'direction' => 'rtl',
217 'engine' => 'thermal',
218 'output_type' => 'escpos',
219 'paper_width' => '80mm',
220 'version' => 1,
221 'preview_data' => 'standard-receipt-rtl',
222 ),
223 );
224 }
225 }
226