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 / Classic.php

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

345 lines 16.8 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\Footer;
8 use YayMail\Elements\Heading;
9 use YayMail\Elements\Logo;
10 use YayMail\Elements\OrderDetails;
11 use YayMail\Elements\OrderDetailsDownload;
12 use YayMail\Elements\Text;
13 use YayMail\Utils\SingletonTrait;
14
15 /**
16 * Classic template for Completed Order email.
17 */
18 class Classic extends BaseTemplate {
19 use SingletonTrait;
20
21 public function __construct() {
22 parent::__construct();
23 $this->id = 'completed_order_classic';
24 $this->email_type = 'customer_completed_order';
25 $this->name = 'Classic';
26 $this->description = 'Clean layout with plenty of whitespace';
27 $this->elements = [
28 Logo::get_object_data(
29 [
30 'container_group_definition' => [
31 'component' => 'GroupDefinition',
32 'title' => 'Container settings',
33 'description' => 'Handle container layout settings',
34 ],
35 'padding' => [
36 'top' => '15',
37 'right' => '50',
38 'bottom' => '15',
39 'left' => '50',
40 ],
41 'background_color' => '#f9f9f9',
42 'logo_breaker' => [
43 'component' => 'LineBreaker',
44 ],
45 'logo_group_definition' => [
46 'component' => 'GroupDefinition',
47 'title' => 'Logo settings',
48 'description' => 'Handle logo settings',
49 ],
50 'src' => YAYMAIL_PLUGIN_URL . 'assets/images/woocommerce-logo.png',
51 'align' => 'center',
52 'width' => '172',
53 'url' => '#',
54 'alt' => '',
55 ]
56 ),
57 Heading::get_object_data(
58 [
59 'container_group_definition' => [
60 'component' => 'GroupDefinition',
61 'title' => 'Container settings',
62 'description' => 'Handle container layout settings',
63 ],
64 'padding' => [
65 'top' => '40',
66 'right' => '50',
67 'bottom' => '40',
68 'left' => '50',
69 ],
70 'background_color' => '#873EFF',
71 'content_breaker' => [
72 'component' => 'LineBreaker',
73 ],
74 'content_group_definition' => [
75 'component' => 'GroupDefinition',
76 'title' => 'Content settings',
77 'description' => 'Handle content settings',
78 ],
79 'font_family' => 'Helvetica,Roboto,Arial,sans-serif',
80 'text_color' => '#ffffff',
81 'rich_text' => '<h1 style="font-size:30px;font-weight:300;line-height:normal;margin:0px;color:inherit;">Thanks for shopping with us</h1>',
82 ]
83 ),
84 Text::get_object_data(
85 [
86 'container_group_definition' => [
87 'component' => 'GroupDefinition',
88 'title' => 'Container settings',
89 'description' => 'Handle container layout settings',
90 ],
91 'padding' => [
92 'top' => '15',
93 'right' => '50',
94 'bottom' => '15',
95 'left' => '50',
96 ],
97 'background_color' => '#fff',
98 'border' => [
99 'side' => 'none',
100 'width' => '1',
101 'style' => 'solid',
102 'color' => '#e5e5e5',
103 'custom' => [
104 'top' => '1',
105 'right' => '1',
106 'bottom' => '1',
107 'left' => '1',
108 ],
109 ],
110 'content_breaker' => [
111 'component' => 'LineBreaker',
112 ],
113 'content_group_definition' => [
114 'component' => 'GroupDefinition',
115 'title' => 'Content settings',
116 'description' => 'Handle content settings',
117 ],
118 'font_family' => 'Helvetica,Roboto,Arial,sans-serif',
119 'text_color' => '#636363',
120 'rich_text' => '<p><span>Hi [yaymail_billing_first_name],<br /><br /></span></p><p><span>We have finished processing your order.</span></p>',
121 ]
122 ),
123 OrderDetailsDownload::get_object_data(
124 [
125 'rich_text' => '[yaymail_order_details_download_product]',
126 'container_group_definition' => [
127 'component' => 'GroupDefinition',
128 'title' => 'Container settings',
129 'description' => 'Handle container layout settings',
130 ],
131 'padding' => [
132 'top' => '15',
133 'right' => '50',
134 'bottom' => '15',
135 'left' => '50',
136 ],
137 'background_color' => '#fff',
138 'border' => [
139 'side' => 'none',
140 'width' => '1',
141 'style' => 'solid',
142 'color' => '#e5e5e5',
143 'custom' => [
144 'top' => '1',
145 'right' => '1',
146 'bottom' => '1',
147 'left' => '1',
148 ],
149 ],
150 'table_setting_breaker' => [
151 'component' => 'LineBreaker',
152 ],
153 'table_group_definition' => [
154 'component' => 'GroupDefinition',
155 'title' => 'Table settings',
156 'description' => 'Handle table settings',
157 ],
158 'layout_type' => 'legacy',
159 'title' => '<span style="font-size: 20px;font-weight:600;">Downloads</span>',
160 'title_color' => '#873EFF',
161 'text_color' => '#636363',
162 'border_color' => '#e5e5e5',
163 'font_family' => 'Helvetica,Roboto,Arial,sans-serif',
164 'table_content_font_size' => '14',
165 'table_heading_line_breaker' => [
166 'component' => 'LineBreaker',
167 ],
168 'table_heading_group_definition' => [
169 'component' => 'GroupDefinition',
170 'title' => 'Table heading settings',
171 'description' => 'Handle table heading settings',
172 ],
173 'table_heading_font_size' => '14',
174 'product_title' => 'Product',
175 'expires_title' => 'Expires',
176 'download_title' => 'Download',
177 ]
178 ),
179 OrderDetails::get_object_data(
180 [
181 'rich_text' => '[yaymail_order_details]',
182 'payment_instructions' => '[yaymail_payment_instructions]',
183 'container_group_definition' => [
184 'component' => 'GroupDefinition',
185 'title' => 'Container settings',
186 'description' => 'Handle container layout settings',
187 ],
188 'padding' => [
189 'top' => '15',
190 'right' => '50',
191 'bottom' => '15',
192 'left' => '50',
193 ],
194 'background_color' => '#fff',
195 'border' => [
196 'side' => 'none',
197 'width' => '1',
198 'style' => 'solid',
199 'color' => '#e5e5e5',
200 'custom' => [
201 'top' => '1',
202 'right' => '1',
203 'bottom' => '1',
204 'left' => '1',
205 ],
206 ],
207 'table_setting_breaker' => [
208 'component' => 'LineBreaker',
209 ],
210 'table_group_definition' => [
211 'component' => 'GroupDefinition',
212 'title' => 'Table settings',
213 'description' => 'Handle table settings',
214 ],
215 'layout_type' => 'legacy',
216 'title' => '<span style="font-size: 20px;">Order #[yaymail_order_number] <b>([yaymail_order_date])</b></span>',
217 'title_color' => '#873EFF',
218 'text_color' => '#636363',
219 'border_color' => '#e5e5e5',
220 'font_family' => 'Helvetica,Roboto,Arial,sans-serif',
221 'table_content_font_size' => '14',
222 'table_heading_line_breaker' => [
223 'component' => 'LineBreaker',
224 ],
225 'table_heading_group_definition' => [
226 'component' => 'GroupDefinition',
227 'title' => 'Table heading settings',
228 'description' => 'Handle table heading settings',
229 ],
230 'table_heading_font_size' => '14',
231 'show_table_header' => 1,
232 'product_title' => 'Product',
233 'cost_title' => 'Cost',
234 'quantity_title' => 'Quantity',
235 'price_title' => 'Price',
236 'cart_subtotal_title' => 'Subtotal:',
237 'payment_method_title' => 'Payment method:',
238 'order_total_title' => 'Total:',
239 'order_note_title' => 'Note:',
240 'shipping_title' => 'Shipping:',
241 'discount_title' => 'Discount:',
242 ]
243 ),
244 BillingShippingAddress::get_object_data(
245 [
246 'container_group_definition' => [
247 'component' => 'GroupDefinition',
248 'title' => 'Container settings',
249 'description' => 'Handle container layout settings',
250 ],
251 'padding' => [
252 'top' => '15',
253 'right' => '50',
254 'bottom' => '15',
255 'left' => '50',
256 ],
257 'background_color' => '#fff',
258 'content_breaker' => [
259 'component' => 'LineBreaker',
260 ],
261 'content_group_definition' => [
262 'component' => 'GroupDefinition',
263 'title' => 'Content settings',
264 'description' => 'Handle content settings',
265 ],
266 'layout_type' => 'legacy',
267 'title_color' => '#873EFF',
268 'text_color' => '#636363',
269 'border_color' => '#e5e5e5',
270 'font_family' => 'Helvetica,Roboto,Arial,sans-serif',
271 'billing_title' => '<span style="font-size: 20px;font-weight:600;">Billing Address</span>',
272 'shipping_title' => '<span style="font-size: 20px;font-weight:600;">Shipping Address</span>',
273 'shipping_address_content' => '[yaymail_shipping_address]',
274 'billing_address_content' => '[yaymail_billing_address]',
275 ]
276 ),
277 Text::get_object_data(
278 [
279 'container_group_definition' => [
280 'component' => 'GroupDefinition',
281 'title' => 'Container settings',
282 'description' => 'Handle container layout settings',
283 ],
284 'padding' => [
285 'top' => '0',
286 'right' => '50',
287 'bottom' => '38',
288 'left' => '50',
289 ],
290 'background_color' => '#fff',
291 'border' => [
292 'side' => 'none',
293 'width' => '1',
294 'style' => 'solid',
295 'color' => '#e5e5e5',
296 'custom' => [
297 'top' => '1',
298 'right' => '1',
299 'bottom' => '1',
300 'left' => '1',
301 ],
302 ],
303 'content_breaker' => [
304 'component' => 'LineBreaker',
305 ],
306 'content_group_definition' => [
307 'component' => 'GroupDefinition',
308 'title' => 'Content settings',
309 'description' => 'Handle content settings',
310 ],
311 'font_family' => 'Helvetica,Roboto,Arial,sans-serif',
312 'text_color' => '#636363',
313 'rich_text' => '<p><span>Thanks for shopping with us.</span></p>',
314 ]
315 ),
316 Footer::get_object_data(
317 [
318 'container_group_definition' => [
319 'component' => 'GroupDefinition',
320 'title' => 'Container settings',
321 'description' => 'Handle container layout settings',
322 ],
323 'padding' => [
324 'top' => '15',
325 'right' => '50',
326 'bottom' => '15',
327 'left' => '50',
328 ],
329 'background_color' => '#f9f9f9',
330 'content_breaker' => [
331 'component' => 'LineBreaker',
332 ],
333 'content_group_definition' => [
334 'component' => 'GroupDefinition',
335 'title' => 'Content settings',
336 'description' => 'Handle content settings',
337 ],
338 'text_color' => '#8a8a8a',
339 'font_family' => 'Helvetica,Roboto,Arial,sans-serif',
340 '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>',
341 ]
342 ),
343 ];
344 }
345 }