PluginProbe ʕ •ᴥ•ʔ
ShopEngine Elementor WooCommerce Builder Addon – All in One WooCommerce Solution / 1.0.0
ShopEngine Elementor WooCommerce Builder Addon – All in One WooCommerce Solution v1.0.0
4.9.2 4.9.1 4.9.0 2.0.0 2.1.0 2.2.0 2.2.1 2.2.2 2.3.0 2.4.0 2.5.0 2.5.1 3.0.0 3.1.0 3.1.1 4.0.0 4.0.1 4.1.0 4.1.1 4.2.0 4.2.1 4.3.0 4.3.1 4.4.0 4.5.0 4.5.1 4.6.0 4.6.1 4.6.2 4.6.3 4.6.4 4.6.5 4.6.6 4.6.7 4.6.8 4.6.9 4.7.0 4.7.1 4.7.2 4.7.3 4.7.4 4.7.5 4.7.6 4.7.7 4.7.8 4.7.9 4.8.0 4.8.1 4.8.2 4.8.3 4.8.4 4.8.5 4.8.6 4.8.7 4.8.8 4.8.9 trunk 0.1.2-beta 0.1.3-beta 0.1.4-beta 1.0.0 1.1.0 1.1.1 1.1.2 1.1.3 1.2.0 1.2.1 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.4.0 1.4.1 1.5.0 1.5.1 1.6.0 1.6.1 1.7.0 1.8.0 1.8.1 1.9.0
shopengine / widgets / additional-information / additional-information.php
shopengine / widgets / additional-information Last commit date
screens 5 years ago additional-information-config.php 5 years ago additional-information.php 5 years ago
additional-information.php
228 lines
1 <?php
2
3 namespace Elementor;
4
5 use ShopEngine\Widgets\Products;
6
7 defined('ABSPATH') || exit;
8
9
10 class ShopEngine_Additional_Information extends \ShopEngine\Base\Widget
11 {
12
13 public function config() {
14 return new ShopEngine_Additional_Information_Config();
15 }
16
17 protected function register_controls() {
18
19 $this->start_controls_section(
20 'shopengine_section_product_additional_information_common',
21 array(
22 'label' => esc_html__('Common', 'shopengine'),
23 'tab' => Controls_Manager::TAB_STYLE,
24 )
25 );
26
27
28 $this->add_responsive_control(
29 'shopengine_product_additional_information_table_cell_padding',
30 [
31 'label' => esc_html__('Table Cell Padding', 'shopengine'),
32 'type' => Controls_Manager::DIMENSIONS,
33 'default' => [
34 'top' => '15',
35 'right' => '35',
36 'bottom' => '15',
37 'left' => '35',
38 'unit' => 'px',
39 'isLinked' => false,
40 ],
41 'size_units' => ['px'],
42 'selectors' => [
43 '{{WRAPPER}} .shopengine-additional-information tr td' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
44 '{{WRAPPER}} .shopengine-additional-information tr th' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
45 ],
46 ]
47 );
48 $this->add_group_control(
49 Group_Control_Typography::get_type(),
50 array(
51 'name' => 'shopengine_product_additional_information_label_typography',
52 'label' => esc_html__('Typography', 'shopengine'),
53 'selector' => '{{WRAPPER}} .shopengine-additional-information tr :is(td, th, p) ',
54 'exclude' => ['text_transform', 'text_decoration', 'line_height', 'text_style', 'letter_spacing'],
55 'fields_options' => [
56 'typography' => [
57 'default' => 'custom',
58 ],
59 'font_size' => [
60 'label' => esc_html__('Font Size (px)', 'shopengine'),
61 'size_units' => ['px'],
62 'default' => [
63 'size' => '16',
64 'unit' => 'px',
65 ],
66 ],
67 'font_weight' => [
68 'default' => '400',
69 ],
70 'text_transform' => [
71 'default' => 'capitalize',
72 ],
73 'font_style' => [
74 'default' => 'normal',
75 ],
76 'line_height' => [
77 'default' => [
78 'size' => '19',
79 'unit' => 'px',
80 ],
81 ],
82 'letter_spacing' => [
83 'default' => [
84 'size' => '0',
85 ],
86 ],
87 ],
88 )
89 );
90
91 $this->add_control(
92 'shopengine_product_additional_information_separator_color',
93 [
94 'label' => esc_html__('Separator Color', 'shopengine'),
95 'type' => Controls_Manager::COLOR,
96 'alpha' => false,
97 'selectors' => [
98 '{{WRAPPER}} .shopengine-additional-information .shop_attributes tr:not(:last-child),
99 {{WRAPPER}} .shopengine-additional-information table.shop_attributes tr td,
100 {{WRAPPER}} .shopengine-additional-information table.shop_attributes tr th' => 'border-color: {{VALUE}};',
101 ],
102 ]
103 );
104
105 $this->end_controls_section();
106
107
108 $this->start_controls_section(
109 'shopengine_section_product_additional_information_label',
110 array(
111 'label' => esc_html__('Label', 'shopengine'),
112 'tab' => Controls_Manager::TAB_STYLE,
113 )
114 );
115
116 $this->add_control(
117 'shopengine_product_additional_information_label_color',
118 [
119 'label' => esc_html__('Color', 'shopengine'),
120 'type' => Controls_Manager::COLOR,
121 'default' => '#888888',
122 'alpha' => false,
123 'selectors' => [
124 '{{WRAPPER}} .shopengine-additional-information tr th' => 'color: {{VALUE}};',
125 ],
126 ]
127 );
128
129 $this->add_control(
130 'shopengine_product_additional_information_label_bg_color',
131 [
132 'label' => esc_html__('Background', 'shopengine'),
133 'type' => Controls_Manager::COLOR,
134 'default' => '#f8f8f8',
135 'alpha' => false,
136 'selectors' => [
137 '{{WRAPPER}} .shopengine-additional-information tr th' => 'background: {{VALUE}};',
138 ],
139 ]
140 );
141
142
143
144 $this->add_responsive_control(
145 'shopengine_product_additional_information_label_width',
146 [
147 'label' => esc_html__('Width', 'shopengine'),
148 'type' => Controls_Manager::SLIDER,
149 'size_units' => ['px', '%'],
150 'range' => [
151 'px' => [
152 'min' => 0,
153 'max' => 1000,
154 'step' => 5,
155 ],
156 '%' => [
157 'min' => 0,
158 'max' => 100,
159 ],
160 ],
161 'default' => [
162 'unit' => '%',
163 'size' => 25,
164 ],
165 'selectors' => [
166 '{{WRAPPER}} .shopengine-additional-information tr th' => 'width: {{SIZE}}{{UNIT}};',
167 ],
168 ]
169 );
170
171 $this->end_controls_section();
172
173 $this->start_controls_section(
174 'shopengine_section_product_additional_information_value',
175 array(
176 'label' => esc_html__('Value', 'shopengine'),
177 'tab' => Controls_Manager::TAB_STYLE,
178 )
179 );
180
181 $this->add_control(
182 'shopengine_product_additional_information_value_color',
183 [
184 'label' => esc_html__('Color', 'shopengine'),
185 'type' => Controls_Manager::COLOR,
186 'default' => '#101010',
187 'alpha' => false,
188 'selectors' => [
189 '{{WRAPPER}} .shopengine-additional-information tr td p' => 'color: {{VALUE}};',
190 ],
191 ]
192 );
193
194 $this->add_control(
195 'shopengine_product_additional_information_value_bg_color',
196 [
197 'label' => esc_html__('Background', 'shopengine'),
198 'type' => Controls_Manager::COLOR,
199 'default' => '#fdfdfd',
200 'alpha' => false,
201 'selectors' => [
202 '{{WRAPPER}} .shopengine-additional-information tr td' => 'background: {{VALUE}};',
203 ],
204 ]
205 );
206
207
208
209 $this->end_controls_section();
210
211
212
213 }
214
215 protected function screen() {
216
217 $settings = $this->get_settings_for_display();
218
219 $post_type = get_post_type();
220
221 $product = Products::instance()->get_product($post_type);
222
223 $tpl = Products::instance()->get_widget_template($this->get_name());
224
225 include $tpl;
226 }
227 }
228