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

1,407 lines 43.9 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 'show_image_on_mobile' => [
712 'label' => esc_html__( 'Show Image On Mobile?', 'shopbuilder' ),
713 'type' => 'switch',
714 'description' => esc_html__( 'Switch on to show Image on mobile Devices.', 'shopbuilder' ),
715 'default' => '',
716 ],
717
718 'cart_empty_message' => [
719 'type' => 'text',
720 'label' => esc_html__( 'Cart Empty Text', 'shopbuilder' ),
721 'description' => esc_html__( 'Leave Empty For default.', 'shopbuilder' ),
722 'label_block' => true,
723 ],
724
725 'cart_table' => [
726 'type' => 'repeater',
727 'mode' => 'repeater',
728 'label' => esc_html__( 'Cart Table', 'shopbuilder' ),
729 'fields' => [
730 'cart_table_items' => [
731 'label' => esc_html__( 'Table Item', 'shopbuilder' ),
732 'type' => 'select',
733 'separator' => 'default',
734 'default' => 'remove',
735 'options' => [
736 'remove' => esc_html__( 'Remove', 'shopbuilder' ),
737 'thumbnail' => esc_html__( 'Thumbnail', 'shopbuilder' ),
738 'name' => esc_html__( 'Product Title', 'shopbuilder' ),
739 'price' => esc_html__( 'Price', 'shopbuilder' ),
740 'quantity' => esc_html__( 'Quantity', 'shopbuilder' ),
741 'subtotal' => esc_html__( 'Total', 'shopbuilder' ),
742 'custom_field' => esc_html__( 'Custom Field', 'shopbuilder' ),
743 ],
744 ],
745 'cart_table_heading_title' => [
746 'label' => esc_html__( 'Heading', 'shopbuilder' ),
747 'type' => 'text',
748 'separator' => 'default',
749 ],
750 // Thumbnail
751 'cart_table_thumbnail_size' => [
752 'type' => 'select',
753 'label' => esc_html__( 'Thumbnail Size', 'shopbuilder' ),
754 'default' => 'woocommerce_thumbnail',
755 'options' => Fns::get_image_sizes(),
756 'condition' => [
757 'cart_table_items' => [ 'thumbnail', 'products' ],
758 ],
759 ],
760 // Remove Icon
761 'cart_table_remove_icon' => [
762 'label' => esc_html__( 'Icon', 'shopbuilder' ),
763 'type' => 'icons',
764 'fa4compatibility' => 'breadcrumbsicon',
765 'default' => [
766 'value' => 'fas fa-times-circle',
767 'library' => 'fa-solid',
768 ],
769 'condition' => [
770 'cart_table_items' => 'remove',
771 ],
772 ],
773
774 'cart_table_custom_field' => [
775 'label' => esc_html__( 'Meta Field Key', 'shopbuilder' ),
776 'type' => 'text',
777 'condition' => [
778 'cart_table_items' => 'custom_field',
779 ],
780 ],
781 'cart_table_custom_field_fallback' => [
782 'label' => esc_html__( 'Fallback', 'shopbuilder' ),
783 'type' => 'text',
784 'default' => '',
785 'description' => esc_html__( 'Show this if field value is empty', 'shopbuilder' ),
786 'condition' => [
787 'cart_table_items' => 'custom_field',
788 ],
789 ],
790
791 // Product Title
792 'show_sku' => [
793 'label' => esc_html__( 'Show SKU?', 'shopbuilder' ),
794 'type' => 'switch',
795 'description' => esc_html__( 'Switch on to show Show SKU.', 'shopbuilder' ),
796 'separator' => rtsb()->has_pro() ? 'default' : 'after',
797 'classes' => $widget->pro_class(),
798 'default' => 'yes',
799 'condition' => [
800 'cart_table_items' => [ 'name', 'products' ],
801 ],
802 ],
803 'show_variation_data' => [
804 'label' => esc_html__( 'Show Variations Data?', 'shopbuilder' ),
805 'type' => 'switch',
806 'description' => esc_html__( 'Switch on to show Show Variations Data.', '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 // Sub Total
815 'show_remove_button' => [
816 'label' => esc_html__( 'Show Remove Button?', 'shopbuilder' ),
817 'type' => 'switch',
818 'description' => esc_html__( 'Switch on to show remove button below subtotal.', 'shopbuilder' ),
819 'default' => '',
820 'classes' => $widget->pro_class(),
821 'separator' => rtsb()->has_pro() ? 'before-short' : 'default',
822 'condition' => [
823 'cart_table_items' => 'subtotal',
824 ],
825 ],
826 'remove_button_text' => [
827 'label' => esc_html__( 'Remove Button Text', 'shopbuilder' ),
828 'type' => 'text',
829 'default' => __( 'Remove', 'shopbuilder' ),
830 'classes' => $widget->pro_class(),
831 'separator' => rtsb()->has_pro() ? 'before-short' : 'default',
832 'label_block' => true,
833 'condition' => [
834 'show_remove_button' => 'yes',
835 ],
836 ],
837 'show_wishlist_button' => [
838 'label' => esc_html__( 'Show Wishlist Button?', 'shopbuilder' ),
839 'type' => 'switch',
840 'description' => esc_html__( 'Switch on to show wishlist button below subtotal.', 'shopbuilder' ),
841 'default' => '',
842 'classes' => $widget->pro_class(),
843 'separator' => rtsb()->has_pro() ? 'before-short' : 'default',
844 'condition' => [
845 'cart_table_items' => 'subtotal',
846 ],
847 ],
848 'wishlist_button_text' => [
849 'label' => esc_html__( 'Wishlist Button Text', 'shopbuilder' ),
850 'type' => 'text',
851 'default' => __( 'Save for Later', 'shopbuilder' ),
852 'classes' => $widget->pro_class(),
853 'separator' => rtsb()->has_pro() ? 'before-short' : 'default',
854 'label_block' => true,
855 'condition' => [
856 'show_wishlist_button' => 'yes',
857 ],
858 ],
859 'cart_table_cell_width' => [
860 'mode' => 'responsive',
861 'label' => esc_html__( 'Column Width', 'shopbuilder' ),
862 'type' => 'slider',
863 'size_units' => [ 'px', '%' ],
864 'range' => [
865 'px' => [
866 'min' => 0,
867 'max' => 1000,
868 'step' => 5,
869 ],
870 '%' => [
871 'min' => 0,
872 'max' => 100,
873 ],
874 ],
875 'selectors' => [
876 self::$selectors['cart_table_cell_width']['th'] . '{{CURRENT_ITEM}}' => 'width: {{SIZE}}{{UNIT}};',
877 self::$selectors['cart_table_cell_width']['td'] . '{{CURRENT_ITEM}}' => 'width: {{SIZE}}{{UNIT}};',
878 ],
879 ],
880 ],
881 'default' => [
882 [
883 'cart_table_items' => 'remove',
884 'cart_table_heading_title' => esc_html__( 'Remove', 'shopbuilder' ),
885 ],
886 [
887 'cart_table_items' => 'thumbnail',
888 'cart_table_heading_title' => esc_html__( 'Thumbnail', 'shopbuilder' ),
889 ],
890 [
891 'cart_table_items' => 'name',
892 'cart_table_heading_title' => esc_html__( 'Product Title', 'shopbuilder' ),
893 ],
894 [
895 'cart_table_items' => 'price',
896 'cart_table_heading_title' => esc_html__( 'Price', 'shopbuilder' ),
897 ],
898 [
899 'cart_table_items' => 'quantity',
900 'cart_table_heading_title' => esc_html__( 'Quantity', 'shopbuilder' ),
901 ],
902 [
903 'cart_table_items' => 'subtotal',
904 'cart_table_heading_title' => esc_html__( 'Total', 'shopbuilder' ),
905 ],
906 ],
907 'title_field' => '{{{ cart_table_heading_title }}}',
908 ],
909
910 'general_section_end' => [
911 'mode' => 'section_end',
912 ],
913 ];
914
915 return $fields;
916 }
917
918 /**
919 * Widget Field
920 *
921 * @return array
922 */
923 public static function action_control() {
924 $fields = [
925 'action_control_section' => [
926 'mode' => 'section_start',
927 'label' => esc_html__( 'Button Text ', 'shopbuilder' ),
928 ],
929 'cart_table_update_button_heading' => [
930 'type' => 'html',
931 'raw' => sprintf(
932 '<h3 class="rtsb-elementor-group-heading">%s</h3>',
933 esc_html__( 'Button', 'shopbuilder' )
934 ),
935 'content_classes' => 'elementor-panel-heading-title',
936 'separator' => 'default',
937 ],
938 'return_to_shop_text' => [
939 'type' => 'text',
940 'label' => esc_html__( 'Return to Shop Button Label', 'shopbuilder' ),
941 'description' => esc_html__( 'Return to shop button text. Leave Empty For default.', 'shopbuilder' ),
942 'separator' => 'default',
943 'label_block' => true,
944 ],
945 'cart_table_update_button_text' => [
946 'label' => esc_html__( 'Update Cart Button Label', 'shopbuilder' ),
947 'type' => 'text',
948 'default' => esc_html__( 'Update Cart', 'shopbuilder' ),
949 'placeholder' => esc_html__( 'Update Cart', 'shopbuilder' ),
950 'label_block' => true,
951 ],
952 'cart_table_clear_cart_button_text' => [
953 'label' => esc_html__( 'Clear Cart Button Label', 'shopbuilder' ),
954 'type' => 'text',
955 'default' => esc_html__( 'Clear All', 'shopbuilder' ),
956 'placeholder' => esc_html__( 'Clear All', 'shopbuilder' ),
957 'label_block' => true,
958 'condition' => [
959 'show_clear_cart_button' => 'yes',
960 ],
961 ],
962 'cart_table_coupon_form_heading' => [
963 'type' => 'html',
964 'raw' => sprintf(
965 '<h3 class="rtsb-elementor-group-heading">%s</h3>',
966 esc_html__( 'Coupon Form', 'shopbuilder' )
967 ),
968 'content_classes' => 'elementor-panel-heading-title',
969 'separator' => 'before',
970 'condition' => [
971 'show_coupon_field' => 'yes',
972 ],
973 ],
974 'cart_table_coupon_button_text' => [
975 'label' => esc_html__( 'Button Label', 'shopbuilder' ),
976 'type' => 'text',
977 'separator' => 'default',
978 'default' => esc_html__( 'Apply Coupon', 'shopbuilder' ),
979 'placeholder' => esc_html__( 'Apply Coupon', 'shopbuilder' ),
980 'label_block' => true,
981 'condition' => [
982 'show_coupon_field' => 'yes',
983 ],
984 ],
985 'cart_table_coupon_placeholder_text' => [
986 'label' => esc_html__( 'Placeholder Text', 'shopbuilder' ),
987 'type' => 'text',
988 'default' => esc_html__( 'Coupon Code', 'shopbuilder' ),
989 'placeholder' => esc_html__( 'Coupon Code', 'shopbuilder' ),
990 'label_block' => true,
991 'condition' => [
992 'show_coupon_field' => 'yes',
993 ],
994 ],
995
996 'action_control_section_end' => [
997 'mode' => 'section_end',
998 ],
999 ];
1000
1001 return $fields;
1002 }
1003
1004 /**
1005 * Widget Field
1006 *
1007 * @return array
1008 */
1009 public static function notice_style() {
1010 $fields = [
1011 'notice_section' => [
1012 'mode' => 'section_start',
1013 'tab' => 'style',
1014 'label' => esc_html__( 'Notice ', 'shopbuilder' ),
1015 ],
1016 'notice_typography' => [
1017 'mode' => 'group',
1018 'type' => 'typography',
1019 'label' => esc_html__( 'Typography', 'shopbuilder' ),
1020 'selector' => self::$selectors['notice_typography'],
1021 ],
1022 'notice_padding' => [
1023 'label' => esc_html__( 'Padding (px)', 'shopbuilder' ),
1024 'type' => 'dimensions',
1025 'mode' => 'responsive',
1026 'size_units' => [ 'px' ],
1027 'selectors' => [
1028 self::$selectors['notice_padding'] => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1029 ],
1030 'separator' => 'before',
1031 ],
1032
1033 'notice_tabs_start' => [
1034 'mode' => 'tabs_start',
1035 ],
1036 // Tab For normal view.
1037 'notice_normal' => [
1038 'mode' => 'tab_start',
1039 'label' => esc_html__( 'Success Message', 'shopbuilder' ),
1040 ],
1041 'notice_bg_color' => [
1042 'label' => esc_html__( 'Background Color', 'shopbuilder' ),
1043 'type' => 'color',
1044
1045 'separator' => 'default',
1046 'selectors' => [
1047 self::$selectors['notice_bg_color'] => 'background-color: {{VALUE}};',
1048 ],
1049 ],
1050 'notice_text_color' => [
1051 'label' => esc_html__( 'Color', 'shopbuilder' ),
1052 'type' => 'color',
1053
1054 'selectors' => [
1055 self::$selectors['notice_text_color'] => 'color: {{VALUE}};',
1056 ],
1057 ],
1058 'notice_border_color' => [
1059 'label' => esc_html__( 'Border Color', 'shopbuilder' ),
1060 'type' => 'color',
1061
1062 'selectors' => [
1063 self::$selectors['notice_border_color'] => 'border-color: {{VALUE}};',
1064 ],
1065 ],
1066 'notice_normal_end' => [
1067 'mode' => 'tab_end',
1068 ],
1069 'notice_hover' => [
1070 'mode' => 'tab_start',
1071 'label' => esc_html__( 'Error Messsage', 'shopbuilder' ),
1072 ],
1073 'error_notice_bg_color' => [
1074 'label' => esc_html__( 'Background Color', 'shopbuilder' ),
1075 'type' => 'color',
1076 'separator' => 'default',
1077
1078 'selectors' => [
1079 self::$selectors['error_notice_bg_color'] => 'background-color: {{VALUE}};',
1080 ],
1081 ],
1082 'error_notice_text_color' => [
1083 'label' => esc_html__( 'Color', 'shopbuilder' ),
1084 'type' => 'color',
1085
1086 'selectors' => [
1087 self::$selectors['error_notice_text_color'] => 'color: {{VALUE}};',
1088 ],
1089 ],
1090 'error_notice_border_color' => [
1091 'label' => esc_html__( 'Border Color', 'shopbuilder' ),
1092 'type' => 'color',
1093
1094 'selectors' => [
1095 self::$selectors['error_notice_border_color'] => 'border-color: {{VALUE}};',
1096 ],
1097 ],
1098 'notice_hover_end' => [
1099 'mode' => 'tab_end',
1100 ],
1101 'notice_tabs_end' => [
1102 'mode' => 'tabs_end',
1103 ],
1104
1105 'notice_section_end' => [
1106 'mode' => 'section_end',
1107 ],
1108 ];
1109
1110 return $fields;
1111 }
1112
1113 /**
1114 * Widget Field
1115 *
1116 * @return array
1117 */
1118 public static function input_style() {
1119 $fields = [
1120 'input_section_start' => [
1121 'mode' => 'section_start',
1122 'label' => esc_html__( 'Coupon Input Field', 'shopbuilder' ),
1123 'tab' => 'style',
1124 ],
1125
1126 'coupon_typography' => [
1127 'mode' => 'group',
1128 'type' => 'typography',
1129 'label' => esc_html__( 'Typography', 'shopbuilder' ),
1130 'selector' => self::$selectors['coupon_typography'],
1131 ],
1132
1133 'coupon_input_width' => [
1134 'label' => esc_html__( 'Coupon Width', 'shopbuilder' ),
1135 'type' => 'slider',
1136 'range' => [
1137 'px' => [
1138 'min' => 80,
1139 'max' => 500,
1140 ],
1141 ],
1142 'selectors' => [
1143 self::$selectors['coupon_input_width'] => 'width: {{SIZE}}{{UNIT}} !important;',
1144 ],
1145 ],
1146 'coupon_input_height' => [
1147 'label' => esc_html__( 'Coupon Height', 'shopbuilder' ),
1148 'type' => 'slider',
1149 'range' => [
1150 'px' => [
1151 'min' => 10,
1152 'max' => 100,
1153 ],
1154 ],
1155 'selectors' => [
1156 self::$selectors['coupon_input_height'] => 'height: {{SIZE}}{{UNIT}} !important;',
1157 ],
1158 ],
1159 'input_border' => [
1160 'mode' => 'group',
1161 'type' => 'border',
1162 'selector' => self::$selectors['input_border'],
1163 'size_units' => [ 'px' ],
1164 ],
1165 'coupon_border_radius' => [
1166 'label' => esc_html__( 'Border Radius (px)', 'shopbuilder' ),
1167 'type' => 'dimensions',
1168 'mode' => 'responsive',
1169 'size_units' => [ 'px' ],
1170 'separator' => 'before',
1171 'selectors' => [
1172 self::$selectors['coupon_border_radius'] => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1173 ],
1174 ],
1175 'input_text_color' => [
1176 'label' => esc_html__( 'Text Color', 'shopbuilder' ),
1177 'type' => 'color',
1178
1179 'selectors' => [
1180 self::$selectors['input_text_color'] => 'color: {{VALUE}};',
1181 ],
1182 ],
1183 'input_bg_color' => [
1184 'label' => esc_html__( 'Background Color', 'shopbuilder' ),
1185 'type' => 'color',
1186 'alpha' => true,
1187 'selectors' => [
1188 self::$selectors['input_bg_color'] => 'background-color: {{VALUE}};',
1189 ],
1190 ],
1191 'coupon_padding' => [
1192 'label' => esc_html__( 'Padding (px)', 'shopbuilder' ),
1193 'type' => 'dimensions',
1194 'mode' => 'responsive',
1195 'size_units' => [ 'px' ],
1196 'selectors' => [
1197 self::$selectors['coupon_padding'] => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1198 ],
1199 'separator' => 'before',
1200 ],
1201 'coupon_style_section_end' => [
1202 'mode' => 'section_end',
1203 ],
1204 ];
1205
1206 return $fields;
1207 }
1208
1209 /**
1210 * Widget Field
1211 *
1212 * @return array
1213 */
1214 public static function cart_empty() {
1215 $fields = [
1216 'empty_notice_section' => [
1217 'mode' => 'section_start',
1218 'tab' => 'style',
1219 'label' => esc_html__( 'Cart Empty', 'shopbuilder' ),
1220 ],
1221
1222 'empty_notice_typography' => [
1223 'mode' => 'group',
1224 'type' => 'typography',
1225 'label' => esc_html__( 'Typography', 'shopbuilder' ),
1226 'selector' => self::$selectors['empty_notice_typography'],
1227 ],
1228 'empty_notice_bg_color' => [
1229 'label' => esc_html__( 'Background Color', 'shopbuilder' ),
1230 'type' => 'color',
1231 'selectors' => [
1232 self::$selectors['empty_notice_bg_color'] => 'background-color: {{VALUE}};',
1233 ],
1234 ],
1235 'empty_notice_text_color' => [
1236 'label' => esc_html__( 'Color', 'shopbuilder' ),
1237 'type' => 'color',
1238
1239 'selectors' => [
1240 self::$selectors['empty_notice_text_color'] => 'color: {{VALUE}};',
1241 ],
1242 ],
1243 'empty_notice_border_color' => [
1244 'label' => esc_html__( 'Border Color', 'shopbuilder' ),
1245 'type' => 'color',
1246
1247 'selectors' => [
1248 self::$selectors['empty_notice_border_color'] => 'border-color: {{VALUE}};',
1249 ],
1250 ],
1251 'empty_notice_padding' => [
1252 'label' => esc_html__( 'Padding (px)', 'shopbuilder' ),
1253 'type' => 'dimensions',
1254 'mode' => 'responsive',
1255 'size_units' => [ 'px' ],
1256 'selectors' => [
1257 self::$selectors['empty_notice_padding'] => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1258 ],
1259 'separator' => 'before',
1260 ],
1261 'empty_notice_section_end' => [
1262 'mode' => 'section_end',
1263 ],
1264 ];
1265
1266 return $fields;
1267 }
1268
1269 /**
1270 * Widget Field
1271 *
1272 * @return array
1273 */
1274 public static function return_shop_button_style() {
1275 $alignment = ControlHelper::alignment();
1276 unset( $alignment['justify'] );
1277 $fields = [
1278 'return_shop_button_section_start' => [
1279 'mode' => 'section_start',
1280 'label' => esc_html__( 'Return Shop Button', 'shopbuilder' ),
1281 'tab' => 'style',
1282 ],
1283 'return_shop_button_typography' => [
1284 'mode' => 'group',
1285 'type' => 'typography',
1286 'label' => esc_html__( 'Typography', 'shopbuilder' ),
1287 'selector' => self::$selectors['return_shop_button_typography'],
1288 ],
1289 'return_shop_button_height' => [
1290 'label' => esc_html__( 'Button Height', 'shopbuilder' ),
1291 'type' => 'slider',
1292 'range' => [
1293 'px' => [
1294 'min' => 10,
1295 'max' => 100,
1296 ],
1297 ],
1298 'selectors' => [
1299 self::$selectors['return_shop_button_height'] => 'height: {{SIZE}}{{UNIT}};',
1300 ],
1301 ],
1302 'return_shop_button_tabs_start' => [
1303 'mode' => 'tabs_start',
1304 ],
1305 // Tab For normal view.
1306 'return_shop_button_normal' => [
1307 'mode' => 'tab_start',
1308 'label' => esc_html__( 'Normal', 'shopbuilder' ),
1309 ],
1310 'return_shop_button_text_color_normal' => [
1311 'label' => esc_html__( 'Color', 'shopbuilder' ),
1312 'type' => 'color',
1313
1314 'separator' => 'default',
1315 'selectors' => [
1316 self::$selectors['return_shop_button_text_color_normal'] => 'color: {{VALUE}};',
1317 ],
1318 ],
1319 'return_shop_button_bg_color_normal' => [
1320 'label' => esc_html__( 'Background Color', 'shopbuilder' ),
1321 'type' => 'color',
1322 'selectors' => [
1323 self::$selectors['return_shop_button_bg_color_normal'] => 'background-color: {{VALUE}};',
1324 ],
1325 ],
1326
1327 'return_shop_button_border' => [
1328 'mode' => 'group',
1329 'type' => 'border',
1330 'selector' => self::$selectors['return_shop_button_border'],
1331 'size_units' => [ 'px' ],
1332 ],
1333 'return_shop_button_normal_end' => [
1334 'mode' => 'tab_end',
1335 ],
1336 'return_shop_button_hover' => [
1337 'mode' => 'tab_start',
1338 'label' => esc_html__( 'Hover', 'shopbuilder' ),
1339 ],
1340 'return_shop_button_text_color_hover' => [
1341 'label' => esc_html__( 'Color', 'shopbuilder' ),
1342 'type' => 'color',
1343
1344 'separator' => 'default',
1345 'selectors' => [
1346 self::$selectors['return_shop_button_text_color_hover'] => 'color: {{VALUE}};',
1347 ],
1348 ],
1349 'return_shop_button_bg_color_hover' => [
1350 'label' => esc_html__( 'Background Color', 'shopbuilder' ),
1351 'type' => 'color',
1352 'selectors' => [
1353 self::$selectors['return_shop_button_bg_color_hover'] => 'background-color: {{VALUE}};',
1354 ],
1355 ],
1356 'return_shop_button_border_hover_color' => [
1357 'label' => esc_html__( 'Border Color', 'shopbuilder' ),
1358 'type' => 'color',
1359
1360 'selectors' => [
1361 self::$selectors['return_shop_button_border_hover_color'] => 'border-color: {{VALUE}};',
1362 ],
1363 ],
1364 'return_shop_button_hover_end' => [
1365 'mode' => 'tab_end',
1366 ],
1367 'return_shop_button_tabs_end' => [
1368 'mode' => 'tabs_end',
1369 ],
1370 'return_shop_button_border_radius' => [
1371 'label' => esc_html__( 'Border Radius (px)', 'shopbuilder' ),
1372 'type' => 'dimensions',
1373 'mode' => 'responsive',
1374 'size_units' => [ 'px' ],
1375 'separator' => 'before',
1376 'selectors' => [
1377 self::$selectors['return_shop_button_border_radius'] => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1378 ],
1379 ],
1380 'return_shop_button_padding' => [
1381 'label' => esc_html__( 'Padding (px)', 'shopbuilder' ),
1382 'type' => 'dimensions',
1383 'mode' => 'responsive',
1384 'size_units' => [ 'px' ],
1385 'selectors' => [
1386 self::$selectors['return_shop_button_padding'] => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1387 ],
1388 'separator' => 'before',
1389 ],
1390 'return_shop_button_margin' => [
1391 'label' => esc_html__( 'Margin (px)', 'shopbuilder' ),
1392 'type' => 'dimensions',
1393 'mode' => 'responsive',
1394 'size_units' => [ 'px' ],
1395 'selectors' => [
1396 self::$selectors['return_shop_button_margin'] => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1397 ],
1398 ],
1399 'return_shop_button_section_end' => [
1400 'mode' => 'section_end',
1401 ],
1402 ];
1403
1404 return $fields;
1405 }
1406 }
1407