PluginProbe
YayMail – WooCommerce Email Customizer / 4.4.5
YayMail – WooCommerce Email Customizer v4.4.5
4.4.6 4.4.5 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 All 57 releases
yaymail / src / TemplateLibrary / Templates / Completed / ModernMinimal.php

ModernMinimal.php in YayMail – WooCommerce Email Customizer 4.4.5, at src/TemplateLibrary/Templates/Completed/ModernMinimal.php

472 lines 24.6 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\Completed;
4
5 use YayMail\Abstracts\BaseTemplate;
6 use YayMail\Elements\BillingShippingAddress;
7 use YayMail\Elements\Column;
8 use YayMail\Elements\ColumnLayout;
9 use YayMail\Elements\Heading;
10 use YayMail\Elements\Image;
11 use YayMail\Elements\Logo;
12 use YayMail\Elements\OrderDetails;
13 use YayMail\Elements\OrderProgress;
14 use YayMail\Elements\SocialIcon;
15 use YayMail\Elements\Text;
16 use YayMail\Utils\SingletonTrait;
17
18 /**
19 * Modern Minimal template for Completed Order email.
20 */
21 class ModernMinimal extends BaseTemplate {
22 use SingletonTrait;
23
24 public function __construct() {
25 parent::__construct();
26 $this->id = 'completed_order_modern_minimal';
27 $this->email_type = 'customer_completed_order';
28 $this->name = 'Modern Minimal';
29 $this->description = 'Clean layout with plenty of whitespace';
30 $this->elements = [
31 ColumnLayout::get_object_data(
32 4,
33 [
34 'column_width' => [],
35 'column_spacing' => '0',
36 'vertical_align' => 'top',
37 'padding' => [
38 'top' => '15',
39 'right' => 50,
40 'bottom' => '15',
41 'left' => 50,
42 ],
43 'border_radius' => [
44 'top_left' => '0',
45 'top_right' => '0',
46 'bottom_left' => '0',
47 'bottom_right' => '0',
48 ],
49 'background_color' => '#fff',
50 'background_image' => [
51 'url' => '',
52 'position' => 'default',
53 'x_position' => 0,
54 'y_position' => 0,
55 'repeat' => 'default',
56 'size' => 'default',
57 ],
58 'inner_border_radius' => [
59 'top_left' => '0',
60 'top_right' => '0',
61 'bottom_left' => '0',
62 'bottom_right' => '0',
63 ],
64 'inner_background_color' => '#ffffff00',
65 'children' => [
66 Column::get_object_data(
67 29,
68 [
69 'children' => [
70 Logo::get_object_data(
71 [
72 'container_group_definition' => [
73 'component' => 'GroupDefinition',
74 'title' => 'Container settings',
75 'description' => 'Handle container layout settings',
76 ],
77 'padding' => [
78 'top' => 10,
79 'right' => 10,
80 'bottom' => 10,
81 'left' => 0,
82 ],
83 'background_color' => '#fff',
84 'image_breaker' => [
85 'component' => 'LineBreaker',
86 ],
87 'image_group_definition' => [
88 'component' => 'GroupDefinition',
89 'title' => 'Image settings',
90 'description' => 'Handle image settings',
91 ],
92 'src' => YAYMAIL_PLUGIN_URL . 'assets/images/woocommerce-logo.png',
93 'align' => 'left',
94 'width' => 116,
95 'url' => '#',
96 'alt' => '',
97 ]
98 ),
99 ],
100 ]
101 ),
102 Column::get_object_data(
103 25.59,
104 [
105 'children' => [
106 Text::get_object_data(
107 [
108 'container_group_definition' => [
109 'component' => 'GroupDefinition',
110 'title' => 'Container settings',
111 'description' => 'Handle container layout settings',
112 ],
113 'padding' => [
114 'top' => '15',
115 'right' => 0,
116 'bottom' => '15',
117 'left' => 0,
118 ],
119 'background_color' => '#fff',
120 'border' => [
121 'side' => 'none',
122 'width' => '1',
123 'style' => 'solid',
124 'color' => '#e5e5e5',
125 'custom' => [
126 'top' => '1',
127 'right' => '1',
128 'bottom' => '1',
129 'left' => '1',
130 ],
131 ],
132 'content_breaker' => [
133 'component' => 'LineBreaker',
134 ],
135 'content_group_definition' => [
136 'component' => 'GroupDefinition',
137 'title' => 'Content settings',
138 'description' => 'Handle content settings',
139 ],
140 'font_family' => 'Helvetica,Roboto,Arial,sans-serif',
141 'text_color' => '#000000',
142 'rich_text' => '<div style="text-align: right"><span style="font-size: 18px">My Account</span></div>',
143 ]
144 ),
145 ],
146 ]
147 ),
148 Column::get_object_data(
149 34.160,
150 [
151 'children' => [
152 Text::get_object_data(
153 [
154 'container_group_definition' => [
155 'component' => 'GroupDefinition',
156 'title' => 'Container settings',
157 'description' => 'Handle container layout settings',
158 ],
159 'padding' => [
160 'top' => '15',
161 'right' => 0,
162 'bottom' => '15',
163 'left' => 0,
164 ],
165 'background_color' => '#fff',
166 'border' => [
167 'side' => 'none',
168 'width' => '1',
169 'style' => 'solid',
170 'color' => '#e5e5e5',
171 'custom' => [
172 'top' => '1',
173 'right' => '1',
174 'bottom' => '1',
175 'left' => '1',
176 ],
177 ],
178 'content_breaker' => [
179 'component' => 'LineBreaker',
180 ],
181 'content_group_definition' => [
182 'component' => 'GroupDefinition',
183 'title' => 'Content settings',
184 'description' => 'Handle content settings',
185 ],
186 'font_family' => 'Helvetica,Roboto,Arial,sans-serif',
187 'text_color' => '#1a1a1a',
188 'rich_text' => '<div style="text-align: center"><span style="font-size: 18px;font-weight: 500">Order Tracking</span></div>',
189 ]
190 ),
191 ],
192 ]
193 ),
194 Column::get_object_data(
195 11.25,
196 [
197 'children' => [
198 Text::get_object_data(
199 [
200 'container_group_definition' => [
201 'component' => 'GroupDefinition',
202 'title' => 'Container settings',
203 'description' => 'Handle container layout settings',
204 ],
205 'padding' => [
206 'top' => '15',
207 'right' => 2,
208 'bottom' => '15',
209 'left' => 0,
210 ],
211 'background_color' => '#fff',
212 'border' => [
213 'side' => 'none',
214 'width' => '1',
215 'style' => 'solid',
216 'color' => '#e5e5e5',
217 'custom' => [
218 'top' => '1',
219 'right' => '1',
220 'bottom' => '1',
221 'left' => '1',
222 ],
223 ],
224 'content_breaker' => [
225 'component' => 'LineBreaker',
226 ],
227 'content_group_definition' => [
228 'component' => 'GroupDefinition',
229 'title' => 'Content settings',
230 'description' => 'Handle content settings',
231 ],
232 'font_family' => 'Helvetica,Roboto,Arial,sans-serif',
233 'text_color' => '#1a1a1a',
234 'rich_text' => '<div style="text-align: right"><span style="font-size: 18px;font-weight: 500">Contact</span></div>',
235 ]
236 ),
237 ],
238 ]
239 ),
240 ],
241 ]
242 ),
243 ColumnLayout::get_object_data(
244 2,
245 [
246 'background_color' => '#EEFFE9',
247 'inner_background_color' => '#ffffff00',
248 'children' => [
249 Column::get_object_data(
250 70,
251 [
252 'children' => [
253 Heading::get_object_data(
254 [
255 'rich_text' => '<h1 style="font-size: 30px; font-weight: 600;">Order #[yaymail_order_id is_plain="true"]<br />has been completed</h1>',
256 'text_color' => '#333439',
257 'background_color' => '#ffffff00',
258 'padding' => [
259 'top' => 0,
260 'right' => 0,
261 'bottom' => 0,
262 'left' => 50,
263 ],
264 ]
265 ),
266 ],
267 ]
268 ),
269 Column::get_object_data(
270 30,
271 [
272 'children' => [
273 Image::get_object_data(
274 [
275 'align' => 'left',
276 'src' => 'https://images.wpbrandy.com/uploads/yaymail-order-completed-banner-icon.png',
277 'width' => 120,
278 'padding' => [
279 'top' => 0,
280 'right' => 10,
281 'bottom' => 0,
282 'left' => 0,
283 ],
284 'background_color' => '#ffffff00',
285 ]
286 ),
287 ],
288 ]
289 ),
290 ],
291 'background_image' => [
292 'url' => 'https://images.wpbrandy.com/uploads/yaymail-order-completed-banner-bg.png',
293 'position' => 'custom',
294 'x_position' => 70,
295 'y_position' => 0,
296 'size' => 'cover',
297 'repeat' => 'no-repeat',
298 ],
299 'padding' => [
300 'top' => 30,
301 'right' => 0,
302 'bottom' => 30,
303 'left' => 0,
304 ],
305 'vertical_align' => 'middle',
306 ]
307 ),
308 OrderProgress::get_object_data(
309 [
310 'padding' => [
311 'top' => 40,
312 'right' => '50',
313 'bottom' => 25,
314 'left' => '50',
315 ],
316 'background_color' => '#ffffff',
317 'display_style' => 'filled_bar',
318 'current_step_index' => 1,
319 'connector_height' => 2,
320 'connector_active_color' => '#873eff',
321 'connector_inactive_color' => '#e2e6ee',
322 'icon_size' => '18',
323 'filled_bar_icon_border_radius' => 50,
324 'label_font_size' => 13,
325 'font_family' => '"Helvetica Neue",Helvetica,Roboto,Arial,sans-serif',
326 'label_active_color' => '#111827',
327 'label_inactive_color' => '#9ca3af',
328 'steps' => [
329 '0' => [
330 'title' => 'Ordered',
331 'image_url' => YAYMAIL_PLUGIN_URL . '/assets/images/check.png',
332 'image_bg_color' => '#873eff',
333 'icon_border_color' => '#873eff',
334 'icon_border_style' => 'solid',
335 'icon_border_width' => 2,
336 ],
337 '1' => [
338 'title' => 'Processing',
339 'image_url' => YAYMAIL_PLUGIN_URL . '/assets/images/check.png',
340 'image_bg_color' => '#873eff',
341 'icon_border_color' => '#873eff',
342 'icon_border_style' => 'solid',
343 'icon_border_width' => 2,
344 ],
345 '2' => [
346 'title' => 'Completed',
347 'image_url' => YAYMAIL_PLUGIN_URL . '/assets/images/check.png',
348 'image_bg_color' => '#E2E6EE',
349 'icon_border_color' => '#E2E6EE',
350 'icon_border_style' => 'solid',
351 'icon_border_width' => 2,
352 ],
353 ],
354 ]
355 ),
356 Text::get_object_data(
357 [
358 'rich_text' => '<p>Hi <b>[yaymail_billing_first_name] [yaymail_billing_last_name],</b></p><p>Great news! Your order is about to ship. It should be delivered to you within 7 working days.</p>',
359 'text_color' => '#333439',
360 'padding' => [
361 'top' => 15,
362 'right' => 50,
363 'bottom' => 15,
364 'left' => 50,
365 ],
366 ]
367 ),
368 OrderDetails::get_object_data(
369 [
370 'title' => '<p><span style="font-size: 20px;"><strong>Order Summary</strong></span></p>',
371 'title_color' => '#1A1A1A',
372 ]
373 ),
374 Text::get_object_data(
375 [
376 'rich_text' => '<p style="font-size: 16px;">[yaymail_order_link text_link="View Order Detail"]</p>',
377 'text_color' => '#333439',
378 'padding' => [
379 'top' => 0,
380 'right' => 50,
381 'bottom' => 0,
382 'left' => 50,
383 ],
384 ]
385 ),
386 BillingShippingAddress::get_object_data(
387 [
388 'title_color' => '#1A1A1A',
389 ]
390 ),
391 ColumnLayout::get_object_data(
392 1,
393 [
394 'padding' => [
395 'top' => 10,
396 'bottom' => 10,
397 'left' => 40,
398 'right' => 40,
399 ],
400 'children' => [
401 Column::get_object_data(
402 100,
403 [
404 'children' => [
405 Text::get_object_data(
406 [
407 'rich_text' => '<p style="text-align: center; margin: 0; font-weight: 300;"><span style="font-size: 16px;">For questions, contact <u>[email protected]</u>, visit our <u>FAQs</u>, or <u>chat</u> with us during operating hours for account support</span></p>',
408 'background_color' => '#ffffff00',
409 'padding' => [
410 'top' => 0,
411 'right' => 0,
412 'bottom' => 0,
413 'left' => 0,
414 ],
415 'text_color' => '#333439',
416 ]
417 ),
418 SocialIcon::get_object_data(
419 [
420 'align' => 'center',
421 'spacing' => 24,
422 'width_icon' => 24,
423 'style' => 'Colorful',
424 'icon_list' => [
425 [
426 'icon' => 'facebook',
427 'url' => '#',
428 ],
429 [
430 'icon' => 'instagram',
431 'url' => '#',
432 ],
433 [
434 'icon' => 'tiktok',
435 'url' => '#',
436 ],
437 [
438 'icon' => 'youtube',
439 'url' => '#',
440 ],
441
442 ],
443 'padding' => [
444 'top' => 20,
445 'right' => 0,
446 'bottom' => 20,
447 'left' => 0,
448 ],
449 ]
450 ),
451 Text::get_object_data(
452 [
453 'rich_text' => '<p style="text-align: center; margin: 0; font-weight: 300;"><span style="font-size: 12px;">© 2025 YayCommerce.com</span></p>',
454 'padding' => [
455 'top' => 0,
456 'right' => 0,
457 'bottom' => 20,
458 'left' => 0,
459 ],
460 'text_color' => '#77859B',
461 ]
462 ),
463 ],
464 ]
465 ),
466 ],
467 ]
468 ),
469 ];
470 }
471 }
472