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 / Processing / ShoePicks.php

ShoePicks.php in YayMail – WooCommerce Email Customizer trunk, at src/TemplateLibrary/Templates/Processing/ShoePicks.php

642 lines 37.2 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\Processing;
4
5 use YayMail\Abstracts\BaseTemplate;
6 use YayMail\Elements\BillingAddress;
7 use YayMail\Elements\Button;
8 use YayMail\Elements\Column;
9 use YayMail\Elements\ColumnLayout;
10 use YayMail\Elements\Divider;
11 use YayMail\Elements\FeaturedProducts;
12 use YayMail\Elements\Logo;
13 use YayMail\Elements\OrderDetails;
14 use YayMail\Elements\ShippingAddress;
15 use YayMail\Elements\SocialIcon;
16 use YayMail\Elements\Text;
17 use YayMail\Utils\SingletonTrait;
18
19 /**
20 * Shoe Picks template for Processing Order email.
21 */
22 class ShoePicks extends BaseTemplate {
23 use SingletonTrait;
24
25 public function __construct() {
26 parent::__construct();
27 $this->id = 'processing_order_v7';
28 $this->email_type = 'customer_processing_order';
29 $this->name = 'Shoe Picks';
30 $this->description = 'Includes recommended shoes.';
31 $this->categories = [ 'Purple Collection', 'Shoes Collection' ];
32 $this->template_settings = [
33 'text_link_color' => '#1A1A1A',
34 ];
35 $this->modified_date = '2026-07-21';
36 $this->access = 'free';
37
38 $body_section = self::with_margin(
39 ColumnLayout::get_object_data(
40 1,
41 [
42 'children' => [
43 Column::get_object_data(
44 100,
45 [
46 'children' => [
47 Text::get_object_data(
48 [
49 'padding' => [
50 'top' => 10,
51 'right' => '24',
52 'bottom' => '8',
53 'left' => '24',
54 ],
55 'background_color' => '#fffcf7',
56 'font_family' => '"Outfit", "DM Sans", sans-serif',
57 'text_color' => '#333439',
58 'rich_text' => '<p><span style="font-size: 16px">Hi [yaymail_billing_first_name],</span></p>
59 <p></p>
60 <p><span style="font-size: 16px">Thanks for your purchase! We have received your order #[yaymail_order_id is_plain="true"] and your order will be shipped within 24–48 hours.</span></p>
61 <p></p>
62 <p><span style="font-size: 16px">Best regards,<br />The <strong>[yaymail_site_name]</strong> Team</span></p>',
63 ]
64 ),
65 Divider::get_object_data(
66 [
67 'padding' => [
68 'top' => '15',
69 'right' => 24,
70 'bottom' => '15',
71 'left' => 24,
72 ],
73 'height' => 1,
74 'background_color' => '#fffcf7',
75 'divider_color' => '#000000',
76 ]
77 ),
78 OrderDetails::get_object_data(
79 [
80 'padding' => [
81 'top' => '8',
82 'right' => '24',
83 'bottom' => '8',
84 'left' => '24',
85 ],
86 'background_color' => '#fffcf7',
87 'border' => [
88 'side' => 'none',
89 'width' => '2',
90 'style' => 'solid',
91 'color' => '#000000',
92 ],
93 'layout_type' => 'modern',
94 'title' => '<div><span style="font-size: 30px;font-weight: bold">Order Summary</span></div>',
95 'title_color' => '#1A1A1A',
96 'text_color' => '#333439',
97 'border_color' => '#1a1a1a1f',
98 'font_family' => '"Outfit", "DM Sans", sans-serif',
99 'table_heading_font_size' => '12',
100 'product_title' => 'PRODUCT',
101 'cost_title' => 'COST',
102 'quantity_title' => 'QUANTITY',
103 'price_title' => 'PRICE',
104 ]
105 ),
106 Button::get_object_data(
107 [
108 'padding' => [
109 'top' => 10,
110 'right' => '24',
111 'bottom' => 10,
112 'left' => '24',
113 ],
114 'background_color' => '#fffcf7',
115 'width' => '100%',
116 'button_background_color' => '#9500ff',
117 'border' => [
118 'side' => 'all',
119 'width' => '2',
120 'style' => 'solid',
121 'color' => '#9500ff',
122 ],
123 'border_radius' => [
124 'top_left' => '0',
125 'top_right' => '0',
126 'bottom_right' => '0',
127 'bottom_left' => '0',
128 ],
129 'text' => 'View Your Order',
130 'url' => '[yaymail_order_url]',
131 'font_size' => '16',
132 'weight' => '600',
133 'font_family' => '"Outfit", "DM Sans", sans-serif',
134 ]
135 ),
136 ],
137 ]
138 ),
139 ],
140 'padding' => [
141 'top' => '15',
142 'right' => '0',
143 'bottom' => 20,
144 'left' => '0',
145 ],
146 'background_color' => '#fffcf7',
147 'border' => [
148 'side' => 'all',
149 'width' => 4,
150 'style' => 'solid',
151 'color' => '#000000',
152 ],
153 ]
154 ),
155 self::section_margin()
156 );
157
158 $address_section = self::with_margin(
159 ColumnLayout::get_object_data(
160 2,
161 [
162 'children' => [
163 Column::get_object_data(
164 50,
165 [
166 'children' => [
167 ShippingAddress::get_object_data(
168 [
169 'padding' => [
170 'top' => '15',
171 'right' => 0,
172 'bottom' => '15',
173 'left' => 0,
174 ],
175 'background_color' => '#fffcf7',
176 'layout_type' => 'modern',
177 'title_color' => '#1a1a1a',
178 'text_color' => '#1a1a1a',
179 'font_family' => 'Helvetica,Roboto,Arial,sans-serif',
180 'title' => '<div style="text-align: center"><span style="font-size: 20px;font-weight: 600">Shipping Address</span></div>',
181 'shipping_content_alignment' => 'center',
182 'shipping_content_text_format' => [
183 'bold' => false,
184 'italic' => false,
185 'underline' => false,
186 ],
187 ]
188 ),
189 ],
190 'border' => [
191 'side' => 'right',
192 'width' => '1',
193 'style' => 'solid',
194 'color' => '#0000001f',
195 'custom' => [
196 'top' => '1',
197 'right' => '1',
198 'bottom' => '1',
199 'left' => '1',
200 ],
201 ],
202 ]
203 ),
204 Column::get_object_data(
205 50,
206 [
207 'children' => [
208 BillingAddress::get_object_data(
209 [
210 'padding' => [
211 'top' => '15',
212 'right' => 0,
213 'bottom' => '15',
214 'left' => 0,
215 ],
216 'background_color' => '#fffcf7',
217 'layout_type' => 'modern',
218 'title_color' => '#1a1a1a',
219 'text_color' => '#1a1a1a',
220 'font_family' => 'Helvetica,Roboto,Arial,sans-serif',
221 'title' => '<div style="text-align: center"><span style="font-size: 20px;font-weight: 600">Billing Address</span></div>',
222 'billing_content_alignment' => 'center',
223 'billing_content_text_format' => [
224 'bold' => false,
225 'italic' => false,
226 'underline' => false,
227 ],
228 ]
229 ),
230 ],
231 ]
232 ),
233 ],
234 'padding' => [
235 'top' => '15',
236 'right' => 24,
237 'bottom' => '15',
238 'left' => 24,
239 ],
240 'background_color' => '#fffcf7',
241 'border' => [
242 'side' => 'all',
243 'width' => 4,
244 'style' => 'solid',
245 'color' => '#000000',
246 ],
247 ]
248 ),
249 self::section_margin()
250 );
251
252 $featured_section = self::with_margin(
253 ColumnLayout::get_object_data(
254 1,
255 [
256 'children' => [
257 Column::get_object_data(
258 100,
259 [
260 'children' => [
261 FeaturedProducts::get_object_data(
262 [
263 'padding' => [
264 'top' => 10,
265 'right' => '24',
266 'bottom' => 10,
267 'left' => '24',
268 ],
269 'background_color' => '#fffcf7',
270 'text_color' => '#333439',
271 'font_family' => '"Outfit", "DM Sans", sans-serif',
272 'showing_items' => [
273 'top_content',
274 'product_image',
275 'product_name',
276 'product_price',
277 'buy_button',
278 ],
279 'top_content' => '<p style="text-align: center"><span style="font-size: 20px;font-weight: 800">Recommended For You</span></p>',
280 'sale_price_color' => '#1A1A1A',
281 'buy_button_label' => '',
282 'buy_button_background_color' => '#ffffff',
283 'buy_button_text_color' => '#1A1A1A',
284 'products_per_row' => '2',
285 'number_of_products' => 4,
286 ]
287 ),
288 Button::get_object_data(
289 [
290 'padding' => [
291 'top' => 10,
292 'right' => '24',
293 'bottom' => 10,
294 'left' => '24',
295 ],
296 'background_color' => '#fffcf7',
297 'width' => '100%',
298 'button_background_color' => '#fffcf7',
299 'text_color' => '#1A1A1A',
300 'border' => [
301 'side' => 'all',
302 'width' => '2',
303 'style' => 'solid',
304 'color' => '#1a1a1a',
305 ],
306 'border_radius' => [
307 'top_left' => '0',
308 'top_right' => '0',
309 'bottom_right' => '0',
310 'bottom_left' => '0',
311 ],
312 'text' => 'View All Products',
313 'font_size' => '16',
314 'weight' => '600',
315 'font_family' => '"Outfit", "DM Sans", sans-serif',
316 'url' => function_exists( 'wc_get_page_permalink' ) ? wc_get_page_permalink( 'shop' ) : home_url( '/' ),
317 ]
318 ),
319 ],
320 ]
321 ),
322 ],
323 'background_color' => '#fffcf7',
324 'border' => [
325 'side' => 'all',
326 'width' => 4,
327 'style' => 'solid',
328 'color' => '#000000',
329 ],
330 ]
331 ),
332 self::section_margin()
333 );
334
335 $this->elements = [
336 ColumnLayout::get_object_data(
337 1,
338 [
339 'children' => [
340 Column::get_object_data(
341 100,
342 [
343 'children' => [
344 ColumnLayout::get_object_data(
345 4,
346 [
347 'children' => [
348 Column::get_object_data(
349 29,
350 [
351 'children' => [
352 Logo::get_object_data(
353 [
354 'padding' => [
355 'top' => '10',
356 'right' => '10',
357 'bottom' => '10',
358 'left' => '0',
359 ],
360 'background_color' => '#FDE8F400',
361 'src' => 'https://images.wpbrandy.com/uploads/woocommerce-logo.png',
362 'align' => 'left',
363 'width' => '116',
364 'alt' => 'Store logo',
365 ]
366 ),
367 ],
368 ]
369 ),
370 Column::get_object_data(
371 34.49,
372 [
373 'children' => [
374 Text::get_object_data(
375 [
376 'padding' => [
377 'top' => '15',
378 'right' => '0',
379 'bottom' => '15',
380 'left' => '0',
381 ],
382 'background_color' => '#FDE8F400',
383 'font_family' => '"Outfit", "DM Sans", sans-serif',
384 'text_color' => '#333439',
385 'rich_text' => '<div style="text-align: right"><span style="font-size: 14px;font-weight: 400">My Account</span></div>',
386 ]
387 ),
388 ],
389 ]
390 ),
391 Column::get_object_data(
392 27.76,
393 [
394 'children' => [
395 Text::get_object_data(
396 [
397 'padding' => [
398 'top' => '15',
399 'right' => '0',
400 'bottom' => '15',
401 'left' => '0',
402 ],
403 'background_color' => '#FDE8F400',
404 'font_family' => '"Outfit", "DM Sans", sans-serif',
405 'text_color' => '#333439',
406 'rich_text' => '<div style="text-align: center"><span style="font-size: 14px;font-weight: 400">Order Tracking</span></div>',
407 ]
408 ),
409 ],
410 ]
411 ),
412 Column::get_object_data(
413 8.75,
414 [
415 'children' => [
416 Text::get_object_data(
417 [
418 'padding' => [
419 'top' => '15',
420 'right' => '2',
421 'bottom' => '15',
422 'left' => '0',
423 ],
424 'background_color' => '#FDE8F400',
425 'font_family' => '"Outfit", "DM Sans", sans-serif',
426 'text_color' => '#333439',
427 'rich_text' => '<div style="text-align: right"><span style="font-size: 14px;font-weight: 400">Contact</span></div>',
428 ]
429 ),
430 ],
431 ]
432 ),
433 ],
434 'padding' => [
435 'top' => '20',
436 'right' => 0,
437 'bottom' => '20',
438 'left' => 0,
439 ],
440 'background_color' => '#fde8f400',
441 ]
442 ),
443 ColumnLayout::get_object_data(
444 1,
445 [
446 'children' => [
447 Column::get_object_data(
448 100,
449 [
450 'children' => [
451 Text::get_object_data(
452 [
453 'padding' => [
454 'top' => 10,
455 'right' => '20',
456 'bottom' => 0,
457 'left' => '20',
458 ],
459 'background_color' => '#FFFDF500',
460 'border' => [
461 'side' => 'none',
462 'width' => '2',
463 'style' => 'solid',
464 'color' => '#000000',
465 ],
466 'font_family' => '"Outfit", "DM Sans", sans-serif',
467 'text_color' => '#1A1A1A',
468 'rich_text' => '<p><span style="background-color: #f8d293;color: #1a1a1a;font-size: 12px;font-weight: bold;padding: 4px 10px;display: inline-block;border: 2px solid #000000">ORDER CONFIRMED</span></p>',
469 ]
470 ),
471 Text::get_object_data(
472 [
473 'padding' => [
474 'top' => 0,
475 'right' => '20',
476 'bottom' => 0,
477 'left' => '20',
478 ],
479 'background_color' => '#FFFDF500',
480 'border' => [
481 'side' => 'none',
482 'width' => '2',
483 'style' => 'solid',
484 'color' => '#000000',
485 ],
486 'font_family' => '"Outfit", "DM Sans", sans-serif',
487 'text_color' => '#1A1A1A',
488 'rich_text' => '<h1 style="font-size: 36px;font-weight: 800;line-height: 1.1 !important;color: #1a1a1a;margin: 16px 0 12px"><span style="font-size: 64px;font-weight: 800">New Order Received</span></h1>',
489 ]
490 ),
491 Text::get_object_data(
492 [
493 'padding' => [
494 'top' => 0,
495 'right' => '20',
496 'bottom' => 0,
497 'left' => '20',
498 ],
499 'background_color' => '#FFFDF500',
500 'border' => [
501 'side' => 'none',
502 'width' => '2',
503 'style' => 'solid',
504 'color' => '#000000',
505 ],
506 'font_family' => '"Outfit", "DM Sans", sans-serif',
507 'text_color' => '#1A1A1A',
508 'rich_text' => '<p><span style="font-size: 14px;font-weight: 400">Order placed on [yaymail_order_date]</span></p>
509 <p><span style="font-size: 14px;font-weight: 400">Number ID: #[yaymail_order_id is_plain="true"]</span></p>',
510 ]
511 ),
512 ],
513 ]
514 ),
515 ],
516 'vertical_align' => 'middle',
517 'padding' => [
518 'top' => 10,
519 'right' => '0',
520 'bottom' => 20,
521 'left' => '0',
522 ],
523 'background_color' => '#fffaf3',
524 'background_image' => [
525 'url' => 'https://images.wpbrandy.com/uploads/processing-7-img-2.png',
526 'position' => 'top_right',
527 'x_position' => 0,
528 'y_position' => 0,
529 'repeat' => 'no-repeat',
530 'size' => 'cover',
531 'custom_size' => 100,
532 ],
533 'border' => [
534 'side' => 'all',
535 'width' => '4',
536 'style' => 'solid',
537 'color' => '#000000',
538 ],
539 ]
540 ),
541 $body_section,
542 $address_section,
543 $featured_section,
544 ],
545 ]
546 ),
547 ],
548 'column_spacing' => 0,
549 'padding' => [
550 'top' => 0,
551 'right' => 50,
552 'bottom' => '15',
553 'left' => 50,
554 ],
555 'background_image' => [
556 'url' => 'https://images.wpbrandy.com/uploads/processing-7-img-1.png',
557 'position' => 'default',
558 'x_position' => 0,
559 'y_position' => 0,
560 'repeat' => 'default',
561 'size' => 'default',
562 ],
563 ]
564 ),
565 Text::get_object_data(
566 [
567 'padding' => [
568 'top' => '32',
569 'right' => '50',
570 'bottom' => '16',
571 'left' => '50',
572 ],
573 'background_color' => '#1A1A1A',
574 'font_family' => '"Outfit", "DM Sans", sans-serif',
575 'text_color' => '#ffffff',
576 'rich_text' => '<p style="text-align: center"><span style="font-size: 14px">Got questions? Check out our <u>Returns</u> &amp; <u>Refunds Policy</u> or contact <u>Here</u> for support. We\'re happy to help!</span></p>',
577 ]
578 ),
579 SocialIcon::get_object_data(
580 [
581 'padding' => [
582 'top' => 10,
583 'right' => '0',
584 'bottom' => 10,
585 'left' => '0',
586 ],
587 'background_color' => '#1A1A1A',
588 'width_icon' => '32',
589 'spacing' => '12',
590 'icon_list' => [
591 [
592 'icon' => 'facebook',
593 'url' => '#',
594 ],
595 [
596 'icon' => 'instagram',
597 'url' => '#',
598 ],
599 [
600 'icon' => 'tiktok',
601 'url' => '#',
602 ],
603 [
604 'icon' => 'youtube',
605 'url' => '#',
606 ],
607 ],
608 ]
609 ),
610 Text::get_object_data(
611 [
612 'padding' => [
613 'top' => '0',
614 'right' => '50',
615 'bottom' => '32',
616 'left' => '50',
617 ],
618 'background_color' => '#1A1A1A',
619 'font_family' => '"Outfit", "DM Sans", sans-serif',
620 'text_color' => '#B0B0B0',
621 'rich_text' => '<p style="text-align: center"><span style="font-size: 12px;font-weight: 400">© 2026 WooCommerce</span></p>',
622 ]
623 ),
624 ];
625 }
626
627 private static function section_margin(): array {
628 return [
629 'top' => '20',
630 'right' => '0',
631 'bottom' => '20',
632 'left' => '0',
633 ];
634 }
635
636 private static function with_margin( array $element, array $margin ): array {
637 $element['data']['margin'] = $margin;
638
639 return $element;
640 }
641 }
642