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

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