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 / TemplatePatterns / Patterns / Offer1.php

Offer1.php in YayMail – WooCommerce Email Customizer trunk, at src/TemplatePatterns/Patterns/Offer1.php

126 lines 6.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace YayMail\TemplatePatterns\Patterns;
3
4 use YayMail\Abstracts\BasePattern;
5 use YayMail\Elements\Button;
6 use YayMail\Elements\Column;
7 use YayMail\Elements\ColumnLayout;
8 use YayMail\Elements\Image;
9 use YayMail\Elements\Text;
10 use YayMail\TemplatePatterns\SectionTemplates\Offer;
11 use YayMail\Utils\SingletonTrait;
12
13 /** */
14 class Offer1 extends BasePattern {
15 use SingletonTrait;
16
17 public const TYPE = 'offer_1';
18
19 public function __construct() {
20 $this->id = uniqid();
21 $this->section = Offer::TYPE;
22 $this->position = 10;
23 $this->name = __( 'Offer 1', 'yaymail' );
24 $this->elements = [
25 ColumnLayout::get_object_data(
26 1,
27 [
28 'inner_background_color' => '#ffffff00',
29 'border_radius' => [
30 'top_left' => 30,
31 'top_right' => 30,
32 'bottom_right' => 30,
33 'bottom_left' => 30,
34 ],
35 'padding' => [
36 'top' => 50,
37 'bottom' => 50,
38 'right' => 30,
39 'left' => 30,
40 ],
41 'background_image' => [
42 'url' => 'https://images.wpbrandy.com/uploads/yaymail-offer-1-bg.png',
43 'position' => 'custom',
44 'x_position' => 52,
45 'y_position' => 50,
46 'repeat' => 'no-repeat',
47 'size' => 'cover',
48 'custom_size' => 92,
49 ],
50 'children' => [
51 Column::get_object_data(
52 100,
53 [
54 'children' => [
55 Image::get_object_data(
56 [
57 'src' => 'https://images.wpbrandy.com/uploads/yaymail-offer-1-icon.png',
58 'padding' => [
59 'top' => 0,
60 'bottom' => 10,
61 'right' => 50,
62 'left' => 50,
63 ],
64 'align' => 'center',
65 'width' => 90,
66 'background_color' => '#ffffff00',
67 ]
68 ),
69 Text::get_object_data(
70 [
71 'background_color' => '#ffffff00',
72 'text_color' => '#333439',
73 'rich_text' => '<p style="text-align: center; margin: 0;"><span style="font-size: 20px; font-weight: 700;"><b>Welcome to [yaymail_site_name]</b></span></p>',
74 'padding' => [
75 'top' => 15,
76 'bottom' => 5,
77 'right' => 50,
78 'left' => 50,
79 ],
80 ]
81 ),
82 Text::get_object_data(
83 [
84 'background_color' => '#ffffff00',
85 'text_color' => '#333439',
86 'rich_text' => '<p style="text-align: center; margin: 0;"><span style="font-size: 16px; font-weight: 300;">Congratulations! Enjoy an exclusive discount on your first-time order and receive a gift offer.</span></p>',
87 'padding' => [
88 'top' => 5,
89 'bottom' => 10,
90 'right' => 50,
91 'left' => 50,
92 ],
93 ]
94 ),
95 Button::get_object_data(
96 [
97 'text' => 'Place your first order',
98 'background_color' => '#ffffff00',
99 'button_background_color' => '#FFFFFF',
100 'text_color' => '#FFA179',
101 'width' => 50,
102 'padding' => [
103 'top' => 10,
104 'bottom' => 0,
105 'right' => 50,
106 'left' => 50,
107 ],
108 'border_radius' => [
109 'top_left' => 15,
110 'top_right' => 15,
111 'bottom_right' => 15,
112 'bottom_left' => 15,
113 ],
114 ]
115 ),
116 ],
117 ]
118 ),
119 ],
120
121 ]
122 ),
123 ];
124 }
125 }
126