PluginProbe
YayMail – WooCommerce Email Customizer / 4.4.1
YayMail – WooCommerce Email Customizer v4.4.1
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 / Modern.php

Modern.php in YayMail – WooCommerce Email Customizer 4.4.1, at src/TemplateLibrary/Templates/Completed/Modern.php

281 lines 13.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\Completed;
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 Completed Order email.
16 */
17 class Modern extends BaseTemplate {
18 use SingletonTrait;
19
20 public function __construct() {
21 parent::__construct();
22 $this->id = 'completed_order_modern';
23 $this->email_type = 'customer_completed_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' => 15,
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' => '<h1 style="font-size: 32px;letter-spacing: -1px;line-height: 38.4px;margin: 0px">Good things are heading your way!</h1>',
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">Hi </span><span style="font-size: 16px">[yaymail_billing_first_name],</span></p><br/><p style="font-size: 16px;margin: 0px 0px 16px">We have finished processing your order.</p><p style="font-size: 16px;margin: 0px 0px 16px">Here\'s a reminder of what you\'ve ordered:</p>',
116 ]
117 ),
118 OrderDetails::get_object_data(
119 [
120 'rich_text' => '[yaymail_order_details]',
121 'payment_instructions' => '[yaymail_payment_instructions]',
122 'padding' => [
123 'top' => '15',
124 'right' => '50',
125 'bottom' => '15',
126 'left' => '50',
127 ],
128 'background_color' => '#fff',
129 'border' => [
130 'side' => 'none',
131 'width' => '1',
132 'style' => 'solid',
133 'color' => '#e5e5e5',
134 'custom' => [
135 'top' => '1',
136 'right' => '1',
137 'bottom' => '1',
138 'left' => '1',
139 ],
140 ],
141 'layout_type' => 'modern',
142 'title' => '<p><strong><span style="font-size: 20px">Order summary</span></strong></p><p><span style="font-size: 14px">Order #[yaymail_order_number is_plain="true"] ([yaymail_order_date])</span></p>',
143 'title_color' => '#3c3c3c',
144 'text_color' => '#636363',
145 'border_color' => '#e5e5e5',
146 'font_family' => 'Helvetica,Roboto,Arial,sans-serif',
147 'table_content_font_size' => 16,
148 'table_heading_font_size' => 16,
149 'show_table_header' => 1,
150 'product_title' => 'Product',
151 'cost_title' => 'Cost',
152 'quantity_title' => 'Quantity',
153 'price_title' => 'Price',
154 'cart_subtotal_title' => 'Subtotal:',
155 'payment_method_title' => 'Payment method:',
156 'order_total_title' => 'Total:',
157 'order_note_title' => 'Note:',
158 'shipping_title' => 'Shipping: [yaymail_shipping_method]',
159 'discount_title' => 'Discount:',
160 'custom_footer_rows' => [],
161 ]
162 ),
163 BillingShippingAddress::get_object_data(
164 [
165 'container_group_definition' => [
166 'component' => 'GroupDefinition',
167 'title' => 'Container settings',
168 'description' => 'Handle container layout settings',
169 ],
170 'padding' => [
171 'top' => '15',
172 'right' => '50',
173 'bottom' => '15',
174 'left' => '50',
175 ],
176 'background_color' => '#fff',
177 'content_breaker' => [
178 'component' => 'LineBreaker',
179 ],
180 'content_group_definition' => [
181 'component' => 'GroupDefinition',
182 'title' => 'Content settings',
183 'description' => 'Handle content settings',
184 ],
185 'layout_type' => 'modern',
186 'title_color' => '#3c3c3c',
187 'text_color' => '#636363',
188 'border_color' => '#e5e5e5',
189 'font_family' => 'Helvetica,Roboto,Arial,sans-serif',
190 'billing_title' => '<p><span style="font-size: 16px; font-weight: 600;">Billing address</span></p>',
191 'shipping_title' => '<p><span style="font-size: 16px; font-weight: 600;">Shipping address</span></p>',
192 'shipping_address_content' => '[yaymail_shipping_address]',
193 'billing_address_content' => '[yaymail_billing_address]',
194 ]
195 ),
196 Text::get_object_data(
197 [
198 'container_group_definition' => [
199 'component' => 'GroupDefinition',
200 'title' => 'Container settings',
201 'description' => 'Handle container layout settings',
202 ],
203 'padding' => [
204 'top' => '0',
205 'right' => '50',
206 'bottom' => 15,
207 'left' => '50',
208 ],
209 'background_color' => '#fff',
210 'border' => [
211 'side' => 'none',
212 'width' => '1',
213 'style' => 'solid',
214 'color' => '#e5e5e5',
215 'custom' => [
216 'top' => '1',
217 'right' => '1',
218 'bottom' => '1',
219 'left' => '1',
220 ],
221 ],
222 'content_breaker' => [
223 'component' => 'LineBreaker',
224 ],
225 'content_group_definition' => [
226 'component' => 'GroupDefinition',
227 'title' => 'Content settings',
228 'description' => 'Handle content settings',
229 ],
230 'font_family' => 'Helvetica,Roboto,Arial,sans-serif',
231 'text_color' => '#636363',
232 'rich_text' => '<p style="text-align: center"><span style="font-size: 16px">Thanks again! If you need any help with your order, please contact us at [yaymail_store_email]</span></p>',
233 ]
234 ),
235 Divider::get_object_data(
236 [
237 'align' => 'center',
238 'padding' => [
239 'top' => '15',
240 'right' => 0,
241 'bottom' => '15',
242 'left' => 0,
243 ],
244 'width' => '100',
245 'height' => 1,
246 'background_color' => '#ffffff',
247 'divider_color' => '#00000033',
248 'divider_type' => 'solid',
249 ]
250 ),
251 Footer::get_object_data(
252 [
253 'container_group_definition' => [
254 'component' => 'GroupDefinition',
255 'title' => 'Container settings',
256 'description' => 'Handle container layout settings',
257 ],
258 'padding' => [
259 'top' => '15',
260 'right' => '50',
261 'bottom' => '15',
262 'left' => '50',
263 ],
264 'background_color' => '#ffffff',
265 'content_breaker' => [
266 'component' => 'LineBreaker',
267 ],
268 'content_group_definition' => [
269 'component' => 'GroupDefinition',
270 'title' => 'Content settings',
271 'description' => 'Handle content settings',
272 ],
273 'text_color' => '#8a8a8a',
274 'font_family' => 'Helvetica,Roboto,Arial,sans-serif',
275 '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>',
276 ]
277 ),
278 ];
279 }
280 }
281