PluginProbe
ShopBuilder – WooCommerce Builder For Elementor / 2.5.2
ShopBuilder – WooCommerce Builder For Elementor v2.5.2
3.4.2 3.4.1 3.4.0 2.0.1 2.0.2 2.0.3 2.1.0 2.1.1 2.1.10 2.1.11 2.1.12 2.1.13 2.1.14 2.1.15 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 2.2.0 2.2.1 2.2.2 All 63 releases
shopbuilder / app / Elementor / Widgets / Controls / CartTableSettings.php

CartTableSettings.php in ShopBuilder – WooCommerce Builder For Elementor 2.5.2, at app/Elementor/Widgets/Controls/CartTableSettings.php

1,434 lines 46.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Main ProductDescription class.
4 *
5 * @package RadiusTheme\SB
6 */
7
8 namespace RadiusTheme\SB\Elementor\Widgets\Controls;
9
10 use Elementor\Controls_Manager;
11 use RadiusTheme\SB\Helpers\Fns;
12 use RadiusTheme\SB\Elementor\Helper\ControlHelper;
13 use RadiusTheme\SB\Elementor\Widgets\Controls\ButtonSettings;
14
15 // Do not allow directly accessing this file.
16 if ( ! defined( 'ABSPATH' ) ) {
17 exit( 'This script cannot be accessed directly.' );
18 }
19
20 /**
21 * Product Description class
22 */
23 class CartTableSettings {
24 /**
25 * Widget Control Selectors
26 *
27 * @var array
28 */
29 private static $selectors = [];
30
31 /**
32 * Widget Field
33 *
34 * @return array
35 */
36 public static function widget_fields( $widget ) {
37 self::$selectors = $widget->selectors;
38
39 return self::general_settings( $widget ) +
40 self::cart_table() +
41 self::quantity_fields( $widget ) +
42 self::action_control() +
43 self::image_settings() +
44 self::table_button( $widget ) +
45 self::input_style() +
46 QuantityFields::quantity_style_fields( $widget ) +
47 self::return_shop_button_style() +
48 self::notice_style();
49 }
50
51 /**
52 * @param $widget
53 *
54 * @return array
55 */
56 public static function quantity_fields( $widget ) {
57 $fields = QuantityFields::quantity_fields( $widget );
58 return $fields;
59 }
60
61 /**
62 * Widget Field
63 *
64 * @return array
65 */
66 public static function table_button( $widget ) {
67 $fields = ButtonSettings::style_settings( $widget );
68
69 $extra_controls = [
70 'clear_cart_button_heading' => [
71 'type' => 'html',
72 'raw' => sprintf(
73 '<h3 class="rtsb-elementor-group-heading">%s</h3>',
74 esc_html__( 'Clear Cart Button', 'shopbuilder' )
75 ),
76 'content_classes' => 'elementor-panel-heading-title',
77 ],
78 'clear_cart_button_tabs_start' => [
79 'mode' => 'tabs_start',
80 ],
81 'clear_cart_button_normal' => [
82 'mode' => 'tab_start',
83 'label' => esc_html__( 'Normal', 'shopbuilder' ),
84 ],
85 'clear_cart_button_bg_color' => [
86 'label' => esc_html__( 'Background Color', 'shopbuilder' ),
87 'type' => 'color',
88
89 'separator' => 'default',
90 'selectors' => [
91 self::$selectors['clear_cart_button_bg_color'] => 'background-color: {{VALUE}};',
92 ],
93 ],
94 'clear_cart_button_text_color' => [
95 'label' => esc_html__( 'Color', 'shopbuilder' ),
96 'type' => 'color',
97
98 'selectors' => [
99 self::$selectors['clear_cart_button_text_color'] => 'color: {{VALUE}};',
100 ],
101 ],
102 'clear_cart_button_border_color' => [
103 'label' => esc_html__( 'Border Color', 'shopbuilder' ),
104 'type' => 'color',
105
106 'selectors' => [
107 self::$selectors['clear_cart_button_border_color'] => 'border-color: {{VALUE}};',
108 ],
109 ],
110 'clear_cart_button_normal_end' => [
111 'mode' => 'tab_end',
112 ],
113 'clear_cart_button_hover' => [
114 'mode' => 'tab_start',
115 'label' => esc_html__( 'Hover', 'shopbuilder' ),
116 ],
117 'clear_cart_button_bg_color_hover' => [
118 'label' => esc_html__( 'Background Color', 'shopbuilder' ),
119 'type' => 'color',
120 'separator' => 'default',
121
122 'selectors' => [
123 self::$selectors['clear_cart_button_bg_color_hover'] => 'background-color: {{VALUE}};',
124 ],
125 ],
126 'clear_cart_button_text_color_hover' => [
127 'label' => esc_html__( 'Color', 'shopbuilder' ),
128 'type' => 'color',
129
130 'selectors' => [
131 self::$selectors['clear_cart_button_text_color_hover'] => 'color: {{VALUE}};',
132 ],
133 ],
134 'clear_cart_button_border_color_hover' => [
135 'label' => esc_html__( 'Border Color', 'shopbuilder' ),
136 'type' => 'color',
137
138 'selectors' => [
139 self::$selectors['clear_cart_button_border_color_hover'] => 'border-color: {{VALUE}};',
140 ],
141 ],
142 'clear_cart_button_hover_end' => [
143 'mode' => 'tab_end',
144 ],
145 'clear_cart_button_tabs_end' => [
146 'mode' => 'tabs_end',
147 ],
148 ];
149 $fields = Fns::insert_controls( 'button_section_end', $fields, $extra_controls, false );
150
151 return $fields;
152 }
153
154 /**
155 * Widget Field
156 *
157 * @return array
158 */
159 public static function cart_table() {
160 $fields = [
161 'cart_table_settings' => [
162 'mode' => 'section_start',
163 'tab' => 'style',
164 'label' => esc_html__( 'Cart Table', 'shopbuilder' ),
165 ],
166
167 'cart_element_alignment' => [
168 'mode' => 'responsive',
169 'type' => 'choose',
170 'label' => esc_html__( 'Element Alignment', 'shopbuilder' ),
171 'options' => [
172 'left' => [
173 'title' => esc_html__( 'Left', 'shopbuilder' ),
174 'icon' => 'eicon-text-align-left',
175 ],
176 'center' => [
177 'title' => esc_html__( 'Center', 'shopbuilder' ),
178 'icon' => 'eicon-text-align-center',
179 ],
180 'right' => [
181 'title' => esc_html__( 'Right', 'shopbuilder' ),
182 'icon' => 'eicon-text-align-right',
183 ],
184 ],
185 'selectors' => [
186 self::$selectors['cart_element_alignment'] => 'text-align: {{VALUE}}; justify-content: {{VALUE}} !important;',
187 ],
188 ],
189 'cart_table_border' => [
190 'mode' => 'group',
191 'type' => 'border',
192 'label' => esc_html__( 'Table Border', 'shopbuilder' ),
193 'selector' => self::$selectors['cart_table_border'],
194 'size_units' => [ 'px' ],
195 ],
196 'table_column_header_padding' => [
197 'label' => esc_html__( 'Column Header Padding(px)', 'shopbuilder' ),
198 'type' => 'dimensions',
199 'mode' => 'responsive',
200 'size_units' => [ 'px' ],
201 'selectors' => [
202 self::$selectors['table_column_header_padding'] => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
203 ],
204 ],
205
206 'cart_table_col_padding' => [
207 'label' => esc_html__( 'Column Padding(px)', 'shopbuilder' ),
208 'type' => 'dimensions',
209 'mode' => 'responsive',
210 'size_units' => [ 'px' ],
211 'selectors' => [
212 self::$selectors['cart_table_col_padding'] => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
213 ],
214 ],
215
216 'cart_table_row_padding' => [
217 'label' => esc_html__( 'Row Padding on mobile devices (px)', 'shopbuilder' ),
218 'description' => esc_html__( 'It will work only for mobile devices.', 'shopbuilder' ),
219 'type' => 'dimensions',
220 'mode' => 'responsive',
221 'size_units' => [ 'px' ],
222 'selectors' => [
223 self::$selectors['cart_table_row_padding'] => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
224 ],
225 ],
226
227 'table_row_border' => [
228 'mode' => 'group',
229 'type' => 'border',
230 'selector' => self::$selectors['table_row_border'],
231 'size_units' => [ 'px' ],
232 'fields_options' => [
233 'border' => [
234 'label' => esc_html__( 'Row Border', 'shopbuilder' ),
235 'label_block' => true,
236 ],
237 'color' => [
238 'label' => esc_html__( 'Border Color', 'shopbuilder' ),
239 ],
240 ],
241 ],
242 'table_wrapper_margin' => [
243 'label' => esc_html__( 'Table Wrapper Margin(px)', 'shopbuilder' ),
244 'type' => 'dimensions',
245 'mode' => 'responsive',
246 'size_units' => [ 'px' ],
247 'selectors' => [
248 self::$selectors['table_wrapper_margin'] => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
249 ],
250 ],
251 'cart_table_link' => [
252 'type' => 'html',
253 'raw' => sprintf(
254 '<h3 class="rtsb-elementor-group-heading">%s</h3>',
255 esc_html__( 'Link Settings', 'shopbuilder' )
256 ),
257 'content_classes' => 'elementor-panel-heading-title',
258 ],
259 'cart_link_color' => [
260 'label' => esc_html__( 'Link Color', 'shopbuilder' ),
261 'type' => 'color',
262 'separator' => 'default',
263 'selectors' => [
264 self::$selectors['cart_link_color'] => 'color: {{VALUE}};',
265 ],
266 ],
267 'cart_link_hover_color' => [
268 'label' => esc_html__( 'Link Hover Color', 'shopbuilder' ),
269 'type' => 'color',
270 'selectors' => [
271 self::$selectors['cart_link_hover_color'] => 'color: {{VALUE}};',
272 ],
273 ],
274 'cart_price_settings' => [
275 'type' => 'html',
276 'raw' => sprintf(
277 '<h3 class="rtsb-elementor-group-heading">%s</h3>',
278 esc_html__( 'Price Settings', 'shopbuilder' )
279 ),
280 'content_classes' => 'elementor-panel-heading-title',
281 ],
282 'cart_subtotal_price_typo' => [
283 'mode' => 'group',
284 'type' => 'typography',
285 'label' => esc_html__( 'Price Typography', 'shopbuilder' ),
286 'selector' => self::$selectors['cart_subtotal_price_typo'],
287 ],
288
289 'cart_price_color' => [
290 'mode' => 'responsive',
291 'label' => esc_html__( 'Price Color', 'shopbuilder' ),
292 'type' => 'color',
293 'separator' => 'default',
294 'selectors' => [
295 self::$selectors['cart_price_color'] => 'color: {{VALUE}};',
296 ],
297 ],
298 'cart_table_heading' => [
299 'type' => 'html',
300 'raw' => sprintf(
301 '<h3 class="rtsb-elementor-group-heading">%s</h3>',
302 esc_html__( 'Cart Table Heading', 'shopbuilder' )
303 ),
304 'content_classes' => 'elementor-panel-heading-title',
305 ],
306 'cart_heading_element_alignment' => [
307 'mode' => 'responsive',
308 'type' => 'choose',
309 'label' => esc_html__( 'Element Alignment', 'shopbuilder' ),
310 'options' => [
311 'left' => [
312 'title' => esc_html__( 'Left', 'shopbuilder' ),
313 'icon' => 'eicon-text-align-left',
314 ],
315 'center' => [
316 'title' => esc_html__( 'Center', 'shopbuilder' ),
317 'icon' => 'eicon-text-align-center',
318 ],
319 'right' => [
320 'title' => esc_html__( 'Right', 'shopbuilder' ),
321 'icon' => 'eicon-text-align-right',
322 ],
323 ],
324 'selectors' => [
325 self::$selectors['cart_heading_element_alignment'] => 'text-align: {{VALUE}};',
326 ],
327 ],
328 'cart_table_header_typography' => [
329 'mode' => 'group',
330 'type' => 'typography',
331 'label' => esc_html__( 'Typography', 'shopbuilder' ),
332 'selector' => self::$selectors['cart_table_header_typography'],
333 ],
334 'cart_table_header_bg_color' => [
335 'mode' => 'responsive',
336 'label' => esc_html__( 'Table Header Background Color', 'shopbuilder' ),
337 'type' => 'color',
338 'selectors' => [
339 self::$selectors['cart_table_header_bg_color'] => 'background-color: {{VALUE}};',
340 ],
341 ],
342 'cart_table_header_text_color' => [
343 'label' => esc_html__( 'Table Header Text Color', 'shopbuilder' ),
344 'type' => 'color',
345 'mode' => 'responsive',
346 'selectors' => [
347 self::$selectors['cart_table_header_text_color'] => 'color: {{VALUE}};',
348 ],
349 ],
350 'cart_table_odd_row' => [
351 'type' => 'html',
352 'raw' => sprintf(
353 '<h3 class="rtsb-elementor-group-heading">%s</h3>',
354 esc_html__( 'Cart Table Odd Row', 'shopbuilder' )
355 ),
356 'content_classes' => 'elementor-panel-heading-title',
357 ],
358 'cart_table_odd_row_bg_color' => [
359 'label' => esc_html__( 'Table Odd Row Background Color', 'shopbuilder' ),
360 'mode' => 'responsive',
361 'type' => 'color',
362 'selectors' => [
363 self::$selectors['cart_table_odd_row_bg_color'] => 'background-color: {{VALUE}};',
364 ],
365 ],
366 'cart_table_odd_row_text_color' => [
367 'label' => esc_html__( 'Table Odd Row Text Color', 'shopbuilder' ),
368 'mode' => 'responsive',
369 'type' => 'color',
370 'selectors' => [
371 self::$selectors['cart_table_odd_row_text_color'] => 'color: {{VALUE}};',
372 ],
373 ],
374
375 'cart_table_even_row' => [
376 'type' => 'html',
377 'raw' => sprintf(
378 '<h3 class="rtsb-elementor-group-heading">%s</h3>',
379 esc_html__( 'Cart Table Even Row', 'shopbuilder' )
380 ),
381 'content_classes' => 'elementor-panel-heading-title',
382 ],
383 'cart_table_even_row_bg_color' => [
384 'label' => esc_html__( 'Table Even Row Background Color', 'shopbuilder' ),
385 'type' => 'color',
386 'mode' => 'responsive',
387 'selectors' => [
388 self::$selectors['cart_table_even_row_bg_color'] => 'background-color: {{VALUE}};',
389 ],
390 ],
391 'cart_table_even_row_text_color' => [
392 'label' => esc_html__( 'Table Even Row Text Color', 'shopbuilder' ),
393 'type' => 'color',
394 'mode' => 'responsive',
395 'selectors' => [
396 self::$selectors['cart_table_even_row_text_color'] => 'color: {{VALUE}};',
397 ],
398 ],
399
400 'cart_remove_icon_heading' => [
401 'type' => 'html',
402 'raw' => sprintf(
403 '<h3 class="rtsb-elementor-group-heading">%s</h3>',
404 esc_html__( 'Remove Cart Column', 'shopbuilder' )
405 ),
406 'content_classes' => 'elementor-panel-heading-title',
407 ],
408 'cart_remove_button_size' => [
409 'mode' => 'responsive',
410 'label' => esc_html__( 'Remove Button Size', 'shopbuilder' ),
411 'type' => 'slider',
412 'range' => [
413 'px' => [
414 'min' => 10,
415 'max' => 100,
416 ],
417 ],
418 'selectors' => [
419 self::$selectors['cart_remove_button_size'] => 'width: {{SIZE}}{{UNIT}};height: {{SIZE}}{{UNIT}};',
420 ],
421 ],
422 'cart_remove_icon_size' => [
423 'label' => esc_html__( 'Remove Icon Font Size', 'shopbuilder' ),
424 'type' => 'slider',
425 'range' => [
426 'px' => [
427 'min' => 10,
428 'max' => 100,
429 ],
430 ],
431 'selectors' => [
432 self::$selectors['cart_remove_icon_size'] => 'font-size: {{SIZE}}{{UNIT}};',
433 ],
434 ],
435 'cart_icon_color' => [
436 'mode' => 'responsive',
437 'label' => esc_html__( 'Cart Icon Color', 'shopbuilder' ),
438 'type' => 'color',
439 'separator' => 'default',
440 'selectors' => [
441 self::$selectors['cart_icon_color'] => 'color: {{VALUE}} !important;',
442 ],
443 ],
444 'cart_icon_bg_color' => [
445 'mode' => 'responsive',
446 'label' => esc_html__( 'Cart Icon Background Color', 'shopbuilder' ),
447 'type' => 'color',
448 'separator' => 'default',
449 'selectors' => [
450 self::$selectors['cart_icon_bg_color'] => 'background-color: {{VALUE}} !important;',
451 ],
452 ],
453 'cart_icon_hover_color' => [
454 'mode' => 'responsive',
455 'label' => esc_html__( 'Cart Icon Hover Color', 'shopbuilder' ),
456 'type' => 'color',
457 'separator' => 'default',
458 'selectors' => [
459 self::$selectors['cart_icon_hover_color'] => 'color: {{VALUE}} !important;',
460 ],
461 ],
462 'cart_icon_hover_bg_color' => [
463 'mode' => 'responsive',
464 'label' => esc_html__( 'Cart Icon Hover Background Color', 'shopbuilder' ),
465 'type' => 'color',
466 'separator' => 'default',
467 'selectors' => [
468 self::$selectors['cart_icon_hover_bg_color'] => 'background-color: {{VALUE}} !important;',
469 ],
470 ],
471
472 'cart_product_title_area' => [
473 'type' => 'html',
474 'raw' => sprintf(
475 '<h3 class="rtsb-elementor-group-heading">%s</h3>',
476 esc_html__( 'Product Title Column', 'shopbuilder' )
477 ),
478 'content_classes' => 'elementor-panel-heading-title',
479 ],
480
481 'cart_title_element_alignment' => [
482 'mode' => 'responsive',
483 'type' => 'choose',
484 'label' => esc_html__( 'Title Alignment', 'shopbuilder' ),
485 'options' => [
486 'left' => [
487 'title' => esc_html__( 'Left', 'shopbuilder' ),
488 'icon' => 'eicon-text-align-left',
489 ],
490 'center' => [
491 'title' => esc_html__( 'Center', 'shopbuilder' ),
492 'icon' => 'eicon-text-align-center',
493 ],
494 'right' => [
495 'title' => esc_html__( 'Right', 'shopbuilder' ),
496 'icon' => 'eicon-text-align-right',
497 ],
498 ],
499 'selectors' => [
500 self::$selectors['cart_title_element_alignment'] => 'text-align: {{VALUE}} !important; justify-content: {{VALUE}} !important;',
501 ],
502 ],
503
504 'cart_product_title_color' => [
505 'label' => esc_html__( 'Title Color', 'shopbuilder' ),
506 'type' => 'color',
507 'selectors' => [
508 self::$selectors['cart_product_title_color'] => 'color: {{VALUE}};',
509 ],
510 ],
511 'cart_product_title_typo' => [
512 'mode' => 'group',
513 'type' => 'typography',
514 'label' => esc_html__( 'Title Typography', 'shopbuilder' ),
515 'selector' => self::$selectors['cart_product_title_typo'],
516 ],
517
518 'cart_product_title_meta_color' => [
519 'label' => esc_html__( 'Meta Color', 'shopbuilder' ),
520 'type' => 'color',
521 'selectors' => [
522 self::$selectors['cart_product_title_meta_color'] => 'color: {{VALUE}};',
523 ],
524 ],
525 'cart_product_title_meta_typo' => [
526 'mode' => 'group',
527 'type' => 'typography',
528 'label' => esc_html__( 'Title Meta Typography', 'shopbuilder' ),
529 'selector' => self::$selectors['cart_product_title_meta_typo'],
530 ],
531 'cart_product_title_padding' => [
532 'label' => esc_html__( 'Padding (px)', 'shopbuilder' ),
533 'type' => 'dimensions',
534 'mode' => 'responsive',
535 'size_units' => [ 'px' ],
536 'selectors' => [
537 self::$selectors['cart_product_title_padding'] => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
538 ],
539 ],
540
541 'cart_table_col_attributes_padding' => [
542 'label' => esc_html__( 'Attributes Padding(px)', 'shopbuilder' ),
543 'type' => 'dimensions',
544 'mode' => 'responsive',
545 'size_units' => [ 'px' ],
546 'selectors' => [
547 self::$selectors['cart_table_col_attributes_padding'] => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
548 ],
549 ],
550
551 'cart_subtotal_heading' => [
552 'type' => 'html',
553 'raw' => sprintf(
554 '<h3 class="rtsb-elementor-group-heading">%s</h3>',
555 esc_html__( 'Subtotal Column', 'shopbuilder' )
556 ),
557 'content_classes' => 'elementor-panel-heading-title',
558 ],
559 'element_alignment' => [
560 'mode' => 'responsive',
561 'type' => 'choose',
562 'label' => esc_html__( 'Element Alignment', 'shopbuilder' ),
563 'options' => [
564 'left' => [
565 'title' => esc_html__( 'Left', 'shopbuilder' ),
566 'icon' => 'eicon-text-align-left',
567 ],
568 'center' => [
569 'title' => esc_html__( 'Center', 'shopbuilder' ),
570 'icon' => 'eicon-text-align-center',
571 ],
572 'right' => [
573 'title' => esc_html__( 'Right', 'shopbuilder' ),
574 'icon' => 'eicon-text-align-right',
575 ],
576 ],
577 'selectors' => [
578 self::$selectors['element_alignment'] => 'text-align: {{VALUE}} !important;',
579 ],
580 ],
581
582 'cart_subtotal_button_typo' => [
583 'mode' => 'group',
584 'type' => 'typography',
585 'label' => esc_html__( 'Button Typography', 'shopbuilder' ),
586 'selector' => self::$selectors['cart_subtotal_button_typo'],
587 ],
588
589 'cart_subtotal_price_padding' => [
590 'label' => esc_html__( 'Price Padding (px)', 'shopbuilder' ),
591 'type' => 'dimensions',
592 'mode' => 'responsive',
593 'size_units' => [ 'px' ],
594 'selectors' => [
595 self::$selectors['cart_subtotal_price_padding'] => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
596 ],
597 ],
598
599 'cart_subtotal_price_margin' => [
600 'label' => esc_html__( 'Price Margin (px)', 'shopbuilder' ),
601 'type' => 'dimensions',
602 'mode' => 'responsive',
603 'size_units' => [ 'px' ],
604 'selectors' => [
605 self::$selectors['cart_subtotal_price_margin'] => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
606 ],
607 ],
608
609 'cart_subtotal_button_wrapper_padding' => [
610 'label' => esc_html__( 'Button Wrapper Padding (px)', 'shopbuilder' ),
611 'type' => 'dimensions',
612 'mode' => 'responsive',
613 'size_units' => [ 'px' ],
614 'selectors' => [
615 self::$selectors['cart_subtotal_button_wrapper_padding'] => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
616 ],
617 ],
618
619 'cart_subtotal_button_gap' => [
620 'label' => esc_html__( 'Button Gap', 'shopbuilder' ),
621 'type' => 'slider',
622 'range' => [
623 'px' => [
624 'min' => 1,
625 'max' => 100,
626 ],
627 ],
628 'selectors' => [
629 self::$selectors['cart_subtotal_button_gap'] => 'gap: {{SIZE}}{{UNIT}};',
630 ],
631 ],
632
633 'cart_subtotal_col_wrapper_padding' => [
634 'label' => esc_html__( 'Column Wrapper Padding (px)', 'shopbuilder' ),
635 'type' => 'dimensions',
636 'mode' => 'responsive',
637 'size_units' => [ 'px' ],
638 'selectors' => [
639 self::$selectors['cart_subtotal_col_wrapper_padding'] => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
640 ],
641 ],
642
643 'action_button_section' => [
644 'type' => 'html',
645 'raw' => sprintf(
646 '<h3 class="rtsb-elementor-group-heading">%s</h3>',
647 esc_html__( 'Action Button', 'shopbuilder' )
648 ),
649 'content_classes' => 'elementor-panel-heading-title',
650 ],
651 'action_button_padding' => [
652 'label' => esc_html__( 'Action Button Area padding(px)', 'shopbuilder' ),
653 'type' => 'dimensions',
654 'mode' => 'responsive',
655 'size_units' => [ 'px' ],
656 'selectors' => [
657 self::$selectors['action_button_padding'] => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
658 ],
659 ],
660
661 'cart_table_settings_end' => [
662 'mode' => 'section_end',
663 ],
664 ];
665
666 return $fields;
667 }
668
669 /**
670 * Widget Field
671 *
672 * @return array
673 */
674 public static function image_settings() {
675 $fields = [
676 'table_image_section' => [
677 'mode' => 'section_start',
678 'label' => esc_html__( 'Image ', 'shopbuilder' ),
679 'tab' => 'style',
680 ],
681 'table_thumbnail_width' => [
682 'mode' => 'responsive',
683 'label' => esc_html__( 'Thumbnail Image Width', 'shopbuilder' ),
684 'type' => 'slider',
685 'size_units' => [ '%', 'px' ],
686 'separator' => 'default',
687 'range' => [
688 '%' => [
689 'min' => 0,
690 'max' => 100,
691 'step' => 1,
692 ],
693 'px' => [
694 'min' => 0,
695 'max' => 2000,
696 'step' => 1,
697 ],
698 ],
699 'default' => [
700 'unit' => 'px',
701 'size' => '130',
702 ],
703 'selectors' => [
704 self::$selectors['table_thumbnail_width'] => 'width: {{SIZE}}{{UNIT}} !important;',
705 ],
706 ],
707 'table_thumbnail_padding' => [
708 'label' => esc_html__( 'Padding (px)', 'shopbuilder' ),
709 'type' => 'dimensions',
710 'mode' => 'responsive',
711 'size_units' => [ 'px' ],
712 'selectors' => [
713 self::$selectors['table_thumbnail_padding'] => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
714 ],
715 'separator' => 'before',
716 ],
717 'table_thumbnail_border_radius' => [
718 'label' => esc_html__( 'Border Radius (px)', 'shopbuilder' ),
719 'type' => 'dimensions',
720 'mode' => 'responsive',
721 'size_units' => [ 'px' ],
722 'separator' => 'before',
723 'selectors' => [
724 self::$selectors['table_thumbnail_border_radius'] => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
725 ],
726 ],
727 'table_image_section_end' => [
728 'mode' => 'section_end',
729 ],
730 ];
731
732 return $fields;
733 }
734
735 /**
736 * Widget Field
737 *
738 * @return array
739 */
740 public static function general_settings( $widget ) {
741 $fields = [
742 'general_section' => [
743 'mode' => 'section_start',
744 'label' => esc_html__( 'General ', 'shopbuilder' ),
745 ],
746 'show_coupon_field' => [
747 'label' => esc_html__( 'Show Coupon field?', 'shopbuilder' ),
748 'type' => 'switch',
749 'description' => esc_html__( 'Switch on to show Coupon.', 'shopbuilder' ),
750 'separator' => rtsb()->has_pro() ? 'default' : 'after',
751 'default' => 'yes',
752 ],
753 'show_clear_cart_button' => [
754 'label' => esc_html__( 'Show Clear Cart Button?', 'shopbuilder' ),
755 'type' => 'switch',
756 'description' => esc_html__( 'Switch on to show cart clear button.', 'shopbuilder' ),
757 'classes' => $widget->pro_class(),
758 ],
759 'table_horizontal_scroll_on_mobile' => [
760 'label' => esc_html__( 'Show default Table View On Mobile?', 'shopbuilder' ),
761 'type' => 'switch',
762 'description' => esc_html__( 'Show default Table View On Mobile?', 'shopbuilder' ),
763 'default' => '',
764 'separator' => rtsb()->has_pro() ? 'default' : 'before-short',
765 ],
766 'table_min_width' => [
767 'mode' => 'responsive',
768 'label' => esc_html__( 'Table Minimum Width', 'shopbuilder' ),
769 'description' => esc_html__( 'Enter table min-width (in px),', 'shopbuilder' ),
770 'type' => 'slider',
771 'size_units' => [ 'px' ],
772 'range' => [
773 'px' => [
774 'min' => 0,
775 'max' => 1000,
776 'step' => 5,
777 ],
778 ],
779 'condition' => [
780 'table_horizontal_scroll_on_mobile' => 'yes',
781 ],
782 'selectors' => [
783 self::$selectors['table_min_width'] => 'min-width: {{SIZE}}{{UNIT}};',
784 ],
785 ],
786 'show_image_on_mobile' => [
787 'label' => esc_html__( 'Show Image On Mobile?', 'shopbuilder' ),
788 'type' => 'switch',
789 'description' => esc_html__( 'Switch on to show Image on mobile Devices.', 'shopbuilder' ),
790 'default' => '',
791 'separator' => rtsb()->has_pro() ? 'default' : 'after',
792 'condition' => [
793 'table_horizontal_scroll_on_mobile' => '',
794 ],
795 ],
796 'ajax_on_qty_change' => [
797 'label' => esc_html__( 'Auto Update Cart?', 'shopbuilder' ),
798 'type' => 'switch',
799 'description' => esc_html__( 'Switch on to auto update cart with Ajax when quantity changes.', 'shopbuilder' ),
800 'classes' => $widget->pro_class(),
801 ],
802 'cart_empty_message' => [
803 'type' => 'text',
804 'label' => esc_html__( 'Cart Empty Text', 'shopbuilder' ),
805 'description' => esc_html__( 'Leave Empty For default.', 'shopbuilder' ),
806 'label_block' => true,
807 'separator' => rtsb()->has_pro() ? 'default' : 'before-short',
808 ],
809 'cart_table' => [
810 'type' => 'repeater',
811 'mode' => 'repeater',
812 'label' => esc_html__( 'Cart Table', 'shopbuilder' ),
813 'fields' => [
814 'cart_table_items' => [
815 'label' => esc_html__( 'Table Item', 'shopbuilder' ),
816 'type' => 'select',
817 'separator' => 'default',
818 'default' => 'remove',
819 'options' => [
820 'remove' => esc_html__( 'Remove', 'shopbuilder' ),
821 'thumbnail' => esc_html__( 'Thumbnail', 'shopbuilder' ),
822 'name' => esc_html__( 'Product Title', 'shopbuilder' ),
823 'price' => esc_html__( 'Price', 'shopbuilder' ),
824 'quantity' => esc_html__( 'Quantity', 'shopbuilder' ),
825 'subtotal' => esc_html__( 'Total', 'shopbuilder' ),
826 'custom_field' => esc_html__( 'Custom Field', 'shopbuilder' ),
827 ],
828 ],
829 'cart_table_heading_title' => [
830 'label' => esc_html__( 'Heading', 'shopbuilder' ),
831 'type' => 'text',
832 'separator' => 'default',
833 ],
834 // Thumbnail.
835 'cart_table_thumbnail_size' => [
836 'type' => 'select',
837 'label' => esc_html__( 'Thumbnail Size', 'shopbuilder' ),
838 'default' => 'woocommerce_thumbnail',
839 'options' => Fns::get_image_sizes(),
840 'condition' => [
841 'cart_table_items' => [ 'thumbnail', 'products' ],
842 ],
843 ],
844 // Remove Icon.
845 'cart_table_remove_icon' => [
846 'label' => esc_html__( 'Icon', 'shopbuilder' ),
847 'type' => 'icons',
848 'fa4compatibility' => 'breadcrumbsicon',
849 'default' => [
850 'value' => 'fas fa-times-circle',
851 'library' => 'fa-solid',
852 ],
853 'condition' => [
854 'cart_table_items' => 'remove',
855 ],
856 ],
857 'cart_table_custom_field' => [
858 'label' => esc_html__( 'Meta Field Key', 'shopbuilder' ),
859 'type' => 'text',
860 'condition' => [
861 'cart_table_items' => 'custom_field',
862 ],
863 ],
864 'cart_table_custom_field_fallback' => [
865 'label' => esc_html__( 'Fallback', 'shopbuilder' ),
866 'type' => 'text',
867 'default' => '',
868 'description' => esc_html__( 'Show this if field value is empty', 'shopbuilder' ),
869 'condition' => [
870 'cart_table_items' => 'custom_field',
871 ],
872 ],
873
874 // Product Title.
875 'show_sku' => [
876 'label' => esc_html__( 'Show SKU?', 'shopbuilder' ),
877 'type' => 'switch',
878 'description' => esc_html__( 'Switch on to show Show SKU.', 'shopbuilder' ),
879 'separator' => rtsb()->has_pro() ? 'default' : 'after',
880 'classes' => $widget->pro_class(),
881 'default' => 'yes',
882 'condition' => [
883 'cart_table_items' => [ 'name', 'products' ],
884 ],
885 ],
886 'show_variation_data' => [
887 'label' => esc_html__( 'Show Variations Data?', 'shopbuilder' ),
888 'type' => 'switch',
889 'description' => esc_html__( 'Switch on to show Show Variations Data.', 'shopbuilder' ),
890 'separator' => rtsb()->has_pro() ? 'default' : 'after',
891 'classes' => $widget->pro_class(),
892 'default' => 'yes',
893 'condition' => [
894 'cart_table_items' => [ 'name', 'products' ],
895 ],
896 ],
897 // Sub Total.
898 'show_remove_button' => [
899 'label' => esc_html__( 'Show Remove Button?', 'shopbuilder' ),
900 'type' => 'switch',
901 'description' => esc_html__( 'Switch on to show remove button below subtotal.', 'shopbuilder' ),
902 'default' => '',
903 'classes' => $widget->pro_class(),
904 'separator' => rtsb()->has_pro() ? 'before-short' : 'default',
905 'condition' => [
906 'cart_table_items' => 'subtotal',
907 ],
908 ],
909 'remove_button_text' => [
910 'label' => esc_html__( 'Remove Button Text', 'shopbuilder' ),
911 'type' => 'text',
912 'default' => __( 'Remove', 'shopbuilder' ),
913 'classes' => $widget->pro_class(),
914 'separator' => rtsb()->has_pro() ? 'before-short' : 'default',
915 'label_block' => true,
916 'condition' => [
917 'show_remove_button' => 'yes',
918 ],
919 ],
920 'show_wishlist_button' => [
921 'label' => esc_html__( 'Show Wishlist Button?', 'shopbuilder' ),
922 'type' => 'switch',
923 'description' => esc_html__( 'Switch on to show wishlist button below subtotal.', 'shopbuilder' ),
924 'default' => '',
925 'classes' => $widget->pro_class(),
926 'separator' => rtsb()->has_pro() ? 'before-short' : 'default',
927 'condition' => [
928 'cart_table_items' => 'subtotal',
929 ],
930 ],
931 'wishlist_button_text' => [
932 'label' => esc_html__( 'Wishlist Button Text', 'shopbuilder' ),
933 'type' => 'text',
934 'default' => __( 'Save for Later', 'shopbuilder' ),
935 'classes' => $widget->pro_class(),
936 'separator' => rtsb()->has_pro() ? 'before-short' : 'default',
937 'label_block' => true,
938 'condition' => [
939 'show_wishlist_button' => 'yes',
940 ],
941 ],
942 'cart_table_cell_width' => [
943 'mode' => 'responsive',
944 'label' => esc_html__( 'Column Width', 'shopbuilder' ),
945 'type' => 'slider',
946 'size_units' => [ 'px', '%' ],
947 'range' => [
948 'px' => [
949 'min' => 0,
950 'max' => 1000,
951 'step' => 5,
952 ],
953 '%' => [
954 'min' => 0,
955 'max' => 100,
956 ],
957 ],
958 'selectors' => [
959 self::$selectors['cart_table_cell_width']['th'] . '{{CURRENT_ITEM}}' => 'width: {{SIZE}}{{UNIT}};',
960 self::$selectors['cart_table_cell_width']['td'] . '{{CURRENT_ITEM}}' => 'width: {{SIZE}}{{UNIT}};',
961 ],
962 ],
963 ],
964 'default' => [
965 [
966 'cart_table_items' => 'remove',
967 'cart_table_heading_title' => esc_html__( 'Remove', 'shopbuilder' ),
968 ],
969 [
970 'cart_table_items' => 'thumbnail',
971 'cart_table_heading_title' => esc_html__( 'Thumbnail', 'shopbuilder' ),
972 ],
973 [
974 'cart_table_items' => 'name',
975 'cart_table_heading_title' => esc_html__( 'Product Title', 'shopbuilder' ),
976 ],
977 [
978 'cart_table_items' => 'price',
979 'cart_table_heading_title' => esc_html__( 'Price', 'shopbuilder' ),
980 ],
981 [
982 'cart_table_items' => 'quantity',
983 'cart_table_heading_title' => esc_html__( 'Quantity', 'shopbuilder' ),
984 ],
985 [
986 'cart_table_items' => 'subtotal',
987 'cart_table_heading_title' => esc_html__( 'Total', 'shopbuilder' ),
988 ],
989 ],
990 'title_field' => '{{{ cart_table_heading_title }}}',
991 ],
992
993 'general_section_end' => [
994 'mode' => 'section_end',
995 ],
996 ];
997
998 return $fields;
999 }
1000
1001 /**
1002 * Widget Field
1003 *
1004 * @return array
1005 */
1006 public static function action_control() {
1007 $fields = [
1008 'action_control_section' => [
1009 'mode' => 'section_start',
1010 'label' => esc_html__( 'Button Text ', 'shopbuilder' ),
1011 ],
1012 'cart_table_update_button_heading' => [
1013 'type' => 'html',
1014 'raw' => sprintf(
1015 '<h3 class="rtsb-elementor-group-heading">%s</h3>',
1016 esc_html__( 'Button', 'shopbuilder' )
1017 ),
1018 'content_classes' => 'elementor-panel-heading-title',
1019 'separator' => 'default',
1020 ],
1021 'return_to_shop_text' => [
1022 'type' => 'text',
1023 'label' => esc_html__( 'Return to Shop Button Label', 'shopbuilder' ),
1024 'description' => esc_html__( 'Return to shop button text. Leave Empty For default.', 'shopbuilder' ),
1025 'separator' => 'default',
1026 'label_block' => true,
1027 ],
1028 'cart_table_update_button_text' => [
1029 'label' => esc_html__( 'Update Cart Button Label', 'shopbuilder' ),
1030 'type' => 'text',
1031 'default' => esc_html__( 'Update Cart', 'shopbuilder' ),
1032 'placeholder' => esc_html__( 'Update Cart', 'shopbuilder' ),
1033 'label_block' => true,
1034 ],
1035 'cart_table_clear_cart_button_text' => [
1036 'label' => esc_html__( 'Clear Cart Button Label', 'shopbuilder' ),
1037 'type' => 'text',
1038 'default' => esc_html__( 'Clear All', 'shopbuilder' ),
1039 'placeholder' => esc_html__( 'Clear All', 'shopbuilder' ),
1040 'label_block' => true,
1041 'condition' => [
1042 'show_clear_cart_button' => 'yes',
1043 ],
1044 ],
1045 'cart_table_coupon_form_heading' => [
1046 'type' => 'html',
1047 'raw' => sprintf(
1048 '<h3 class="rtsb-elementor-group-heading">%s</h3>',
1049 esc_html__( 'Coupon Form', 'shopbuilder' )
1050 ),
1051 'content_classes' => 'elementor-panel-heading-title',
1052 'separator' => 'before',
1053 'condition' => [
1054 'show_coupon_field' => 'yes',
1055 ],
1056 ],
1057 'cart_table_coupon_button_text' => [
1058 'label' => esc_html__( 'Button Label', 'shopbuilder' ),
1059 'type' => 'text',
1060 'separator' => 'default',
1061 'default' => esc_html__( 'Apply Coupon', 'shopbuilder' ),
1062 'placeholder' => esc_html__( 'Apply Coupon', 'shopbuilder' ),
1063 'label_block' => true,
1064 'condition' => [
1065 'show_coupon_field' => 'yes',
1066 ],
1067 ],
1068 'cart_table_coupon_placeholder_text' => [
1069 'label' => esc_html__( 'Placeholder Text', 'shopbuilder' ),
1070 'type' => 'text',
1071 'default' => esc_html__( 'Coupon Code', 'shopbuilder' ),
1072 'placeholder' => esc_html__( 'Coupon Code', 'shopbuilder' ),
1073 'label_block' => true,
1074 'condition' => [
1075 'show_coupon_field' => 'yes',
1076 ],
1077 ],
1078
1079 'action_control_section_end' => [
1080 'mode' => 'section_end',
1081 ],
1082 ];
1083
1084 return $fields;
1085 }
1086
1087 /**
1088 * Widget Field
1089 *
1090 * @return array
1091 */
1092 public static function notice_style() {
1093 $fields = [
1094 'notice_section' => [
1095 'mode' => 'section_start',
1096 'tab' => 'style',
1097 'label' => esc_html__( 'Cart Empty Notice ', 'shopbuilder' ),
1098 ],
1099 'notice_typography' => [
1100 'mode' => 'group',
1101 'type' => 'typography',
1102 'label' => esc_html__( 'Typography', 'shopbuilder' ),
1103 'selector' => self::$selectors['notice_typography'],
1104 ],
1105 'notice_padding' => [
1106 'label' => esc_html__( 'Padding (px)', 'shopbuilder' ),
1107 'type' => 'dimensions',
1108 'mode' => 'responsive',
1109 'size_units' => [ 'px' ],
1110 'selectors' => [
1111 self::$selectors['notice_padding'] => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;',
1112 ],
1113 'separator' => 'before',
1114 ],
1115
1116 // Tab For normal view.
1117 'notice_bg_color' => [
1118 'label' => esc_html__( 'Background Color', 'shopbuilder' ),
1119 'type' => 'color',
1120 'separator' => 'default',
1121 'selectors' => [
1122 self::$selectors['notice_bg_color'] => 'background-color: {{VALUE}};',
1123 ],
1124 ],
1125 'notice_text_color' => [
1126 'label' => esc_html__( 'Color', 'shopbuilder' ),
1127 'type' => 'color',
1128
1129 'selectors' => [
1130 self::$selectors['notice_text_color'] => 'color: {{VALUE}};',
1131 ],
1132 ],
1133 'notice_border_color' => [
1134 'label' => esc_html__( 'Border Color', 'shopbuilder' ),
1135 'type' => 'color',
1136
1137 'selectors' => [
1138 self::$selectors['notice_border_color'] => 'border-color: {{VALUE}};',
1139 ],
1140 ],
1141 'icon_heading' => [
1142 'type' => 'html',
1143 'raw' => sprintf(
1144 '<h3 class="rtsb-elementor-group-heading">%s</h3>',
1145 esc_html__( 'Icon', 'shopbuilder' )
1146 ),
1147 'content_classes' => 'elementor-panel-heading-title',
1148 'separator' => 'default',
1149 ],
1150 'notice_icon_size' => [
1151 'label' => esc_html__( 'Notice Icon Size', 'shopbuilder' ),
1152 'type' => 'slider',
1153 'mode' => 'responsive',
1154 'range' => [
1155 'px' => [
1156 'min' => 0,
1157 'max' => 100,
1158 ],
1159 ],
1160 'selectors' => [
1161 self::$selectors['notice_icon_size'] => 'width: {{SIZE}}{{UNIT}};',
1162 ],
1163 ],
1164 'icon_color' => [
1165 'label' => esc_html__( 'Icon Color', 'shopbuilder' ),
1166 'type' => 'color',
1167 'separator' => 'before',
1168 'selectors' => [
1169 self::$selectors['icon_color'] => 'color: {{VALUE}};fill: currentColor;',
1170 ],
1171 ],
1172 'icon_bg_color' => [
1173 'label' => esc_html__( 'Icon Background Color', 'shopbuilder' ),
1174 'type' => 'color',
1175 'selectors' => [
1176 self::$selectors['icon_bg_color'] => 'background-color: {{VALUE}};fill: currentColor;',
1177 ],
1178 ],
1179 'icon_margin' => [
1180 'label' => esc_html__( 'Icon Margin (px)', 'shopbuilder' ),
1181 'type' => 'dimensions',
1182 'mode' => 'responsive',
1183 'size_units' => [ 'px' ],
1184 'selectors' => [
1185 self::$selectors['icon_margin'] => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1186 ],
1187 ],
1188 'notice_section_end' => [
1189 'mode' => 'section_end',
1190 ],
1191 ];
1192
1193 return $fields;
1194 }
1195
1196 /**
1197 * Widget Field
1198 *
1199 * @return array
1200 */
1201 public static function input_style() {
1202 $fields = [
1203 'input_section_start' => [
1204 'mode' => 'section_start',
1205 'label' => esc_html__( 'Coupon Input Field', 'shopbuilder' ),
1206 'tab' => 'style',
1207 ],
1208
1209 'coupon_typography' => [
1210 'mode' => 'group',
1211 'type' => 'typography',
1212 'label' => esc_html__( 'Typography', 'shopbuilder' ),
1213 'selector' => self::$selectors['coupon_typography'],
1214 ],
1215
1216 'coupon_input_width' => [
1217 'label' => esc_html__( 'Coupon Width', 'shopbuilder' ),
1218 'type' => 'slider',
1219 'range' => [
1220 'px' => [
1221 'min' => 80,
1222 'max' => 500,
1223 ],
1224 ],
1225 'default' => [
1226 'unit' => 'px',
1227 'size' => '180',
1228 ],
1229 'selectors' => [
1230 self::$selectors['coupon_input_width'] => 'width: {{SIZE}}{{UNIT}} !important;',
1231 ],
1232 ],
1233 'coupon_input_height' => [
1234 'label' => esc_html__( 'Coupon Height', 'shopbuilder' ),
1235 'type' => 'slider',
1236 'range' => [
1237 'px' => [
1238 'min' => 10,
1239 'max' => 100,
1240 ],
1241 ],
1242 'selectors' => [
1243 self::$selectors['coupon_input_height'] => 'height: {{SIZE}}{{UNIT}} !important;',
1244 ],
1245 ],
1246 'coupon_input_border' => [
1247 'mode' => 'group',
1248 'type' => 'border',
1249 'selector' => self::$selectors['coupon_input_border'],
1250 'size_units' => [ 'px' ],
1251 ],
1252 'coupon_border_radius' => [
1253 'label' => esc_html__( 'Border Radius (px)', 'shopbuilder' ),
1254 'type' => 'dimensions',
1255 'mode' => 'responsive',
1256 'size_units' => [ 'px' ],
1257 'separator' => 'before',
1258 'selectors' => [
1259 self::$selectors['coupon_border_radius'] => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1260 ],
1261 ],
1262 'input_text_color' => [
1263 'label' => esc_html__( 'Text Color', 'shopbuilder' ),
1264 'type' => 'color',
1265
1266 'selectors' => [
1267 self::$selectors['input_text_color'] => 'color: {{VALUE}};',
1268 ],
1269 ],
1270 'input_bg_color' => [
1271 'label' => esc_html__( 'Background Color', 'shopbuilder' ),
1272 'type' => 'color',
1273 'alpha' => true,
1274 'selectors' => [
1275 self::$selectors['input_bg_color'] => 'background-color: {{VALUE}};',
1276 ],
1277 ],
1278 'coupon_padding' => [
1279 'label' => esc_html__( 'Padding (px)', 'shopbuilder' ),
1280 'type' => 'dimensions',
1281 'mode' => 'responsive',
1282 'size_units' => [ 'px' ],
1283 'selectors' => [
1284 self::$selectors['coupon_padding'] => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;',
1285 ],
1286 'separator' => 'before',
1287 ],
1288 'coupon_style_section_end' => [
1289 'mode' => 'section_end',
1290 ],
1291 ];
1292
1293 return $fields;
1294 }
1295
1296 /**
1297 * Widget Field
1298 *
1299 * @return array
1300 */
1301 public static function return_shop_button_style() {
1302 $alignment = ControlHelper::alignment();
1303 unset( $alignment['justify'] );
1304 $fields = [
1305 'return_shop_button_section_start' => [
1306 'mode' => 'section_start',
1307 'label' => esc_html__( 'Return Shop Button', 'shopbuilder' ),
1308 'tab' => 'style',
1309 ],
1310 'return_shop_button_typography' => [
1311 'mode' => 'group',
1312 'type' => 'typography',
1313 'label' => esc_html__( 'Typography', 'shopbuilder' ),
1314 'selector' => self::$selectors['return_shop_button_typography'],
1315 ],
1316 'return_shop_button_height' => [
1317 'label' => esc_html__( 'Button Height', 'shopbuilder' ),
1318 'type' => 'slider',
1319 'range' => [
1320 'px' => [
1321 'min' => 10,
1322 'max' => 100,
1323 ],
1324 ],
1325 'selectors' => [
1326 self::$selectors['return_shop_button_height'] => 'height: {{SIZE}}{{UNIT}};',
1327 ],
1328 ],
1329 'return_shop_button_tabs_start' => [
1330 'mode' => 'tabs_start',
1331 ],
1332 // Tab For normal view.
1333 'return_shop_button_normal' => [
1334 'mode' => 'tab_start',
1335 'label' => esc_html__( 'Normal', 'shopbuilder' ),
1336 ],
1337 'return_shop_button_text_color_normal' => [
1338 'label' => esc_html__( 'Color', 'shopbuilder' ),
1339 'type' => 'color',
1340
1341 'separator' => 'default',
1342 'selectors' => [
1343 self::$selectors['return_shop_button_text_color_normal'] => 'color: {{VALUE}};',
1344 ],
1345 ],
1346 'return_shop_button_bg_color_normal' => [
1347 'label' => esc_html__( 'Background Color', 'shopbuilder' ),
1348 'type' => 'color',
1349 'selectors' => [
1350 self::$selectors['return_shop_button_bg_color_normal'] => 'background-color: {{VALUE}};',
1351 ],
1352 ],
1353
1354 'return_shop_button_border' => [
1355 'mode' => 'group',
1356 'type' => 'border',
1357 'selector' => self::$selectors['return_shop_button_border'],
1358 'size_units' => [ 'px' ],
1359 ],
1360 'return_shop_button_normal_end' => [
1361 'mode' => 'tab_end',
1362 ],
1363 'return_shop_button_hover' => [
1364 'mode' => 'tab_start',
1365 'label' => esc_html__( 'Hover', 'shopbuilder' ),
1366 ],
1367 'return_shop_button_text_color_hover' => [
1368 'label' => esc_html__( 'Color', 'shopbuilder' ),
1369 'type' => 'color',
1370
1371 'separator' => 'default',
1372 'selectors' => [
1373 self::$selectors['return_shop_button_text_color_hover'] => 'color: {{VALUE}};',
1374 ],
1375 ],
1376 'return_shop_button_bg_color_hover' => [
1377 'label' => esc_html__( 'Background Color', 'shopbuilder' ),
1378 'type' => 'color',
1379 'selectors' => [
1380 self::$selectors['return_shop_button_bg_color_hover'] => 'background-color: {{VALUE}};',
1381 ],
1382 ],
1383 'return_shop_button_border_hover_color' => [
1384 'label' => esc_html__( 'Border Color', 'shopbuilder' ),
1385 'type' => 'color',
1386
1387 'selectors' => [
1388 self::$selectors['return_shop_button_border_hover_color'] => 'border-color: {{VALUE}};',
1389 ],
1390 ],
1391 'return_shop_button_hover_end' => [
1392 'mode' => 'tab_end',
1393 ],
1394 'return_shop_button_tabs_end' => [
1395 'mode' => 'tabs_end',
1396 ],
1397 'return_shop_button_border_radius' => [
1398 'label' => esc_html__( 'Border Radius (px)', 'shopbuilder' ),
1399 'type' => 'dimensions',
1400 'mode' => 'responsive',
1401 'size_units' => [ 'px' ],
1402 'separator' => 'before',
1403 'selectors' => [
1404 self::$selectors['return_shop_button_border_radius'] => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1405 ],
1406 ],
1407 'return_shop_button_padding' => [
1408 'label' => esc_html__( 'Padding (px)', 'shopbuilder' ),
1409 'type' => 'dimensions',
1410 'mode' => 'responsive',
1411 'size_units' => [ 'px' ],
1412 'selectors' => [
1413 self::$selectors['return_shop_button_padding'] => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1414 ],
1415 'separator' => 'before',
1416 ],
1417 'return_shop_button_margin' => [
1418 'label' => esc_html__( 'Margin (px)', 'shopbuilder' ),
1419 'type' => 'dimensions',
1420 'mode' => 'responsive',
1421 'size_units' => [ 'px' ],
1422 'selectors' => [
1423 self::$selectors['return_shop_button_margin'] => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1424 ],
1425 ],
1426 'return_shop_button_section_end' => [
1427 'mode' => 'section_end',
1428 ],
1429 ];
1430
1431 return $fields;
1432 }
1433 }
1434