PluginProbe
YayMail – WooCommerce Email Customizer / trunk
YayMail – WooCommerce Email Customizer vtrunk
4.4.4 4.4.3 4.4.2 4.4.1 trunk 1.9.6 2.1.4 2.1.5 3.2.2 3.2.6 3.2.7.1 3.2.8.1 3.2.9 3.3 3.3.1 3.3.4 3.3.5 3.3.6 3.3.7 3.3.8 3.3.9 3.4 3.4.1 3.4.2 3.4.3 All 55 releases
yaymail / src / TemplateLibrary / Templates / NewOrder / Modern.php

Modern.php in YayMail – WooCommerce Email Customizer trunk, at src/TemplateLibrary/Templates/NewOrder/Modern.php

349 lines 16.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace YayMail\TemplateLibrary\Templates\NewOrder;
4
5 use YayMail\Abstracts\BaseTemplate;
6 use YayMail\Elements\BillingShippingAddress;
7 use YayMail\Elements\Divider;
8 use YayMail\Elements\Footer;
9 use YayMail\Elements\Heading;
10 use YayMail\Elements\OrderDetails;
11 use YayMail\Elements\Text;
12 use YayMail\Utils\SingletonTrait;
13
14 /**
15 * Modern template for New Order email.
16 */
17 class Modern extends BaseTemplate {
18 use SingletonTrait;
19
20 public function __construct() {
21 parent::__construct();
22 $this->id = 'new_order_modern';
23 $this->email_type = 'new_order';
24 $this->name = 'Modern';
25 $this->description = 'Clean layout with plenty of whitespace';
26 $this->elements = [
27 Text::get_object_data(
28 [
29 'padding' => [
30 'top' => 20,
31 'right' => '50',
32 'bottom' => 0,
33 'left' => '50',
34 ],
35 'background_color' => '#fff',
36 'border' => [
37 'side' => 'none',
38 'width' => '1',
39 'style' => 'solid',
40 'color' => '#e5e5e5',
41 'custom' => [
42 'top' => '1',
43 'right' => '1',
44 'bottom' => '1',
45 'left' => '1',
46 ],
47 ],
48 'font_family' => 'Helvetica,Roboto,Arial,sans-serif',
49 'text_color' => '#720eec',
50 'rich_text' => '<p><span style="font-size: 16px">[yaymail_site_name]</span></p>',
51 ]
52 ),
53 Heading::get_object_data(
54 [
55 'padding' => [
56 'top' => '15',
57 'right' => '50',
58 'bottom' => '15',
59 'left' => '50',
60 ],
61 'background_color' => '#fff',
62 'border' => [
63 'side' => 'none',
64 'width' => '1',
65 'style' => 'solid',
66 'color' => '#e5e5e5',
67 'custom' => [
68 'top' => '1',
69 'right' => '1',
70 'bottom' => '1',
71 'left' => '1',
72 ],
73 ],
74 'font_family' => 'Helvetica,Roboto,Arial,sans-serif',
75 'text_color' => '#3c3c3c',
76 'rich_text' => '<p><strong><span style="font-size: 30px">New Order: #[yaymail_order_number is_plain="true"]</span></strong></p>',
77 ]
78 ),
79 Text::get_object_data(
80 [
81 'container_group_definition' => [
82 'component' => 'GroupDefinition',
83 'title' => 'Container settings',
84 'description' => 'Handle container layout settings',
85 ],
86 'padding' => [
87 'top' => 0,
88 'right' => '50',
89 'bottom' => 0,
90 'left' => '50',
91 ],
92 'background_color' => '#fff',
93 'border' => [
94 'side' => 'none',
95 'width' => '1',
96 'style' => 'solid',
97 'color' => '#e5e5e5',
98 'custom' => [
99 'top' => '1',
100 'right' => '1',
101 'bottom' => '1',
102 'left' => '1',
103 ],
104 ],
105 'content_breaker' => [
106 'component' => 'LineBreaker',
107 ],
108 'content_group_definition' => [
109 'component' => 'GroupDefinition',
110 'title' => 'Content settings',
111 'description' => 'Handle content settings',
112 ],
113 'font_family' => 'Helvetica,Roboto,Arial,sans-serif',
114 'text_color' => '#636363',
115 'rich_text' => '<p><span style="font-size: 16px">You\'ve received the following order from [yaymail_billing_first_name] [yaymail_billing_last_name]</span></p>',
116 ]
117 ),
118 Text::get_object_data(
119 [
120 'container_group_definition' => [
121 'component' => 'GroupDefinition',
122 'title' => 'Container settings',
123 'description' => 'Handle container layout settings',
124 ],
125 'padding' => [
126 'top' => '15',
127 'right' => '50',
128 'bottom' => '15',
129 'left' => '50',
130 ],
131 'background_color' => '#fff',
132 'border' => [
133 'side' => 'none',
134 'width' => '1',
135 'style' => 'solid',
136 'color' => '#e5e5e5',
137 'custom' => [
138 'top' => '1',
139 'right' => '1',
140 'bottom' => '1',
141 'left' => '1',
142 ],
143 ],
144 'content_breaker' => [
145 'component' => 'LineBreaker',
146 ],
147 'content_group_definition' => [
148 'component' => 'GroupDefinition',
149 'title' => 'Content settings',
150 'description' => 'Handle content settings',
151 ],
152 'font_family' => 'Helvetica,Roboto,Arial,sans-serif',
153 'text_color' => '#636363',
154 'rich_text' => '<p><span style="font-size: 16px">Your order has been received and is now being processed. Your order details are shown below for your reference.</span></p>',
155 ]
156 ),
157 OrderDetails::get_object_data(
158 [
159 'rich_text' => '[yaymail_order_details]',
160 'payment_instructions' => '[yaymail_payment_instructions]',
161 'container_group_definition' => [
162 'component' => 'GroupDefinition',
163 'title' => 'Container settings',
164 'description' => 'Handle container layout settings',
165 ],
166 'padding' => [
167 'top' => '15',
168 'right' => '50',
169 'bottom' => '15',
170 'left' => '50',
171 ],
172 'background_color' => '#fff',
173 'border' => [
174 'side' => 'none',
175 'width' => '1',
176 'style' => 'solid',
177 'color' => '#e5e5e5',
178 'custom' => [
179 'top' => '1',
180 'right' => '1',
181 'bottom' => '1',
182 'left' => '1',
183 ],
184 ],
185 'table_setting_breaker' => [
186 'component' => 'LineBreaker',
187 ],
188 'table_group_definition' => [
189 'component' => 'GroupDefinition',
190 'title' => 'Table settings',
191 'description' => 'Handle table settings',
192 ],
193 'layout_type' => 'modern',
194 'title' => '<p><strong><span style="font-size: 20px">Order summary</span></strong></p><p><span style="font-size: 14px">Order #[yaymail_order_number] ([yaymail_order_date])</span></p>',
195 'title_color' => '#3c3c3c',
196 'text_color' => '#636363',
197 'border_color' => '#e5e5e5',
198 'font_family' => 'Helvetica,Roboto,Arial,sans-serif',
199 'table_content_font_size' => '16',
200 'table_heading_line_breaker' => [
201 'component' => 'LineBreaker',
202 ],
203 'table_heading_group_definition' => [
204 'component' => 'GroupDefinition',
205 'title' => 'Table heading settings',
206 'description' => 'Handle table heading settings',
207 ],
208 'table_heading_font_size' => '16',
209 'show_table_header' => 1,
210 'product_title' => 'Product',
211 'cost_title' => 'Cost',
212 'quantity_title' => 'Quantity',
213 'price_title' => 'Price',
214 'cart_subtotal_title' => 'Subtotal:',
215 'payment_method_title' => 'Payment method:',
216 'order_total_title' => 'Total:',
217 'order_note_title' => 'Note:',
218 'shipping_title' => 'Shipping: [yaymail_shipping_method]',
219 'discount_title' => 'Discount:',
220 'custom_footer_rows_breaker' => [
221 'component' => 'LineBreaker',
222 ],
223 'custom_footer_rows_group' => [
224 'component' => 'GroupDefinition',
225 'title' => 'Custom Footer Rows',
226 'description' => 'Add custom rows to the order totals footer',
227 ],
228 'custom_footer_rows' => [],
229 ]
230 ),
231 BillingShippingAddress::get_object_data(
232 [
233 'container_group_definition' => [
234 'component' => 'GroupDefinition',
235 'title' => 'Container settings',
236 'description' => 'Handle container layout settings',
237 ],
238 'padding' => [
239 'top' => '15',
240 'right' => '50',
241 'bottom' => '15',
242 'left' => '50',
243 ],
244 'background_color' => '#fff',
245 'content_breaker' => [
246 'component' => 'LineBreaker',
247 ],
248 'content_group_definition' => [
249 'component' => 'GroupDefinition',
250 'title' => 'Content settings',
251 'description' => 'Handle content settings',
252 ],
253 'layout_type' => 'modern',
254 'title_color' => '#3c3c3c',
255 'text_color' => '#636363',
256 'border_color' => '#e5e5e5',
257 'font_family' => 'Helvetica,Roboto,Arial,sans-serif',
258 'billing_title' => '<p><span style="font-size: 16px; font-weight: 600;">Billing address</span></p>',
259 'shipping_title' => '<p><span style="font-size: 16px; font-weight: 600;">Shipping address</span></p>',
260 'shipping_address_content' => '[yaymail_shipping_address]',
261 'billing_address_content' => '[yaymail_billing_address]',
262 ]
263 ),
264 Text::get_object_data(
265 [
266 'container_group_definition' => [
267 'component' => 'GroupDefinition',
268 'title' => 'Container settings',
269 'description' => 'Handle container layout settings',
270 ],
271 'padding' => [
272 'top' => '0',
273 'right' => '50',
274 'bottom' => 15,
275 'left' => '50',
276 ],
277 'background_color' => '#fff',
278 'border' => [
279 'side' => 'none',
280 'width' => '1',
281 'style' => 'solid',
282 'color' => '#e5e5e5',
283 'custom' => [
284 'top' => '1',
285 'right' => '1',
286 'bottom' => '1',
287 'left' => '1',
288 ],
289 ],
290 'content_breaker' => [
291 'component' => 'LineBreaker',
292 ],
293 'content_group_definition' => [
294 'component' => 'GroupDefinition',
295 'title' => 'Content settings',
296 'description' => 'Handle content settings',
297 ],
298 'font_family' => 'Helvetica,Roboto,Arial,sans-serif',
299 'text_color' => '#636363',
300 'rich_text' => '<p style="text-align: center"><span style="font-size: 16px">Congratulations on the sale.</span></p><br/><p><span style="font-size: 16px">Process your orders on the go. <a href="http://woocommerce.com/mobile/?blog_id=0&amp;utm_campaign=deeplinks_promote_app&amp;utm_medium=email&amp;utm_source=localhost&amp;utm_term=0">Get the app.</a></span></p>',
301 ]
302 ),
303 Divider::get_object_data(
304 [
305 'align' => 'center',
306 'padding' => [
307 'top' => '15',
308 'right' => 0,
309 'bottom' => '15',
310 'left' => 0,
311 ],
312 'width' => '100',
313 'height' => 1,
314 'background_color' => '#ffffff',
315 'divider_color' => '#00000033',
316 'divider_type' => 'solid',
317 ]
318 ),
319 Footer::get_object_data(
320 [
321 'container_group_definition' => [
322 'component' => 'GroupDefinition',
323 'title' => 'Container settings',
324 'description' => 'Handle container layout settings',
325 ],
326 'padding' => [
327 'top' => '15',
328 'right' => '50',
329 'bottom' => '15',
330 'left' => '50',
331 ],
332 'background_color' => '#ffffff',
333 'content_breaker' => [
334 'component' => 'LineBreaker',
335 ],
336 'content_group_definition' => [
337 'component' => 'GroupDefinition',
338 'title' => 'Content settings',
339 'description' => 'Handle content settings',
340 ],
341 'text_color' => '#8a8a8a',
342 'font_family' => 'Helvetica,Roboto,Arial,sans-serif',
343 'rich_text' => '<p style="font-size: 14px;margin: 0px 0px 16px;text-align: center">[yaymail_site_name]&nbsp;- Built with <a style="font-weight: normal;text-decoration: underline" href="https://woocommerce.com" target="_blank" rel="noopener">WooCommerce</a></p>',
344 ]
345 ),
346 ];
347 }
348 }
349