PluginProbe
ShopBuilder – WooCommerce Builder For Elementor / 2.2.0
ShopBuilder – WooCommerce Builder For Elementor v2.2.0
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.2.0, at app/Elementor/Widgets/Controls/CartTableSettings.php

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