PluginProbe
ShopBuilder – WooCommerce Builder For Elementor / 3.1.1
ShopBuilder – WooCommerce Builder For Elementor v3.1.1
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
← All changes | app/Models/ModuleList.php +3616 -119 2.1.23.1.1 View file →
@@ -1,25 +1,49 @@
1 1 <?php
2 +/**
3 + * ShopBuilder Module List.
4 + *
5 + * @package RadiusTheme\SB
6 + */
2 7
3 8 namespace RadiusTheme\SB\Models;
4 9
5 10 use RadiusTheme\SB\Helpers\Fns;
6 11 use RadiusTheme\SB\Models\Base\ListModel;
12 +use RadiusTheme\SB\Modules\Badges\Badges;
13 +use RadiusTheme\SB\Modules\CheckoutEditor\CheckoutEditorInit;
14 +use RadiusTheme\SB\Modules\CheckoutEditor\CheckoutFns;
15 +use RadiusTheme\SB\Modules\ShopifyCheckout\ShopifyCheckout;
16 +use RadiusTheme\SB\Modules\VariationGallery\VariationGalleryInit;
17 +use RadiusTheme\SB\Modules\VariationSwatches\SwatchesFns;
18 +use RadiusTheme\SB\Modules\VariationSwatches\VariationSwatches;
19 +use RadiusTheme\SB\Traits\SingletonTrait;
7 20 use RadiusTheme\SB\Modules\Compare\Compare;
21 +use RadiusTheme\SB\Modules\WishList\Wishlist;
8 22 use RadiusTheme\SB\Modules\Compare\CompareFns;
9 23 use RadiusTheme\SB\Modules\QuickView\QuickView;
10 -use RadiusTheme\SB\Modules\WishList\Wishlist;
11 24 use RadiusTheme\SB\Modules\WishList\WishlistFns;
12 -use RadiusTheme\SB\Traits\SingletonTrait;
25 +use RadiusTheme\SBPRO\Helpers\FnsPro;
13 26
14 27 defined( 'ABSPATH' ) || exit;
15 28
29 +/**
30 + * ShopBuilder Module List.
31 + */
16 32 class ModuleList extends ListModel {
17 33
18 34 use SingletonTrait;
19 35
36 + /**
37 + * List ID.
38 + *
39 + * @var string
40 + */
20 41 protected $list_id = 'modules';
21 42
43 + /**
44 + * Class constructor.
45 + */
22 46 public function __construct() {
23 47 parent::__construct();
24 48 $this->title = esc_html__( 'Modules', 'shopbuilder' );
25 49 $this->description = esc_html__( 'Here you can find the list of all the modules. You can individually enable or disable the modules. Or you can do that by one click.', 'shopbuilder' );
@@ -24,11 +48,134 @@
24 48 $this->title = esc_html__( 'Modules', 'shopbuilder' );
25 49 $this->description = esc_html__( 'Here you can find the list of all the modules. You can individually enable or disable the modules. Or you can do that by one click.', 'shopbuilder' );
26 50 }
27 51
52 + /**
53 + * Module list.
54 + *
55 + * @return mixed|null
56 + */
28 57 protected function raw_list() {
58 + $isSwatchActive = false;
59 + $isGalleryActive = false;
60 + $variationSwatch = apply_filters(
61 + 'rtsb/module/variation_swatches/options',
62 + [
63 + 'id' => 'variation_swatches',
64 + 'title' => esc_html__( 'Variation Swatches', 'shopbuilder' ),
65 + 'badge' => 'new',
66 + 'package' => 'free',
67 + 'active' => 'on',
68 + 'base_class' => VariationSwatches::class,
69 + 'category' => 'general',
70 + 'active_field' => [
71 + 'label' => esc_html__( 'Enable Variation Swatches Module?', 'shopbuilder' ),
72 + 'help' => esc_html__( 'Switch on to enable variation swatches module.', 'shopbuilder' ),
73 + ],
74 + 'tabs' => [
75 + 'general' => [
76 + 'title' => esc_html__( 'General', 'shopbuilder' ),
77 + ],
78 + 'showcase_shop' => [
79 + 'title' => esc_html__( 'Showcase / Shop', 'shopbuilder' ),
80 + ],
81 + 'style' => [
82 + 'title' => esc_html__( 'Style', 'shopbuilder' ),
83 + ],
84 + ],
85 + 'fields' => $this->get_variation_swatches_fields(),
86 + ],
87 + $isSwatchActive
88 + );
89 +
90 + if ( Fns::check_plugin_active( 'woo-product-variation-swatches/woo-product-variation-swatches.php' ) ) {
91 + $isSwatchActive = true;
92 + $variationSwatch = apply_filters(
93 + 'rtsb/module/variation_swatches/options',
94 + [
95 + 'id' => 'variation_swatches',
96 + 'external' => true,
97 + 'category' => 'general',
98 + 'title' => esc_html__( 'Variation Swatches', 'shopbuilder' ),
99 + 'pluginSlug' => 'woo-product-variation-swatches',
100 + 'pluginIsInstalled' => Fns::check_plugin_installed( 'woo-product-variation-swatches/woo-product-variation-swatches.php' ),
101 + 'pluginIsActive' => Fns::check_plugin_active( 'woo-product-variation-swatches/woo-product-variation-swatches.php' ),
102 + 'pluginActiveUrl' => add_query_arg(
103 + [
104 + '_wpnonce' => wp_create_nonce( 'activate-plugin_woo-product-variation-swatches/woo-product-variation-swatches.php' ),
105 + 'action' => 'activate',
106 + 'plugin' => 'woo-product-variation-swatches/woo-product-variation-swatches.php',
107 + ],
108 + admin_url( 'plugins.php' )
109 + ),
110 + 'help' => __( 'Currently using an external plugin. You can disable the external plugin and enable the built-in module for better performance. You’ll need to reconfigure settings if you switch to built-in module.', 'shopbuilder' ),
111 + 'package' => 'free',
112 + 'active_field' => [
113 + 'disable' => false,
114 + ],
115 + 'fields' => [],
116 + ],
117 + $isSwatchActive
118 + );
119 + }
120 + $variationGallery = apply_filters(
121 + 'rtsb/module/variation_gallery/options',
122 + [
123 + 'id' => 'variation_gallery',
124 + 'title' => esc_html__( 'Variation Gallery', 'shopbuilder' ),
125 + 'badge' => 'new',
126 + 'package' => 'free',
127 + 'active' => 'on',
128 + 'base_class' => VariationGalleryInit::class,
129 + 'category' => 'general',
130 + 'active_field' => [
131 + 'label' => esc_html__( 'Enable Variation Gallery Module?', 'shopbuilder' ),
132 + 'help' => esc_html__( 'Switch on to enable variation gallery module.', 'shopbuilder' ),
133 + ],
134 + 'tabs' => [
135 + 'general' => [
136 + 'title' => esc_html__( 'General', 'shopbuilder' ),
137 + ],
138 + 'styles' => [
139 + 'title' => esc_html__( 'Styles', 'shopbuilder' ),
140 + ],
141 + ],
142 + 'fields' => $this->get_variation_gallery_fields(),
143 + ],
144 + $isGalleryActive
145 + );
146 + if ( Fns::check_plugin_active( 'woo-product-variation-gallery/woo-product-variation-gallery.php' ) ) {
147 + $isGalleryActive = true;
148 + $variationGallery = apply_filters(
149 + 'rtsb/module/variation_gallery/options',
150 + [
151 + 'id' => 'variation_gallery',
152 + 'external' => true,
153 + 'category' => 'general',
154 + 'title' => esc_html__( 'Variation Gallery', 'shopbuilder' ),
155 + 'pluginSlug' => 'woo-product-variation-gallery',
156 + 'pluginIsInstalled' => Fns::check_plugin_installed( 'woo-product-variation-gallery/woo-product-variation-gallery.php' ),
157 + 'pluginIsActive' => Fns::check_plugin_active( 'woo-product-variation-gallery/woo-product-variation-gallery.php' ),
158 + 'pluginActiveUrl' => add_query_arg(
159 + [
160 + '_wpnonce' => wp_create_nonce( 'activate-plugin_woo-product-variation-gallery/woo-product-variation-gallery.php' ),
161 + 'action' => 'activate',
162 + 'plugin' => 'woo-product-variation-gallery/woo-product-variation-gallery.php',
163 + ],
164 + admin_url( 'plugins.php' )
165 + ),
166 + 'help' => __( 'Currently using an external plugin. You can disable the external plugin and enable the built-in module for better performance. You’ll need to reconfigure settings if you switch to built-in module.', 'shopbuilder' ),
167 + 'package' => 'free',
168 + 'active_field' => [
169 + 'disable' => false,
170 + ],
171 + 'fields' => [],
172 + ],
173 + $isGalleryActive
174 + );
175 + }
29 176 $list = [
30 - 'quick_view' => apply_filters(
177 + 'quick_view' => apply_filters(
31 178 'rtsb/module/quick_view/options',
32 179 [
33 180 'id' => 'quick_view',
34 181 'title' => esc_html__( 'Quick View', 'shopbuilder' ),
@@ -39,8 +186,16 @@
39 186 'active_field' => [
40 187 'label' => esc_html__( 'Enable Quick View?', 'shopbuilder' ),
41 188 'help' => esc_html__( 'Switch on to enable quick view module.', 'shopbuilder' ),
42 189 ],
190 + 'tabs' => [
191 + 'general' => [
192 + 'title' => esc_html__( 'General', 'shopbuilder' ),
193 + ],
194 + 'style' => [
195 + 'title' => esc_html__( 'Style', 'shopbuilder' ),
196 + ],
197 + ],
43 198 'fields' => apply_filters(
44 199 'rtsb/module/quick_view/fields',
45 200 [
46 201 'loop_btn_position' => [
@@ -48,8 +203,9 @@
48 203 'type' => 'select',
49 204 'value' => 'custom',
50 205 'label' => esc_html__( 'Shop Page Button Position', 'shopbuilder' ),
51 206 'help' => esc_html__( 'You can manage quick view button position in shop page.', 'shopbuilder' ),
207 + 'tab' => 'general',
52 208 'options' => [
53 209 'before_add_to_cart' => esc_html__( 'Before Add To Cart', 'shopbuilder' ),
54 210 'after_add_to_cart' => esc_html__( 'After Add To Cart', 'shopbuilder' ),
55 211 'shortcode' => esc_html__( 'Use Shortcode', 'shopbuilder' ),
@@ -54,8 +210,9 @@
54 210 'after_add_to_cart' => esc_html__( 'After Add To Cart', 'shopbuilder' ),
55 211 'shortcode' => esc_html__( 'Use Shortcode', 'shopbuilder' ),
56 212 'custom' => esc_html__( 'Custom Position', 'shopbuilder' ),
57 213 ],
214 +
58 215 ],
59 216 'loop_btn_position_shortcode' => [
60 217 'type' => 'raw',
61 218 'label' => ' ',
@@ -63,8 +220,9 @@
63 220 /* translators: 1: The shortcode.*/
64 221 esc_html__( 'Choose where to show button in WooCommerce product\'s loop. Copy this shortcode %1$s and paste it where you want to show the button.', 'shopbuilder' ),
65 222 '<code>[rtsb_quick_view_button]</code>'
66 223 ),
224 + 'tab' => 'general',
67 225 'dependency' => [
68 226 'rules' => [
69 227 [
70 228 'item' => 'modules.quick_view.loop_btn_position',
@@ -80,10 +238,11 @@
80 238 'label' => esc_html__( 'Enter Hook Name', 'shopbuilder' ),
81 239 'help' => sprintf(
82 240 /* translators: 1: The shortcode.*/
83 241 esc_html__( 'Or Copy the php code %1$s and paste it in your product query where you want to show the button.', 'shopbuilder' ),
84 - "<code>&lt;?php do_action( 'rtsb/modules/quick_view/frontend/display' ); ?&gt;</code>"
242 + "<br /><code>&lt;?php do_action( 'rtsb/modules/quick_view/frontend/display' ); ?&gt;</code><br />"
85 243 ),
244 + 'tab' => 'general',
86 245 'dependency' => [
87 246 'rules' => [
88 247 [
89 248 'item' => 'modules.quick_view.loop_btn_position',
@@ -100,8 +259,9 @@
100 259 'size' => 'small',
101 260 'min' => 0,
102 261 'max' => 999,
103 262 'label' => esc_html__( 'Hook Priority', 'shopbuilder' ),
263 + 'tab' => 'general',
104 264 'dependency' => [
105 265 'rules' => [
106 266 [
107 267 'item' => 'modules.quick_view.loop_btn_position',
@@ -117,14 +277,69 @@
117 277 'help' => esc_html__( 'Enter your quick view button text.', 'shopbuilder' ),
118 278 'type' => 'text',
119 279 'value' => 'Quick View',
120 280 'placeholder' => 'Quick View',
281 + 'tab' => 'general',
121 282 ],
283 +
284 + // Module Style.
285 + 'modal_width' => [
286 + 'id' => 'modal_width',
287 + 'label' => esc_html__( 'Modal Width (in px)', 'shopbuilder' ),
288 + 'help' => esc_html__( 'Quick view button modal width. Example: 950', 'shopbuilder' ),
289 + 'type' => 'number',
290 + 'value' => '',
291 + 'tab' => 'style',
292 + ],
293 +
294 + 'modal_height' => [
295 + 'id' => 'modal_height',
296 + 'label' => esc_html__( 'Modal Height', 'shopbuilder' ),
297 + 'help' => esc_html__( 'Quick view button modal height. Example: 450px', 'shopbuilder' ),
298 + 'type' => 'text',
299 + 'value' => '',
300 + 'tab' => 'style',
301 + ],
302 +
303 + 'modal_wrapper_padding' => [
304 + 'id' => 'modal_wrapper_padding',
305 + 'label' => esc_html__( 'Modal Wrapper Padding', 'shopbuilder' ),
306 + 'help' => esc_html__( 'Quick view modal wrapper padding. Example 1: 20px, Example 2: 20px 20px 20px 20px', 'shopbuilder' ),
307 + 'type' => 'text',
308 + 'value' => '',
309 + 'tab' => 'style',
310 + ],
311 + 'modal_bg_color' => [
312 + 'id' => 'modal_bg_color',
313 + 'label' => esc_html__( 'Modal Backgroud Color', 'shopbuilder' ),
314 + 'help' => esc_html__( 'Quick view modal background color. Example: #fff', 'shopbuilder' ),
315 + 'type' => 'color',
316 + 'value' => '',
317 + 'tab' => 'style',
318 + ],
319 + 'modal_box_shadow_color' => [
320 + 'id' => 'modal_box_shadow_color',
321 + 'label' => esc_html__( 'Modal Box Shadow Color', 'shopbuilder' ),
322 + 'help' => esc_html__( 'Quick view modal box shadow. Example: #000', 'shopbuilder' ),
323 + 'type' => 'color',
324 + 'value' => '',
325 + 'tab' => 'style',
326 + ],
327 +
328 + 'modal_overly_color' => [
329 + 'id' => 'modal_overly_color',
330 + 'label' => esc_html__( 'Modal Overly Color', 'shopbuilder' ),
331 + 'help' => esc_html__( 'Quick view modal overly. Example: #000', 'shopbuilder' ),
332 + 'type' => 'color',
333 + 'value' => '',
334 + 'tab' => 'style',
335 + ],
336 +
122 337 ]
123 338 ),
124 339 ]
125 340 ),
126 - 'wishlist' => apply_filters(
341 + 'wishlist' => apply_filters(
127 342 'rtsb/module/wishlist/options',
128 343 [
129 344 'id' => 'wishlist',
130 345 'title' => esc_html__( 'Wishlist', 'shopbuilder' ),
@@ -145,8 +360,24 @@
145 360 'label' => esc_html__( 'Limit Wishlist Use', 'shopbuilder' ),
146 361 'help' => esc_html__( 'Enable this option to allow only the logged-in users to use the Wishlist feature.', 'shopbuilder' ),
147 362 'tab' => 'general',
148 363 ],
364 + 'hide_wishlist_non_logged_in' => [
365 + 'id' => 'hide_wishlist_non_logged_in',
366 + 'type' => 'switch',
367 + 'label' => esc_html__( 'Hide Wishlist Button', 'shopbuilder' ),
368 + 'help' => esc_html__( 'Hide Wishlist Button For non logged-in users (guest users).', 'shopbuilder' ),
369 + 'dependency' => [
370 + 'rules' => [
371 + [
372 + 'item' => 'modules.wishlist.enable_login_limit',
373 + 'value' => 'on',
374 + 'operator' => '==',
375 + ],
376 + ],
377 + ],
378 + 'tab' => 'general',
379 + ],
149 380 'wishlist_shop_wrapper_heading' => [
150 381 'id' => 'wishlist_shop_wrapper_heading',
151 382 'type' => 'title',
152 383 'label' => esc_html__( 'Shop Page Settings', 'shopbuilder' ),
@@ -213,9 +444,9 @@
213 444 'tab' => 'button',
214 445 'help' => sprintf(
215 446 /* translators: 1: The shortcode.*/
216 447 esc_html__( 'Or Copy the php code %1$s and paste it in your product query where you want to show the button.', 'shopbuilder' ),
217 - "<code>&lt;?php do_action('rtsb/modules/wishlist/frontend/display' ); ?&gt;</code>"
448 + "<br /><code>&lt;?php do_action('rtsb/modules/wishlist/frontend/display' ); ?&gt;</code><br />"
218 449 ),
219 450 'dependency' => [
220 451 'rules' => [
221 452 [
@@ -325,9 +556,9 @@
325 556 'tab' => 'button',
326 557 'help' => sprintf(
327 558 /* translators: 1: The shortcode.*/
328 559 esc_html__( 'Or Copy the php code %1$s and paste it in your product query where you want to show the button.', 'shopbuilder' ),
329 - "<code>&lt;?php do_action('rtsb/modules/wishlist/frontend/display' ); ?&gt;</code>"
560 + "<br /><code>&lt;?php do_action('rtsb/modules/wishlist/frontend/display' ); ?&gt;</code><br />"
330 561 ),
331 562 'dependency' => [
332 563 'rules' => [
333 564 [
@@ -403,27 +634,8 @@
403 634 'value' => esc_html__( 'Browse Wishlist', 'shopbuilder' ),
404 635 'placeholder' => esc_html__( 'Browse Wishlist', 'shopbuilder' ),
405 636 'tab' => 'general',
406 637 ],
407 - /*
408 - * TODO:: Will Implement Later.
409 - 'redirect_cart' => array(
410 - 'id' => 'redirect_cart',
411 - 'type' => 'switch',
412 - 'help' => esc_html__( 'Redirect users to the cart page when they add a product to the cart from the wishlist page', 'shopbuilder' ),
413 - 'label' => esc_html__( 'Redirect to Cart', 'shopbuilder' ),
414 - 'tab' => 'page',
415 - ),
416 - 'remove_after_add_to_cart' => array(
417 - 'value' => 'on',
418 - 'id' => 'remove_after_add_to_cart',
419 - 'type' => 'switch',
420 - 'help' => esc_html__( 'Remove the product from the wishlist after it has been added to the cart', 'shopbuilder' ),
421 - 'label' => esc_html__( 'Remove if Added to Cart', 'shopbuilder' ),
422 - 'tab' => 'page',
423 - ),
424 - */
425 -
426 638 'page' => [
427 639 'id' => 'page',
428 640 'type' => 'select',
429 641 'label' => esc_html__( 'Select Wishlist Page', 'shopbuilder' ),
@@ -434,9 +646,8 @@
434 646 ),
435 647 'options' => Fns::get_pages(),
436 648 'tab' => 'page',
437 649 ],
438 -
439 650 'page_show_fields' => [
440 651 'value' => WishlistFns::instance()->get_field_ids(),
441 652 'id' => 'page_show_fields',
442 653 'multiple' => true,
@@ -462,9 +673,9 @@
462 673 ],
463 674 ],
464 675 ]
465 676 ),
466 - 'compare' => apply_filters(
677 + 'compare' => apply_filters(
467 678 'rtsb/module/compare/options',
468 679 [
469 680 'id' => 'compare',
470 681 'base_class' => Compare::class,
@@ -546,9 +757,9 @@
546 757 'tab' => 'button',
547 758 'help' => sprintf(
548 759 /* translators: 1: The shortcode.*/
549 760 esc_html__( 'Or Copy the php code %1$s and paste it in your product query where you want to show the button.', 'shopbuilder' ),
550 - "<code>&lt;?php do_action('rtsb/modules/compare/frontend/display' ); ?&gt;</code>"
761 + "<br /><code>&lt;?php do_action('rtsb/modules/compare/frontend/display' ); ?&gt;</code><br />"
551 762 ),
552 763 'dependency' => [
553 764 'rules' => [
554 765 [
@@ -632,19 +843,19 @@
632 843 'label' => ' ',
633 844 'html' => sprintf(
634 845 /* translators: 1: The shortcode.*/
635 846 esc_html__( 'Choose where to show button on the product page. Copy this shortcode %1$s and paste it where you want to show the button.', 'shopbuilder' ),
636 - '<code>[rtsb_wishlist_button]</code> '
847 + '<code>[rtsb_compare_button]</code> '
637 848 ),
638 849 'dependency' => [
639 850 'rules' => [
640 851 [
641 - 'item' => 'modules.wishlist.show_btn_product_page',
852 + 'item' => 'modules.compare.show_btn_product_page',
642 853 'value' => 'on',
643 854 'operator' => '==',
644 855 ],
645 856 [
646 - 'item' => 'modules.wishlist.product_btn_position',
857 + 'item' => 'modules.compare.product_btn_position',
647 858 'value' => 'shortcode',
648 859 'operator' => '==',
649 860 ],
650 861 ],
@@ -658,9 +869,9 @@
658 869 'tab' => 'button',
659 870 'help' => sprintf(
660 871 /* translators: 1: The shortcode.*/
661 872 esc_html__( 'Or Copy the php code %1$s and paste it in your product query where you want to show the button.', 'shopbuilder' ),
662 - "<code>&lt;?php do_action('rtsb/modules/compare/frontend/display' ); ?&gt;</code>"
873 + "<br /><code>&lt;?php do_action('rtsb/modules/compare/frontend/display' ); ?&gt;</code><br />"
663 874 ),
664 875 'dependency' => [
665 876 'rules' => [
666 877 [
@@ -786,61 +997,311 @@
786 997
787 998 ],
788 999 ]
789 1000 ),
790 - 'variation_gallery' => apply_filters(
791 - 'rtsb/module/variation_gallery/options',
1001 + 'variation_swatches' => $variationSwatch,
1002 + 'variation_gallery' => $variationGallery,
1003 + 'product_badges' => apply_filters(
1004 + 'rtsb/module/product_badges/options',
792 1005 [
793 - 'id' => 'variation_gallery',
794 - 'external' => true,
795 - 'category' => 'general',
796 - 'title' => esc_html__( 'Variation Gallery', 'shopbuilder' ),
797 - 'pluginSlug' => 'woo-product-variation-gallery',
798 - 'pluginIsInstalled' => Fns::check_plugin_installed( 'woo-product-variation-gallery/woo-product-variation-gallery.php' ),
799 - 'pluginIsActive' => Fns::check_plugin_active( 'woo-product-variation-gallery/woo-product-variation-gallery.php' ),
800 - 'pluginActiveUrl' => add_query_arg(
801 - [
802 - '_wpnonce' => wp_create_nonce( 'activate-plugin_woo-product-variation-gallery/woo-product-variation-gallery.php' ),
803 - 'action' => 'activate',
804 - 'plugin' => 'woo-product-variation-gallery/woo-product-variation-gallery.php',
1006 + 'id' => 'product_badges',
1007 + 'active' => '',
1008 + 'title' => esc_html__( 'Product Badges', 'shopbuilder' ),
1009 + 'package' => 'free',
1010 + 'active_field' => [
1011 + 'label' => esc_html__( 'Enable Product Badges?', 'shopbuilder' ),
1012 + 'help' => esc_html__( 'Switch on to enable product badges module.', 'shopbuilder' ),
1013 + ],
1014 + 'base_class' => Badges::class,
1015 + 'fields' => $this->product_badges_fields(),
1016 + 'tabs' => [
1017 + 'general' => [
1018 + 'title' => esc_html__( 'General', 'shopbuilder' ),
805 1019 ],
806 - admin_url( 'plugins.php' )
807 - ),
808 - 'help' => esc_html__( 'This module requires: Variation Images Gallery for WooCommerce Plugin', 'shopbuilder' ),
809 - 'package' => 'free',
810 - 'active_field' => [
811 - 'disable' => false,
1020 + 'group' => [
1021 + 'title' => esc_html__( 'Settings', 'shopbuilder' ),
1022 + ],
1023 + 'badges' => [
1024 + 'title' => esc_html__( 'Create Badges', 'shopbuilder' ),
1025 + ],
812 1026 ],
813 - 'fields' => [],
814 1027 ]
815 1028 ),
816 - 'variation_swatches' => apply_filters(
817 - 'rtsb/module/variation_swatches/options',
1029 + 'checkout_fields_editor' => apply_filters(
1030 + 'rtsb/module/checkout_fields_editor/options',
818 1031 [
819 - 'id' => 'variation_swatches',
820 - 'external' => true,
821 - 'category' => 'general',
822 - 'title' => esc_html__( 'Variation Swatches', 'shopbuilder' ),
823 - 'pluginSlug' => 'woo-product-variation-swatches',
824 - 'pluginIsInstalled' => Fns::check_plugin_installed( 'woo-product-variation-swatches/woo-product-variation-swatches.php' ),
825 - 'pluginIsActive' => Fns::check_plugin_active( 'woo-product-variation-swatches/woo-product-variation-swatches.php' ),
826 - 'pluginActiveUrl' => add_query_arg(
827 - [
828 - '_wpnonce' => wp_create_nonce( 'activate-plugin_woo-product-variation-swatches/woo-product-variation-swatches.php' ),
829 - 'action' => 'activate',
830 - 'plugin' => 'woo-product-variation-swatches/woo-product-variation-swatches.php',
1032 + 'id' => 'checkout_fields_editor',
1033 + 'active' => '',
1034 + 'title' => esc_html__( 'Checkout Fields Editor', 'shopbuilder' ),
1035 + 'base_class' => CheckoutEditorInit::class,
1036 + 'active_field' => [
1037 + 'label' => esc_html__( 'Enable Checkout Fields Editor?', 'shopbuilder' ),
1038 + 'help' => esc_html__( 'Switch on to enable Checkout Fields Editor module.', 'shopbuilder' ),
1039 + ],
1040 + 'fields' => [
1041 + 'checkout_billing_intro' => [
1042 + 'id' => 'checkout_billing_intro',
1043 + 'type' => 'description',
1044 + 'text' => esc_html__( 'Billing Fields Editor allows you to customize the default billing fields on your checkout page.', 'shopbuilder' ),
1045 + 'tab' => 'billing_fields',
831 1046 ],
832 - admin_url( 'plugins.php' )
833 - ),
834 - 'help' => esc_html__( 'This module requires: Variation Swatches for WooCommerce Plugin.', 'shopbuilder' ),
835 - 'package' => 'free',
836 - 'active_field' => [
837 - 'disable' => false,
1047 + 'modify_billing_form' => [
1048 + 'id' => 'modify_billing_form',
1049 + 'type' => 'switch',
1050 + 'label' => esc_html__( 'Customize Billing Form?', 'shopbuilder' ),
1051 + 'help' => esc_html__( 'Enable this option to edit billing Form.', 'shopbuilder' ),
1052 + 'tab' => 'billing_fields',
1053 + ],
1054 +
1055 + 'checkout_billing_fields_info' => [
1056 + 'id' => 'checkout_billing_fields_info',
1057 + 'type' => 'title',
1058 + 'label' => esc_html__( 'Billing Fields', 'shopbuilder' ),
1059 + 'tab' => 'billing_fields',
1060 + 'dependency' => [
1061 + 'rules' => [
1062 + [
1063 + 'item' => 'modules.checkout_fields_editor.modify_billing_form',
1064 + 'value' => 'on',
1065 + 'operator' => '==',
1066 + ],
1067 + ],
1068 + ],
1069 + ],
1070 + 'checkout_billing_fields' => [
1071 + 'id' => 'checkout_billing_fields',
1072 + 'type' => 'checkout_fields',
1073 + 'tab' => 'billing_fields',
1074 + 'value' => wp_json_encode( CheckoutFns::default_billing_fields() ),
1075 + 'dependency' => [
1076 + 'rules' => [
1077 + [
1078 + 'item' => 'modules.checkout_fields_editor.modify_billing_form',
1079 + 'value' => 'on',
1080 + 'operator' => '==',
1081 + ],
1082 + ],
1083 + ],
1084 + ],
1085 + 'checkout_shipping_intro' => [
1086 + 'id' => 'checkout_shipping_intro',
1087 + 'type' => 'description',
1088 + 'text' => esc_html__( 'Shipping Fields Editor allows you to customize the default shipping fields on your checkout page.', 'shopbuilder' ),
1089 + 'tab' => 'shipping_fields',
1090 + ],
1091 + 'modify_shipping_form' => [
1092 + 'id' => 'modify_billing_form',
1093 + 'type' => 'switch',
1094 + 'label' => esc_html__( 'Modify Shipping Form?', 'shopbuilder' ),
1095 + 'help' => esc_html__( 'Enable this option to edit shipping Form.', 'shopbuilder' ),
1096 + 'tab' => 'shipping_fields',
1097 + ],
1098 + 'checkout_shipping_fields_info' => [
1099 + 'id' => 'checkout_shipping_fields_info',
1100 + 'type' => 'title',
1101 + 'label' => esc_html__( 'Shipping Fields', 'shopbuilder' ),
1102 + 'tab' => 'shipping_fields',
1103 + 'dependency' => [
1104 + 'rules' => [
1105 + [
1106 + 'item' => 'modules.checkout_fields_editor.modify_shipping_form',
1107 + 'value' => 'on',
1108 + 'operator' => '==',
1109 + ],
1110 + ],
1111 + ],
1112 + ],
1113 + 'checkout_shipping_fields' => [
1114 + 'id' => 'checkout_shipping_fields',
1115 + 'type' => 'checkout_fields',
1116 + 'tab' => 'shipping_fields',
1117 + 'value' => wp_json_encode( CheckoutFns::default_shipping_fields() ),
1118 + 'dependency' => [
1119 + 'rules' => [
1120 + [
1121 + 'item' => 'modules.checkout_fields_editor.modify_shipping_form',
1122 + 'value' => 'on',
1123 + 'operator' => '==',
1124 + ],
1125 + ],
1126 + ],
1127 + ],
1128 + 'checkout_additional_intro' => [
1129 + 'id' => 'checkout_additional_intro',
1130 + 'type' => 'description',
1131 + 'text' => esc_html__( 'Additional Fields Editor allows you to customize the extra fields on your checkout page.', 'shopbuilder' ),
1132 + 'tab' => 'additional_fields',
1133 + ],
1134 + 'modify_additional_form' => [
1135 + 'id' => 'modify_additional_form',
1136 + 'type' => 'switch',
1137 + 'label' => esc_html__( 'Modify Additional Form Field?', 'shopbuilder' ),
1138 + 'help' => esc_html__( 'Enable this option to edit Additional Form.', 'shopbuilder' ),
1139 + 'tab' => 'additional_fields',
1140 + ],
1141 + 'checkout_additional_fields_info' => [
1142 + 'id' => 'checkout_additional_fields_info',
1143 + 'type' => 'title',
1144 + 'label' => esc_html__( 'Additional Fields', 'shopbuilder' ),
1145 + 'tab' => 'additional_fields',
1146 + 'dependency' => [
1147 + 'rules' => [
1148 + [
1149 + 'item' => 'modules.checkout_fields_editor.modify_additional_form',
1150 + 'value' => 'on',
1151 + 'operator' => '==',
1152 + ],
1153 + ],
1154 + ],
1155 + ],
1156 + 'checkout_additional_fields' => [
1157 + 'id' => 'checkout_additional_fields',
1158 + 'type' => 'checkout_fields',
1159 + 'tab' => 'additional_fields',
1160 + 'value' => wp_json_encode( CheckoutFns::checkout_additional_fields() ),
1161 + 'dependency' => [
1162 + 'rules' => [
1163 + [
1164 + 'item' => 'modules.checkout_fields_editor.modify_additional_form',
1165 + 'value' => 'on',
1166 + 'operator' => '==',
1167 + ],
1168 + ],
1169 + ],
1170 + ],
838 1171 ],
839 - 'fields' => [],
1172 + 'tabs' => [
1173 + 'general' => [
1174 + 'title' => esc_html__( 'General', 'shopbuilder' ),
1175 + ],
1176 + 'billing_fields' => [
1177 + 'title' => esc_html__( 'Billing Fields', 'shopbuilder' ),
1178 + ],
1179 + 'shipping_fields' => [
1180 + 'title' => esc_html__( 'Shipping Fields', 'shopbuilder' ),
1181 + ],
1182 + 'additional_fields' => [
1183 + 'title' => esc_html__( 'Additional Fields', 'shopbuilder' ),
1184 + ],
1185 + ],
840 1186 ]
841 1187 ),
842 - 'sales_notification' => apply_filters(
1188 + 'shopify_checkout' => apply_filters(
1189 + 'rtsb/module/shopify_checkout/options',
1190 + [
1191 + 'id' => 'shopify_checkout',
1192 + 'active' => '',
1193 + 'title' => esc_html__( 'Shopify Checkout', 'shopbuilder' ),
1194 + 'base_class' => ShopifyCheckout::class,
1195 + 'active_field' => [
1196 + 'label' => esc_html__( 'Enable Shopify Checkout?', 'shopbuilder' ),
1197 + 'help' => esc_html__( 'Switch on to enable Shopify Checkout module.', 'shopbuilder' ),
1198 + ],
1199 + 'fields' => $this->shopify_checkout_options(),
1200 + 'tabs' => [
1201 + 'general' => [
1202 + 'title' => esc_html__( 'General', 'shopbuilder' ),
1203 + ],
1204 + 'multi-step' => [
1205 + 'title' => esc_html__( 'Multi-Step', 'shopbuilder' ),
1206 + ],
1207 + 'styles' => [
1208 + 'title' => esc_html__( 'General Styles', 'shopbuilder' ),
1209 + ],
1210 + 'btn-styles' => [
1211 + 'title' => esc_html__( 'Button Styles', 'shopbuilder' ),
1212 + ],
1213 + ],
1214 + ]
1215 + ),
1216 + 'mini_cart' => apply_filters(
1217 + 'rtsb/module/mini_cart/options',
1218 + [
1219 + 'id' => 'mini_cart',
1220 + 'active' => '',
1221 + 'title' => esc_html__( 'Mini Cart', 'shopbuilder' ),
1222 + 'package' => $this->pro_package(),
1223 + 'active_field' => [
1224 + 'label' => esc_html__( 'Enable Mini Cart?', 'shopbuilder' ),
1225 + 'help' => esc_html__( 'Switch on to enable mini cart module.', 'shopbuilder' ),
1226 + ],
1227 + 'is_active' => true,
1228 + 'fields' => Fns::pro_version_notice( '1.0.0' ),
1229 + ]
1230 + ),
1231 + 'product_size_chart' => apply_filters(
1232 + 'rtsb/module/product_size_chart/options',
1233 + [
1234 + 'id' => 'product_size_chart',
1235 + 'active' => '',
1236 + 'title' => esc_html__( 'Product Size Chart', 'shopbuilder' ),
1237 + 'package' => $this->pro_package(),
1238 + 'active_field' => [
1239 + 'label' => esc_html__( 'Enable Product Size Chart?', 'shopbuilder' ),
1240 + 'help' => esc_html__( 'Switch on to enable Product Size Chart module.', 'shopbuilder' ),
1241 + ],
1242 + 'fields' => Fns::pro_version_notice( '1.0.0' ),
1243 + ]
1244 + ),
1245 + 'customize_my_account' => apply_filters(
1246 + 'rtsb/module/customize_my_account/options',
1247 + [
1248 + 'id' => 'customize_my_account',
1249 + 'active' => '',
1250 + 'title' => esc_html__( 'Customize My Account', 'shopbuilder' ),
1251 + 'package' => $this->pro_package(),
1252 + 'active_field' => [
1253 + 'label' => esc_html__( 'Enable Customize My Account?', 'shopbuilder' ),
1254 + 'help' => esc_html__( 'Switch on to enable customize my account module.', 'shopbuilder' ),
1255 + ],
1256 + 'fields' => Fns::pro_version_notice( '1.4.0' ),
1257 + ]
1258 + ),
1259 + 'pre_order' => apply_filters(
1260 + 'rtsb/module/pre_order/options',
1261 + [
1262 + 'id' => 'pre_order',
1263 + 'active' => '',
1264 + 'title' => esc_html__( 'Pre-Order', 'shopbuilder' ),
1265 + 'package' => $this->pro_package(),
1266 + 'active_field' => [
1267 + 'label' => esc_html__( 'Enable Pre-Order?', 'shopbuilder' ),
1268 + 'help' => esc_html__( 'Switch on to enable pre-order module.', 'shopbuilder' ),
1269 + ],
1270 + 'fields' => Fns::pro_version_notice( '1.5.0' ),
1271 + ]
1272 + ),
1273 + 'currency_switcher' => apply_filters(
1274 + 'rtsb/module/currency_switcher/options',
1275 + [
1276 + 'id' => 'currency_switcher',
1277 + 'active' => '',
1278 + 'title' => esc_html__( 'Currency Switcher', 'shopbuilder' ),
1279 + 'package' => $this->pro_package(),
1280 + 'active_field' => [
1281 + 'label' => esc_html__( 'Enable Currency Switcher?', 'shopbuilder' ),
1282 + 'help' => esc_html__( 'Switch on to enable currency switcher module.', 'shopbuilder' ),
1283 + ],
1284 + 'is_active' => true,
1285 + 'fields' => Fns::pro_version_notice( '1.5.0' ),
1286 + ]
1287 + ),
1288 + 'product_add_ons' => apply_filters(
1289 + 'rtsb/module/product_add_ons/options',
1290 + [
1291 + 'id' => 'product_add_ons',
1292 + 'active' => '',
1293 + 'title' => esc_html__( 'Product Add-Ons', 'shopbuilder' ),
1294 + 'package' => $this->pro_package(),
1295 + 'active_field' => [
1296 + 'label' => esc_html__( 'Enable Product Add-Ons?', 'shopbuilder' ),
1297 + 'help' => esc_html__( 'Switch on to enable product add-ons module.', 'shopbuilder' ),
1298 + ],
1299 + 'is_active' => true,
1300 + 'fields' => Fns::pro_version_notice( '1.6.0' ),
1301 + ]
1302 + ),
1303 + 'sales_notification' => apply_filters(
843 1304 'rtsb/module/sales_notification/options',
844 1305 [
845 1306 'id' => 'sales_notification',
846 1307 'active' => '',
@@ -849,12 +1310,12 @@
849 1310 'active_field' => [
850 1311 'label' => esc_html__( 'Enable Sales Notification?', 'shopbuilder' ),
851 1312 'help' => esc_html__( 'Switch on to enable Sales Notification module.', 'shopbuilder' ),
852 1313 ],
853 - 'fields' => [],
1314 + 'fields' => Fns::pro_version_notice( '1.0.0' ),
854 1315 ]
855 1316 ),
856 - 'flash_sale_countdown' => apply_filters(
1317 + 'flash_sale_countdown' => apply_filters(
857 1318 'rtsb/module/flash_sale_countdown/options',
858 1319 [
859 1320 'id' => 'flash_sale_countdown',
860 1321 'active' => '',
@@ -863,27 +1324,12 @@
863 1324 'active_field' => [
864 1325 'label' => esc_html__( 'Enable Flash Sale Countdown?', 'shopbuilder' ),
865 1326 'help' => esc_html__( 'Switch on to enable Flash Sale Countdown module.', 'shopbuilder' ),
866 1327 ],
867 - 'fields' => [],
1328 + 'fields' => Fns::pro_version_notice( '1.0.0' ),
868 1329 ]
869 1330 ),
870 - 'mini_cart' => apply_filters(
871 - 'rtsb/module/mini_cart/options',
872 - [
873 - 'id' => 'mini_cart',
874 - 'active' => '',
875 - 'title' => esc_html__( 'Mini Cart', 'shopbuilder' ),
876 - 'package' => $this->pro_package(),
877 - 'active_field' => [
878 - 'label' => esc_html__( 'Enable Mini Cart?', 'shopbuilder' ),
879 - 'help' => esc_html__( 'Switch on to enable mini cart module.', 'shopbuilder' ),
880 - ],
881 - 'is_active' => true,
882 - 'fields' => [],
883 - ]
884 - ),
885 - 'quick_checkout' => apply_filters(
1331 + 'quick_checkout' => apply_filters(
886 1332 'rtsb/module/quick_checkout/options',
887 1333 [
888 1334 'id' => 'quick_checkout',
889 1335 'active' => '',
@@ -892,12 +1338,12 @@
892 1338 'active_field' => [
893 1339 'label' => esc_html__( 'Enable Quick Checkout?', 'shopbuilder' ),
894 1340 'help' => esc_html__( 'Switch on to enable quick checkout module. Note: Currently, this is not suitable for variable products.', 'shopbuilder' ),
895 1341 ],
896 - 'fields' => [],
1342 + 'fields' => Fns::pro_version_notice( '1.1.0' ),
897 1343 ]
898 1344 ),
899 - 'multi_step_checkout' => apply_filters(
1345 + 'multi_step_checkout' => apply_filters(
900 1346 'rtsb/module/multi_step_checkout/options',
901 1347 [
902 1348 'id' => 'multi_step_checkout',
903 1349 'active' => '',
@@ -906,39 +1352,3090 @@
906 1352 'active_field' => [
907 1353 'label' => esc_html__( 'Enable Multi-Step Checkout?', 'shopbuilder' ),
908 1354 'help' => esc_html__( 'Switch on to enable Multi-step Checkout module.', 'shopbuilder' ),
909 1355 ],
910 - 'fields' => [],
1356 + 'fields' => Fns::pro_version_notice( '1.0.0' ),
911 1357 ]
912 1358 ),
913 - 'product_size_chart' => apply_filters(
914 - 'rtsb/module/product_size_chart/options',
1359 + 'back_order' => apply_filters(
1360 + 'rtsb/module/back_order/options',
915 1361 [
916 - 'id' => 'product_size_chart',
1362 + 'id' => 'back_order',
917 1363 'active' => '',
918 - 'title' => esc_html__( 'Product Size Chart', 'shopbuilder' ),
1364 + 'title' => esc_html__( 'Back-Order', 'shopbuilder' ),
919 1365 'package' => $this->pro_package(),
920 1366 'active_field' => [
921 - 'label' => esc_html__( 'Enable Product Size Chart?', 'shopbuilder' ),
922 - 'help' => esc_html__( 'Switch on to enable Product Size Chart module.', 'shopbuilder' ),
1367 + 'label' => esc_html__( 'Enable Back-Order?', 'shopbuilder' ),
1368 + 'help' => esc_html__( 'Switch on to enable back-order module.', 'shopbuilder' ),
923 1369 ],
924 - 'fields' => [],
1370 + 'fields' => Fns::pro_version_notice( '1.3.0', 'general', 'Back-Order', false ),
925 1371 ]
926 1372 ),
927 -// 'product_badges' => apply_filters(
928 -// 'rtsb/module/product_badges/options',
929 -// [
930 -// 'id' => 'product_badges',
931 -// 'active' => '',
932 -// 'title' => esc_html__( 'Product Badges', 'shopbuilder' ),
933 -// 'package' => $this->pro_package(),
934 -// 'active_field' => [
935 -// 'label' => esc_html__( 'Enable Product Badges?', 'shopbuilder' ),
936 -// 'help' => esc_html__( 'Switch on to enable product badges module.', 'shopbuilder' ),
937 -// ],
938 -// 'fields' => [],
939 -// ]
940 -// ),
1373 + 'sticky_add_to_cart' => apply_filters(
1374 + 'rtsb/module/sticky_add_to_cart/options',
1375 + [
1376 + 'id' => 'sticky_add_to_cart',
1377 + 'active' => '',
1378 + 'title' => esc_html__( 'Sticky Add-To-Cart', 'shopbuilder' ),
1379 + 'package' => $this->pro_package(),
1380 + 'active_field' => [
1381 + 'label' => esc_html__( 'Enable Sticky Add-To-Cart?', 'shopbuilder' ),
1382 + 'help' => esc_html__( 'Switch on to enable sticky add-to-cart module.', 'shopbuilder' ),
1383 + ],
1384 + 'fields' => Fns::pro_version_notice( '1.7.0', 'general', 'Sticky Add-To-Cart', false ),
1385 + ]
1386 + ),
1387 + 'smart_coupons' => apply_filters(
1388 + 'rtsb/module/smart_coupons/options',
1389 + [
1390 + 'id' => 'smart_coupons',
1391 + 'active' => '',
1392 + 'title' => esc_html__( 'Smart Coupons', 'shopbuilder' ),
1393 + 'package' => $this->pro_package(),
1394 + 'active_field' => [
1395 + 'label' => esc_html__( 'Enable Smart Coupons?', 'shopbuilder' ),
1396 + 'help' => esc_html__( 'Switch on to enable smart coupons module.', 'shopbuilder' ),
1397 + ],
1398 + 'fields' => Fns::pro_version_notice( '1.10.0', 'general', 'ShopBuilder Pro', false ),
1399 + ]
1400 + ),
1401 + 'bulk_discounts' => apply_filters(
1402 + 'rtsb/module/bulk_discounts/options',
1403 + [
1404 + 'id' => 'bulk_discounts',
1405 + 'active' => '',
1406 + 'title' => esc_html__( 'Bulk Discounts', 'shopbuilder' ),
1407 + 'active_field' => [
1408 + 'label' => esc_html__( 'Enable Bulk Discounts?', 'shopbuilder' ),
1409 + 'help' => esc_html__( 'Switch on to enable bulk discounts module.', 'shopbuilder' ),
1410 + ],
1411 + 'package' => $this->pro_package(),
1412 + 'fields' => Fns::pro_version_notice( '1.10.0', 'general', 'ShopBuilder Pro', false ),
1413 + ]
1414 + ),
1415 + 'bogo_bxgy_free_gift_discounts' => apply_filters(
1416 + 'rtsb/module/bogo_bxgy_free_gift_discounts/options',
1417 + [
1418 + 'id' => 'bogo_bxgy_free_gift_discounts',
1419 + 'active' => '',
1420 + 'title' => esc_html__( 'Buy X Get Y | BOGO', 'shopbuilder' ),
1421 + 'active_field' => [
1422 + 'label' => esc_html__( 'Enable Buy X Get Y | BOGO?', 'shopbuilder' ),
1423 + 'help' => esc_html__( 'Switch on to enable Buy X Get Y | BOGO module.', 'shopbuilder' ),
1424 + ],
1425 + 'package' => $this->pro_package(),
1426 + 'fields' => Fns::pro_version_notice( '1.11.0', 'general', 'ShopBuilder Pro', false ),
1427 + ]
1428 + ),
1429 + 'partial_pay' => apply_filters(
1430 + 'rtsb/module/partial_pay/options',
1431 + [
1432 + 'id' => 'partial_pay',
1433 + 'active' => '',
1434 + 'title' => esc_html__( 'Partial Pay', 'shopbuilder' ),
1435 + 'active_field' => [
1436 + 'label' => esc_html__( 'Enable Partial Pay?', 'shopbuilder' ),
1437 + 'help' => esc_html__( 'Switch on to enable partial pay module.', 'shopbuilder' ),
1438 + ],
1439 + 'package' => $this->pro_package(),
1440 + 'fields' => Fns::pro_version_notice( '1.12.0', 'general', 'ShopBuilder Pro', false ),
1441 + ]
1442 + ),
1443 + 'gift_card' => apply_filters(
1444 + 'rtsb/module/gift_card/options',
1445 + [
1446 + 'id' => 'gift_card',
1447 + 'active' => '',
1448 + 'title' => esc_html__( 'Gift Card', 'shopbuilder' ),
1449 + 'active_field' => [
1450 + 'label' => esc_html__( 'Enable Gift Card?', 'shopbuilder' ),
1451 + 'help' => esc_html__( 'Switch on to enable Gift Card module.', 'shopbuilder' ),
1452 + ],
1453 + 'package' => $this->pro_package(),
1454 + 'fields' => Fns::pro_version_notice( '1.10.0' ),
1455 + ]
1456 + ),
941 1457 ];
942 1458 return apply_filters( 'rtsb/core/modules/raw_list', $list );
1459 + }
1460 +
1461 + /**
1462 + * Get All Menu
1463 + */
1464 + public function get_all_menu() {
1465 + $manus = [
1466 + 'none' => esc_html__( 'None', 'shopbuilder' ),
1467 + ];
1468 + $nav_menus = wp_get_nav_menus();
1469 + if ( empty( $nav_menus ) ) {
1470 + return $manus;
1471 + }
1472 + foreach ( $nav_menus as $menu ) {
1473 + $manus[ $menu->slug ] = $menu->name;
1474 + }
1475 + return $manus;
1476 + }
1477 + /**
1478 + * Sticky add-to-cart module options.
1479 + *
1480 + * @return array
1481 + */
1482 + public function shopify_checkout_options() {
1483 + $notice = [];
1484 + if ( defined( 'RTSBPRO_VERSION' ) && version_compare( RTSBPRO_VERSION, '1.8.0', '<' ) ) {
1485 + $notice = Fns::pro_version_notice( '1.8.0', 'general', 'ShopBuilder Pro', false );
1486 + }
1487 + $fields = $notice + [
1488 + 'general_settings' => [
1489 + 'id' => 'general_settings',
1490 + 'type' => 'title',
1491 + 'label' => esc_html__( 'Settings', 'shopbuilder' ),
1492 + 'tab' => 'general',
1493 + ],
1494 + 'shopify_page_logo' => [
1495 + 'id' => 'shopify_page_logo',
1496 + 'type' => 'fileupload',
1497 + 'label' => esc_html__( 'Upload Checkout Page Logo', 'shopbuilder' ),
1498 + 'help' => esc_html__( 'Please upload your custom logo to display on the checkout page.', 'shopbuilder' ),
1499 + 'tab' => 'general',
1500 + ],
1501 + 'shopify_logo_height' => [
1502 + 'id' => 'shopify_logo_height',
1503 + 'label' => esc_html__( 'Logo Height (px)', 'shopbuilder' ),
1504 + 'help' => esc_html__( 'Specify the height of the checkout page logo in px.', 'shopbuilder' ),
1505 + 'type' => 'slider',
1506 + 'min' => 10,
1507 + 'max' => 200,
1508 + 'unit' => 'px',
1509 + 'value' => 40,
1510 + 'tab' => 'general',
1511 + ],
1512 + 'cart_icon_source' => [
1513 + 'id' => 'cart_icon_source',
1514 + 'label' => esc_html__( 'Cart Icon', 'shopbuilder' ),
1515 + 'help' => sprintf(
1516 + // translators: %s for pro message.
1517 + __( 'Choose a cart icon to display in your checkout\'s header. <br />%s', 'shopbuilder' ),
1518 + ! rtsb()->has_pro()
1519 + ? sprintf(
1520 + '<a target="_blank" href="' . esc_url( rtsb()->pro_version_link() ) . '">%s </a> %s ',
1521 + esc_html__( 'Upgrade to PRO', 'shopbuilder' ),
1522 + esc_html__( 'to unlock custom image icon.', 'shopbuilder' )
1523 + )
1524 + : ''
1525 + ),
1526 + 'type' => 'select',
1527 + 'value' => 'none',
1528 + 'isPro' => ! rtsb()->has_pro(),
1529 + 'options' => [
1530 + 'none' => esc_html__( 'None', 'shopbuilder' ),
1531 + 'select_icon' => esc_html__( 'Select Icon', 'shopbuilder' ),
1532 + 'upload_icon' => esc_html__( 'Upload Icon', 'shopbuilder' ),
1533 + ],
1534 + 'tab' => 'general',
1535 + ],
1536 + 'cart_icon' => [
1537 + 'id' => 'cart_icon',
1538 + 'label' => esc_html__( 'Select Cart Icon', 'shopbuilder' ),
1539 + 'help' => esc_html__( 'Please choose the icon.', 'shopbuilder' ),
1540 + 'type' => 'icon_select',
1541 + 'searchable' => true,
1542 + 'options' => Fns::get_icons(),
1543 + 'value' => 'cart-2',
1544 + 'tab' => 'general',
1545 + 'dependency' => [
1546 + 'rules' => [
1547 + [
1548 + 'item' => 'modules.shopify_checkout.cart_icon_source',
1549 + 'value' => 'select_icon',
1550 + 'operator' => '==',
1551 + ],
1552 + ],
1553 + ],
1554 + ],
1555 +
1556 + 'cart_image_icon' => [
1557 + 'id' => 'cart_image_icon',
1558 + 'type' => 'fileupload',
1559 + 'label' => esc_html__( 'Upload Custom Icon', 'shopbuilder' ),
1560 + 'help' => esc_html__( 'Please upload your custom image icon.', 'shopbuilder' ),
1561 + 'tab' => 'general',
1562 + 'dependency' => [
1563 + 'rules' => [
1564 + [
1565 + 'item' => 'modules.shopify_checkout.cart_icon_source',
1566 + 'value' => 'upload_icon',
1567 + 'operator' => '==',
1568 + ],
1569 + ],
1570 + ],
1571 + ],
1572 +
1573 + 'email_field_title' => [
1574 + 'id' => 'email_field_title',
1575 + 'type' => 'text',
1576 + 'label' => esc_html__( 'Email Field Section Title', 'shopbuilder' ),
1577 + 'help' => esc_html__( 'Enter the custom title to be displayed above the email field section.', 'shopbuilder' ),
1578 + 'value' => esc_html__( 'Contact', 'shopbuilder' ),
1579 + 'tab' => 'general',
1580 + ],
1581 +
1582 + 'billing_address_field_title' => [
1583 + 'id' => 'billing_address_field_title',
1584 + 'type' => 'text',
1585 + 'label' => esc_html__( 'Billing Fields Section Title', 'shopbuilder' ),
1586 + 'help' => esc_html__( 'Enter the custom title to be displayed above the billing fields section', 'shopbuilder' ),
1587 + 'value' => esc_html__( 'Billing address', 'shopbuilder' ),
1588 + 'tab' => 'general',
1589 + ],
1590 +
1591 + 'enable_multi_step' => [
1592 + 'id' => 'enable_multi_step',
1593 + 'type' => 'switch',
1594 + 'isPro' => ! rtsb()->has_pro(),
1595 + 'label' => esc_html__( 'Multi-Step Checkout', 'shopbuilder' ),
1596 + 'help' => esc_html__( 'Enable multi-step checkout to simplify the purchasing process.', 'shopbuilder' ),
1597 + 'tab' => 'multi-step',
1598 + ],
1599 + 'step_menu_settings' => [
1600 + 'id' => 'step_menu_settings',
1601 + 'type' => 'title',
1602 + 'label' => esc_html__( 'Step Settings ', 'shopbuilder' ),
1603 + 'tab' => 'multi-step',
1604 + 'dependency' => [
1605 + 'rules' => [
1606 + [
1607 + 'item' => 'modules.shopify_checkout.enable_multi_step',
1608 + 'value' => 'on',
1609 + 'operator' => '==',
1610 + ],
1611 + ],
1612 + ],
1613 + ],
1614 +
1615 + 'show_step_menu' => [
1616 + 'id' => 'show_step_menu',
1617 + 'type' => 'switch',
1618 + 'isPro' => ! rtsb()->has_pro(),
1619 + 'label' => esc_html__( 'Show Step Menu', 'shopbuilder' ),
1620 + 'help' => esc_html__( 'Enable to display the step navigation menu during checkout.', 'shopbuilder' ),
1621 + 'tab' => 'multi-step',
1622 + 'value' => 'on',
1623 + 'dependency' => [
1624 + 'rules' => [
1625 + [
1626 + 'item' => 'modules.shopify_checkout.enable_multi_step',
1627 + 'value' => 'on',
1628 + 'operator' => '==',
1629 + ],
1630 + ],
1631 + ],
1632 + ],
1633 + 'show_cart_menu' => [
1634 + 'id' => 'show_cart_menu',
1635 + 'type' => 'switch',
1636 + 'isPro' => ! rtsb()->has_pro(),
1637 + 'label' => esc_html__( 'Show Cart Menu', 'shopbuilder' ),
1638 + 'help' => esc_html__( 'Enable this option to display the cart item in the step menu.', 'shopbuilder' ),
1639 + 'tab' => 'multi-step',
1640 + 'dependency' => [
1641 + 'rules' => [
1642 + [
1643 + 'item' => 'modules.shopify_checkout.enable_multi_step',
1644 + 'value' => 'on',
1645 + 'operator' => '==',
1646 + ],
1647 + [
1648 + 'item' => 'modules.shopify_checkout.show_step_menu',
1649 + 'value' => 'on',
1650 + 'operator' => '==',
1651 + ],
1652 + ],
1653 + ],
1654 + ],
1655 + 'cart_text' => [
1656 + 'id' => 'cart_text',
1657 + 'type' => 'text',
1658 + 'isPro' => ! rtsb()->has_pro(),
1659 + 'label' => esc_html__( 'Cart Step Title', 'shopbuilder' ),
1660 + 'help' => esc_html__( 'Enter the cart step menu title.', 'shopbuilder' ),
1661 + 'value' => esc_html__( 'Cart', 'shopbuilder' ),
1662 + 'tab' => 'multi-step',
1663 + 'dependency' => [
1664 + 'rules' => [
1665 + [
1666 + 'item' => 'modules.shopify_checkout.show_step_menu',
1667 + 'value' => 'on',
1668 + 'operator' => '==',
1669 + ],
1670 + [
1671 + 'item' => 'modules.shopify_checkout.show_cart_menu',
1672 + 'value' => 'on',
1673 + 'operator' => '==',
1674 + ],
1675 + ],
1676 + ],
1677 + ],
1678 +
1679 + 'billing_text' => [
1680 + 'id' => 'billing_text',
1681 + 'type' => 'text',
1682 + 'isPro' => ! rtsb()->has_pro(),
1683 + 'label' => esc_html__( 'Billing Step Title', 'shopbuilder' ),
1684 + 'help' => esc_html__( 'Enter the billing step menu title.', 'shopbuilder' ),
1685 + 'value' => esc_html__( 'Billing', 'shopbuilder' ),
1686 + 'tab' => 'multi-step',
1687 + 'dependency' => [
1688 + 'rules' => [
1689 + [
1690 + 'item' => 'modules.shopify_checkout.enable_multi_step',
1691 + 'value' => 'on',
1692 + 'operator' => '==',
1693 + ],
1694 + [
1695 + 'item' => 'modules.shopify_checkout.show_step_menu',
1696 + 'value' => 'on',
1697 + 'operator' => '==',
1698 + ],
1699 + ],
1700 + ],
1701 + ],
1702 +
1703 + 'shipping_text' => [
1704 + 'id' => 'shipping_text',
1705 + 'type' => 'text',
1706 + 'isPro' => ! rtsb()->has_pro(),
1707 + 'label' => esc_html__( 'Shipping Step Title', 'shopbuilder' ),
1708 + 'help' => esc_html__( 'Enter the shipping step menu title.', 'shopbuilder' ),
1709 + 'value' => esc_html__( 'Shipping', 'shopbuilder' ),
1710 + 'tab' => 'multi-step',
1711 + 'dependency' => [
1712 + 'rules' => [
1713 + [
1714 + 'item' => 'modules.shopify_checkout.enable_multi_step',
1715 + 'value' => 'on',
1716 + 'operator' => '==',
1717 + ],
1718 + [
1719 + 'item' => 'modules.shopify_checkout.show_step_menu',
1720 + 'value' => 'on',
1721 + 'operator' => '==',
1722 + ],
1723 + ],
1724 + ],
1725 + ],
1726 +
1727 + 'shipping_method_text' => [
1728 + 'id' => 'shipping_method_text',
1729 + 'type' => 'text',
1730 + 'isPro' => ! rtsb()->has_pro(),
1731 + 'label' => esc_html__( 'Shipping Method Step Title', 'shopbuilder' ),
1732 + 'help' => esc_html__( 'Enter the shipping method step menu title.', 'shopbuilder' ),
1733 + 'value' => esc_html__( 'Shipping Method ', 'shopbuilder' ),
1734 + 'tab' => 'multi-step',
1735 + 'dependency' => [
1736 + 'rules' => [
1737 + [
1738 + 'item' => 'modules.shopify_checkout.enable_multi_step',
1739 + 'value' => 'on',
1740 + 'operator' => '==',
1741 + ],
1742 + [
1743 + 'item' => 'modules.shopify_checkout.show_step_menu',
1744 + 'value' => 'on',
1745 + 'operator' => '==',
1746 + ],
1747 + ],
1748 + ],
1749 + ],
1750 +
1751 + 'payment_text' => [
1752 + 'id' => 'payment_text',
1753 + 'type' => 'text',
1754 + 'isPro' => ! rtsb()->has_pro(),
1755 + 'label' => esc_html__( 'Payment Method Step Title', 'shopbuilder' ),
1756 + 'help' => esc_html__( 'Enter the payment method step menu title.', 'shopbuilder' ),
1757 + 'value' => esc_html__( 'Payment', 'shopbuilder' ),
1758 + 'tab' => 'multi-step',
1759 + 'dependency' => [
1760 + 'rules' => [
1761 + [
1762 + 'item' => 'modules.shopify_checkout.enable_multi_step',
1763 + 'value' => 'on',
1764 + 'operator' => '==',
1765 + ],
1766 + [
1767 + 'item' => 'modules.shopify_checkout.show_step_menu',
1768 + 'value' => 'on',
1769 + 'operator' => '==',
1770 + ],
1771 + ],
1772 + ],
1773 + ],
1774 +
1775 + 'next_button_settings' => [
1776 + 'id' => 'next_button_settings',
1777 + 'type' => 'title',
1778 + 'label' => esc_html__( 'Button Settings', 'shopbuilder' ),
1779 + 'tab' => 'multi-step',
1780 + 'dependency' => [
1781 + 'rules' => [
1782 + [
1783 + 'item' => 'modules.shopify_checkout.enable_multi_step',
1784 + 'value' => 'on',
1785 + 'operator' => '==',
1786 + ],
1787 + ],
1788 + ],
1789 + ],
1790 +
1791 + 'shop_continue_btn' => [
1792 + 'id' => 'shop_continue_btn',
1793 + 'type' => 'switch',
1794 + 'isPro' => ! rtsb()->has_pro(),
1795 + 'label' => esc_html__( 'Show Next Button', 'shopbuilder' ),
1796 + 'help' => esc_html__( 'Enable this option to display the \'Next\' button.', 'shopbuilder' ),
1797 + 'tab' => 'multi-step',
1798 + 'value' => 'on',
1799 + 'dependency' => [
1800 + 'rules' => [
1801 + [
1802 + 'item' => 'modules.shopify_checkout.enable_multi_step',
1803 + 'value' => 'on',
1804 + 'operator' => '==',
1805 + ],
1806 + ],
1807 + ],
1808 + ],
1809 + 'continue_btn_text_for_shipping' => [
1810 + 'id' => 'continue_btn_text_for_shipping',
1811 + 'type' => 'text',
1812 + 'isPro' => ! rtsb()->has_pro(),
1813 + 'label' => esc_html__( 'Next Button Label for Shipping', 'shopbuilder' ),
1814 + 'value' => esc_html__( 'Next', 'shopbuilder' ),
1815 + 'tab' => 'multi-step',
1816 + 'dependency' => [
1817 + 'rules' => [
1818 + [
1819 + 'item' => 'modules.shopify_checkout.enable_multi_step',
1820 + 'value' => 'on',
1821 + 'operator' => '==',
1822 + ],
1823 + [
1824 + 'item' => 'modules.shopify_checkout.shop_continue_btn',
1825 + 'value' => 'on',
1826 + 'operator' => '==',
1827 + ],
1828 + ],
1829 + ],
1830 + ],
1831 + 'continue_btn_text_for_shipping_method' => [
1832 + 'id' => 'continue_btn_text_for_shipping_method',
1833 + 'type' => 'text',
1834 + 'isPro' => ! rtsb()->has_pro(),
1835 + 'label' => esc_html__( 'Next Button Label for Shipping Method', 'shopbuilder' ),
1836 + 'value' => esc_html__( 'Next', 'shopbuilder' ),
1837 + 'tab' => 'multi-step',
1838 + 'dependency' => [
1839 + 'rules' => [
1840 + [
1841 + 'item' => 'modules.shopify_checkout.enable_multi_step',
1842 + 'value' => 'on',
1843 + 'operator' => '==',
1844 + ],
1845 + [
1846 + 'item' => 'modules.shopify_checkout.shop_continue_btn',
1847 + 'value' => 'on',
1848 + 'operator' => '==',
1849 + ],
1850 + ],
1851 + ],
1852 + ],
1853 + 'continue_btn_text_for_payment' => [
1854 + 'id' => 'continue_btn_text_for_payment',
1855 + 'type' => 'text',
1856 + 'label' => esc_html__( 'Next Button Label for Payment', 'shopbuilder' ),
1857 + 'value' => esc_html__( 'Next', 'shopbuilder' ),
1858 + 'tab' => 'multi-step',
1859 + 'dependency' => [
1860 + 'rules' => [
1861 + [
1862 + 'item' => 'modules.shopify_checkout.enable_multi_step',
1863 + 'value' => 'on',
1864 + 'operator' => '==',
1865 + ],
1866 + [
1867 + 'item' => 'modules.shopify_checkout.shop_continue_btn',
1868 + 'value' => 'on',
1869 + 'operator' => '==',
1870 + ],
1871 + ],
1872 + ],
1873 + ],
1874 + 'shop_return_btn' => [
1875 + 'id' => 'shop_return_btn',
1876 + 'type' => 'switch',
1877 + 'isPro' => ! rtsb()->has_pro(),
1878 + 'label' => esc_html__( 'Show Back Button', 'shopbuilder' ),
1879 + 'help' => esc_html__( 'Enable this option to display the \'Back\' button.', 'shopbuilder' ),
1880 + 'tab' => 'multi-step',
1881 + 'value' => 'on',
1882 + 'dependency' => [
1883 + 'rules' => [
1884 + [
1885 + 'item' => 'modules.shopify_checkout.enable_multi_step',
1886 + 'value' => 'on',
1887 + 'operator' => '==',
1888 + ],
1889 + ],
1890 + ],
1891 + ],
1892 + 'return_btn_text_for_billing' => [
1893 + 'id' => 'return_btn_text_for_billing',
1894 + 'type' => 'text',
1895 + 'isPro' => ! rtsb()->has_pro(),
1896 + 'label' => esc_html__( 'Back Button Label for Billing', 'shopbuilder' ),
1897 + 'value' => esc_html__( 'Prev', 'shopbuilder' ),
1898 + 'tab' => 'multi-step',
1899 + 'dependency' => [
1900 + 'rules' => [
1901 + [
1902 + 'item' => 'modules.shopify_checkout.enable_multi_step',
1903 + 'value' => 'on',
1904 + 'operator' => '==',
1905 + ],
1906 + [
1907 + 'item' => 'modules.shopify_checkout.shop_return_btn',
1908 + 'value' => 'on',
1909 + 'operator' => '==',
1910 + ],
1911 + ],
1912 + ],
1913 + ],
1914 +
1915 + 'return_btn_text_for_shipping' => [
1916 + 'id' => 'return_btn_text_for_shipping',
1917 + 'type' => 'text',
1918 + 'isPro' => ! rtsb()->has_pro(),
1919 + 'label' => esc_html__( 'Back Button Label for Shipping', 'shopbuilder' ),
1920 + 'value' => esc_html__( 'Prev', 'shopbuilder' ),
1921 + 'tab' => 'multi-step',
1922 + 'dependency' => [
1923 + 'rules' => [
1924 + [
1925 + 'item' => 'modules.shopify_checkout.enable_multi_step',
1926 + 'value' => 'on',
1927 + 'operator' => '==',
1928 + ],
1929 + [
1930 + 'item' => 'modules.shopify_checkout.shop_return_btn',
1931 + 'value' => 'on',
1932 + 'operator' => '==',
1933 + ],
1934 + ],
1935 + ],
1936 + ],
1937 +
1938 + 'return_btn_text_for_shipping_method' => [
1939 + 'id' => 'return_btn_text_for_shipping_method',
1940 + 'type' => 'text',
1941 + 'isPro' => ! rtsb()->has_pro(),
1942 + 'label' => esc_html__( 'Back Button Label for Shipping Method', 'shopbuilder' ),
1943 + 'value' => esc_html__( 'Prev', 'shopbuilder' ),
1944 + 'tab' => 'multi-step',
1945 + 'dependency' => [
1946 + 'rules' => [
1947 + [
1948 + 'item' => 'modules.shopify_checkout.enable_multi_step',
1949 + 'value' => 'on',
1950 + 'operator' => '==',
1951 + ],
1952 + [
1953 + 'item' => 'modules.shopify_checkout.shop_return_btn',
1954 + 'value' => 'on',
1955 + 'operator' => '==',
1956 + ],
1957 + ],
1958 + ],
1959 + ],
1960 +
1961 + 'order_review_settings' => [
1962 + 'id' => 'order_review_settings',
1963 + 'type' => 'title',
1964 + 'label' => esc_html__( 'Order Reviews', 'shopbuilder' ),
1965 + 'tab' => 'general',
1966 + ],
1967 + 'order_review_item_link' => [
1968 + 'id' => 'order_review_item_link',
1969 + 'type' => 'switch',
1970 + 'label' => esc_html__( 'Link Product Titles', 'shopbuilder' ),
1971 + 'help' => esc_html__( 'Enable to make product titles clickable, linking to their product pages.', 'shopbuilder' ),
1972 + 'value' => '',
1973 + 'tab' => 'general',
1974 + ],
1975 + 'extra_content' => [
1976 + 'id' => 'extra_content',
1977 + 'label' => esc_html__( 'Display Additional Data', 'shopbuilder' ),
1978 + 'help' => esc_html__( 'Enter custom text to display below the Order Review section. You can include custom HTML content. Shortcodes are also supported here.', 'shopbuilder' ),
1979 + 'type' => 'text_editor',
1980 + 'isPro' => ! rtsb()->has_pro(),
1981 + 'sanitize_fn' => 'pass_all',
1982 + 'tab' => 'general',
1983 + ],
1984 +
1985 + 'footer_settings' => [
1986 + 'id' => 'footer_settings',
1987 + 'type' => 'title',
1988 + 'label' => esc_html__( 'Footer', 'shopbuilder' ),
1989 + 'tab' => 'general',
1990 + ],
1991 +
1992 + 'footer_menu' => [
1993 + 'id' => 'footer_menu',
1994 + 'label' => esc_html__( 'Footer Menu', 'shopbuilder' ),
1995 + 'help' => esc_html__( 'Select a menu to display in the footer section of your checkout page.', 'shopbuilder' ),
1996 + 'type' => 'select',
1997 + 'value' => 'none',
1998 + 'options' => $this->get_all_menu(),
1999 + 'tab' => 'general',
2000 + ],
2001 +
2002 + 'footer_text' => [
2003 + 'id' => 'footer_text',
2004 + 'type' => 'text',
2005 + 'label' => esc_html__( 'Footer Text', 'shopbuilder' ),
2006 + 'help' => esc_html__( 'Enter custom text to display in the footer section of your checkout page. You can use {year} placeholder to display the current year.', 'shopbuilder' ),
2007 + 'value' => esc_html__( 'Copyright @{year} | All rights reserved', 'shopbuilder' ),
2008 + 'tab' => 'general',
2009 + ],
2010 +
2011 + // Place Order.
2012 + 'login_button_styles_settings' => [
2013 + 'id' => 'login_button_styles_settings',
2014 + 'type' => 'title',
2015 + 'tab' => 'btn-styles',
2016 + 'label' => esc_html__( 'Login Button Style', 'shopbuilder' ),
2017 + ],
2018 + 'login_button_height' => [
2019 + 'id' => 'login_button_height',
2020 + 'label' => esc_html__( 'Height (px)', 'shopbuilder' ),
2021 + 'type' => 'slider',
2022 + 'min' => 10,
2023 + 'max' => 100,
2024 + 'unit' => 'px',
2025 + 'value' => 50,
2026 + 'tab' => 'btn-styles',
2027 + ],
2028 + 'login_button_width' => [
2029 + 'id' => 'login_button_width',
2030 + 'label' => esc_html__( 'Width (px)', 'shopbuilder' ),
2031 + 'type' => 'slider',
2032 + 'min' => 10,
2033 + 'max' => 1000,
2034 + 'unit' => 'px',
2035 + 'tab' => 'btn-styles',
2036 + ],
2037 + 'login_button_font_size' => [
2038 + 'id' => 'login_button_font_size',
2039 + 'label' => esc_html__( 'Font Size (px)', 'shopbuilder' ),
2040 + 'type' => 'slider',
2041 + 'min' => 10,
2042 + 'max' => 50,
2043 + 'unit' => 'px',
2044 + 'value' => 15,
2045 + 'tab' => 'btn-styles',
2046 + ],
2047 + 'login_button_bg_color' => [
2048 + 'id' => 'login_button_bg_color',
2049 + 'label' => esc_html__( 'Background Color', 'shopbuilder' ),
2050 + 'tab' => 'btn-styles',
2051 + 'type' => 'color',
2052 + ],
2053 + 'login_button_hover_bg_color' => [
2054 + 'id' => 'login_button_hover_bg_color',
2055 + 'label' => esc_html__( 'Hover Background Color', 'shopbuilder' ),
2056 + 'tab' => 'btn-styles',
2057 + 'type' => 'color',
2058 + ],
2059 + 'login_button_color' => [
2060 + 'id' => 'login_button_color',
2061 + 'label' => esc_html__( 'Color', 'shopbuilder' ),
2062 + 'tab' => 'btn-styles',
2063 + 'type' => 'color',
2064 + ],
2065 + 'login_button_hover_color' => [
2066 + 'id' => 'login_button_hover_color',
2067 + 'label' => esc_html__( 'Hover Color', 'shopbuilder' ),
2068 + 'tab' => 'btn-styles',
2069 + 'type' => 'color',
2070 + ],
2071 + 'login_button_border_color' => [
2072 + 'id' => 'login_button_border_color',
2073 + 'label' => esc_html__( 'Border Color', 'shopbuilder' ),
2074 + 'tab' => 'btn-styles',
2075 + 'type' => 'color',
2076 + ],
2077 + 'login_button_hover_border_color' => [
2078 + 'id' => 'login_button_hover_border_color',
2079 + 'label' => esc_html__( 'Hover Border Color', 'shopbuilder' ),
2080 + 'tab' => 'btn-styles',
2081 + 'type' => 'color',
2082 + ],
2083 +
2084 + // Place Order.
2085 + 'place_order_button_styles_settings' => [
2086 + 'id' => 'place_order_button_styles_settings',
2087 + 'type' => 'title',
2088 + 'tab' => 'btn-styles',
2089 + 'label' => esc_html__( 'Place Order Button Style', 'shopbuilder' ),
2090 + ],
2091 + 'place_order_button_height' => [
2092 + 'id' => 'place_order_button_height',
2093 + 'label' => esc_html__( 'Height (px)', 'shopbuilder' ),
2094 + 'type' => 'slider',
2095 + 'min' => 10,
2096 + 'max' => 100,
2097 + 'unit' => 'px',
2098 + 'value' => 50,
2099 + 'tab' => 'btn-styles',
2100 + ],
2101 + 'place_order_button_width' => [
2102 + 'id' => 'place_order_button_width',
2103 + 'label' => esc_html__( 'Width (px)', 'shopbuilder' ),
2104 + 'type' => 'slider',
2105 + 'min' => 10,
2106 + 'max' => 1000,
2107 + 'unit' => 'px',
2108 + 'tab' => 'btn-styles',
2109 + ],
2110 + 'place_order_button_font_size' => [
2111 + 'id' => 'place_order_button_font_size',
2112 + 'label' => esc_html__( 'Font Size (px)', 'shopbuilder' ),
2113 + 'type' => 'slider',
2114 + 'min' => 10,
2115 + 'max' => 50,
2116 + 'unit' => 'px',
2117 + 'value' => 15,
2118 + 'tab' => 'btn-styles',
2119 + ],
2120 + 'place_order_button_bg_color' => [
2121 + 'id' => 'place_order_button_bg_color',
2122 + 'label' => esc_html__( 'Background Color', 'shopbuilder' ),
2123 + 'tab' => 'btn-styles',
2124 + 'type' => 'color',
2125 + ],
2126 + 'place_order_button_hover_bg_color' => [
2127 + 'id' => 'place_order_button_hover_bg_color',
2128 + 'label' => esc_html__( 'Hover Background Color', 'shopbuilder' ),
2129 + 'tab' => 'btn-styles',
2130 + 'type' => 'color',
2131 + ],
2132 + 'place_order_button_color' => [
2133 + 'id' => 'place_order_button_color',
2134 + 'label' => esc_html__( 'Color', 'shopbuilder' ),
2135 + 'tab' => 'btn-styles',
2136 + 'type' => 'color',
2137 + ],
2138 + 'place_order_button_hover_color' => [
2139 + 'id' => 'place_order_button_hover_color',
2140 + 'label' => esc_html__( 'Hover Color', 'shopbuilder' ),
2141 + 'tab' => 'btn-styles',
2142 + 'type' => 'color',
2143 + ],
2144 + 'place_order_button_border_color' => [
2145 + 'id' => 'place_order_button_border_color',
2146 + 'label' => esc_html__( 'Border Color', 'shopbuilder' ),
2147 + 'tab' => 'btn-styles',
2148 + 'type' => 'color',
2149 + ],
2150 + 'place_order_button_hover_border_color' => [
2151 + 'id' => 'place_order_button_hover_border_color',
2152 + 'label' => esc_html__( 'Hover Border Color', 'shopbuilder' ),
2153 + 'tab' => 'btn-styles',
2154 + 'type' => 'color',
2155 + ],
2156 +
2157 + // Next Button.
2158 + 'next_button_styles_settings' => [
2159 + 'id' => 'next_button_styles_settings',
2160 + 'type' => 'title',
2161 + 'tab' => 'btn-styles',
2162 + 'label' => esc_html__( 'Next Button Style', 'shopbuilder' ),
2163 + 'dependency' => [
2164 + 'rules' => [
2165 + [
2166 + 'item' => 'modules.shopify_checkout.enable_multi_step',
2167 + 'value' => 'on',
2168 + 'operator' => '==',
2169 + ],
2170 + [
2171 + 'item' => 'modules.shopify_checkout.shop_continue_btn',
2172 + 'value' => 'on',
2173 + 'operator' => '==',
2174 + ],
2175 + ],
2176 + ],
2177 + ],
2178 + 'next_button_height' => [
2179 + 'id' => 'next_button_height',
2180 + 'isPro' => ! rtsb()->has_pro(),
2181 + 'label' => esc_html__( 'Height (px)', 'shopbuilder' ),
2182 + 'type' => 'slider',
2183 + 'min' => 10,
2184 + 'max' => 100,
2185 + 'unit' => 'px',
2186 + 'value' => 50,
2187 + 'tab' => 'btn-styles',
2188 + 'dependency' => [
2189 + 'rules' => [
2190 + [
2191 + 'item' => 'modules.shopify_checkout.enable_multi_step',
2192 + 'value' => 'on',
2193 + 'operator' => '==',
2194 + ],
2195 + [
2196 + 'item' => 'modules.shopify_checkout.shop_continue_btn',
2197 + 'value' => 'on',
2198 + 'operator' => '==',
2199 + ],
2200 + ],
2201 + ],
2202 + ],
2203 + 'next_button_width' => [
2204 + 'id' => 'next_button_width',
2205 + 'label' => esc_html__( 'Width (px)', 'shopbuilder' ),
2206 + 'type' => 'slider',
2207 + 'min' => 10,
2208 + 'max' => 1000,
2209 + 'unit' => 'px',
2210 + 'tab' => 'btn-styles',
2211 + 'dependency' => [
2212 + 'rules' => [
2213 + [
2214 + 'item' => 'modules.shopify_checkout.enable_multi_step',
2215 + 'value' => 'on',
2216 + 'operator' => '==',
2217 + ],
2218 + [
2219 + 'item' => 'modules.shopify_checkout.shop_continue_btn',
2220 + 'value' => 'on',
2221 + 'operator' => '==',
2222 + ],
2223 + ],
2224 + ],
2225 + ],
2226 + 'next_button_font_size' => [
2227 + 'id' => 'next_button_font_size',
2228 + 'isPro' => ! rtsb()->has_pro(),
2229 + 'label' => esc_html__( 'Font Size (px)', 'shopbuilder' ),
2230 + 'type' => 'slider',
2231 + 'min' => 10,
2232 + 'max' => 50,
2233 + 'unit' => 'px',
2234 + 'value' => 15,
2235 + 'tab' => 'btn-styles',
2236 + 'dependency' => [
2237 + 'rules' => [
2238 + [
2239 + 'item' => 'modules.shopify_checkout.enable_multi_step',
2240 + 'value' => 'on',
2241 + 'operator' => '==',
2242 + ],
2243 + [
2244 + 'item' => 'modules.shopify_checkout.shop_continue_btn',
2245 + 'value' => 'on',
2246 + 'operator' => '==',
2247 + ],
2248 + ],
2249 + ],
2250 + ],
2251 + 'next_button_bg_color' => [
2252 + 'id' => 'next_button_bg_color',
2253 + 'isPro' => ! rtsb()->has_pro(),
2254 + 'label' => esc_html__( 'Background Color', 'shopbuilder' ),
2255 + 'tab' => 'btn-styles',
2256 + 'type' => 'color',
2257 + 'dependency' => [
2258 + 'rules' => [
2259 + [
2260 + 'item' => 'modules.shopify_checkout.enable_multi_step',
2261 + 'value' => 'on',
2262 + 'operator' => '==',
2263 + ],
2264 + [
2265 + 'item' => 'modules.shopify_checkout.shop_continue_btn',
2266 + 'value' => 'on',
2267 + 'operator' => '==',
2268 + ],
2269 + ],
2270 + ],
2271 + ],
2272 + 'next_button_hover_bg_color' => [
2273 + 'id' => 'next_button_hover_bg_color',
2274 + 'isPro' => ! rtsb()->has_pro(),
2275 + 'label' => esc_html__( 'Hover Background Color', 'shopbuilder' ),
2276 + 'tab' => 'btn-styles',
2277 + 'type' => 'color',
2278 + 'dependency' => [
2279 + 'rules' => [
2280 + [
2281 + 'item' => 'modules.shopify_checkout.enable_multi_step',
2282 + 'value' => 'on',
2283 + 'operator' => '==',
2284 + ],
2285 + [
2286 + 'item' => 'modules.shopify_checkout.shop_continue_btn',
2287 + 'value' => 'on',
2288 + 'operator' => '==',
2289 + ],
2290 + ],
2291 + ],
2292 + ],
2293 + 'next_button_color' => [
2294 + 'id' => 'next_button_color',
2295 + 'isPro' => ! rtsb()->has_pro(),
2296 + 'label' => esc_html__( 'Color', 'shopbuilder' ),
2297 + 'tab' => 'btn-styles',
2298 + 'type' => 'color',
2299 + 'dependency' => [
2300 + 'rules' => [
2301 + [
2302 + 'item' => 'modules.shopify_checkout.enable_multi_step',
2303 + 'value' => 'on',
2304 + 'operator' => '==',
2305 + ],
2306 + [
2307 + 'item' => 'modules.shopify_checkout.shop_continue_btn',
2308 + 'value' => 'on',
2309 + 'operator' => '==',
2310 + ],
2311 + ],
2312 + ],
2313 + ],
2314 + 'next_button_hover_color' => [
2315 + 'id' => 'next_button_hover_color',
2316 + 'isPro' => ! rtsb()->has_pro(),
2317 + 'label' => esc_html__( 'Hover Color', 'shopbuilder' ),
2318 + 'tab' => 'btn-styles',
2319 + 'type' => 'color',
2320 + 'dependency' => [
2321 + 'rules' => [
2322 + [
2323 + 'item' => 'modules.shopify_checkout.enable_multi_step',
2324 + 'value' => 'on',
2325 + 'operator' => '==',
2326 + ],
2327 + [
2328 + 'item' => 'modules.shopify_checkout.shop_continue_btn',
2329 + 'value' => 'on',
2330 + 'operator' => '==',
2331 + ],
2332 + ],
2333 + ],
2334 + ],
2335 + 'next_button_border_color' => [
2336 + 'id' => 'next_button_border_color',
2337 + 'isPro' => ! rtsb()->has_pro(),
2338 + 'label' => esc_html__( 'Border Color', 'shopbuilder' ),
2339 + 'tab' => 'btn-styles',
2340 + 'type' => 'color',
2341 + 'dependency' => [
2342 + 'rules' => [
2343 + [
2344 + 'item' => 'modules.shopify_checkout.enable_multi_step',
2345 + 'value' => 'on',
2346 + 'operator' => '==',
2347 + ],
2348 + [
2349 + 'item' => 'modules.shopify_checkout.shop_continue_btn',
2350 + 'value' => 'on',
2351 + 'operator' => '==',
2352 + ],
2353 + ],
2354 + ],
2355 + ],
2356 + 'next_button_hover_border_color' => [
2357 + 'id' => 'next_button_hover_border_color',
2358 + 'isPro' => ! rtsb()->has_pro(),
2359 + 'label' => esc_html__( 'Hover Border Color', 'shopbuilder' ),
2360 + 'tab' => 'btn-styles',
2361 + 'type' => 'color',
2362 + 'dependency' => [
2363 + 'rules' => [
2364 + [
2365 + 'item' => 'modules.shopify_checkout.enable_multi_step',
2366 + 'value' => 'on',
2367 + 'operator' => '==',
2368 + ],
2369 + [
2370 + 'item' => 'modules.shopify_checkout.shop_continue_btn',
2371 + 'value' => 'on',
2372 + 'operator' => '==',
2373 + ],
2374 + ],
2375 + ],
2376 + ],
2377 + 'prev_button_styles_settings' => [
2378 + 'id' => 'prev_button_styles_settings',
2379 + 'type' => 'title',
2380 + 'tab' => 'btn-styles',
2381 + 'label' => esc_html__( 'Prev Button Style', 'shopbuilder' ),
2382 + 'dependency' => [
2383 + 'rules' => [
2384 + [
2385 + 'item' => 'modules.shopify_checkout.enable_multi_step',
2386 + 'value' => 'on',
2387 + 'operator' => '==',
2388 + ],
2389 + [
2390 + 'item' => 'modules.shopify_checkout.shop_return_btn',
2391 + 'value' => 'on',
2392 + 'operator' => '==',
2393 + ],
2394 + ],
2395 + ],
2396 +
2397 + ],
2398 + 'prev_button_height' => [
2399 + 'id' => 'prev_button_height',
2400 + 'isPro' => ! rtsb()->has_pro(),
2401 + 'label' => esc_html__( 'Height (px)', 'shopbuilder' ),
2402 + 'type' => 'slider',
2403 + 'min' => 10,
2404 + 'max' => 100,
2405 + 'unit' => 'px',
2406 + 'value' => 50,
2407 + 'tab' => 'btn-styles',
2408 + 'dependency' => [
2409 + 'rules' => [
2410 + [
2411 + 'item' => 'modules.shopify_checkout.enable_multi_step',
2412 + 'value' => 'on',
2413 + 'operator' => '==',
2414 + ],
2415 + [
2416 + 'item' => 'modules.shopify_checkout.shop_return_btn',
2417 + 'value' => 'on',
2418 + 'operator' => '==',
2419 + ],
2420 + ],
2421 + ],
2422 + ],
2423 + 'prev_button_width' => [
2424 + 'id' => 'prev_button_width',
2425 + 'label' => esc_html__( 'Width (px)', 'shopbuilder' ),
2426 + 'type' => 'slider',
2427 + 'min' => 10,
2428 + 'max' => 1000,
2429 + 'unit' => 'px',
2430 + 'tab' => 'btn-styles',
2431 + 'dependency' => [
2432 + 'rules' => [
2433 + [
2434 + 'item' => 'modules.shopify_checkout.enable_multi_step',
2435 + 'value' => 'on',
2436 + 'operator' => '==',
2437 + ],
2438 + [
2439 + 'item' => 'modules.shopify_checkout.shop_return_btn',
2440 + 'value' => 'on',
2441 + 'operator' => '==',
2442 + ],
2443 + ],
2444 + ],
2445 + ],
2446 + 'prev_button_font_size' => [
2447 + 'id' => 'prev_button_font_size',
2448 + 'isPro' => ! rtsb()->has_pro(),
2449 + 'label' => esc_html__( 'Font Size (px)', 'shopbuilder' ),
2450 + 'type' => 'slider',
2451 + 'min' => 10,
2452 + 'max' => 50,
2453 + 'unit' => 'px',
2454 + 'value' => 15,
2455 + 'tab' => 'btn-styles',
2456 + 'dependency' => [
2457 + 'rules' => [
2458 + [
2459 + 'item' => 'modules.shopify_checkout.enable_multi_step',
2460 + 'value' => 'on',
2461 + 'operator' => '==',
2462 + ],
2463 + [
2464 + 'item' => 'modules.shopify_checkout.shop_return_btn',
2465 + 'value' => 'on',
2466 + 'operator' => '==',
2467 + ],
2468 + ],
2469 + ],
2470 + ],
2471 + 'prev_button_bg_color' => [
2472 + 'id' => 'prev_button_bg_color',
2473 + 'isPro' => ! rtsb()->has_pro(),
2474 + 'label' => esc_html__( 'Background Color', 'shopbuilder' ),
2475 + 'tab' => 'btn-styles',
2476 + 'type' => 'color',
2477 + 'dependency' => [
2478 + 'rules' => [
2479 + [
2480 + 'item' => 'modules.shopify_checkout.enable_multi_step',
2481 + 'value' => 'on',
2482 + 'operator' => '==',
2483 + ],
2484 + [
2485 + 'item' => 'modules.shopify_checkout.shop_return_btn',
2486 + 'value' => 'on',
2487 + 'operator' => '==',
2488 + ],
2489 + ],
2490 + ],
2491 + ],
2492 + 'prev_button_hover_bg_color' => [
2493 + 'id' => 'prev_button_hover_bg_color',
2494 + 'label' => esc_html__( 'Hover Background Color', 'shopbuilder' ),
2495 + 'isPro' => ! rtsb()->has_pro(),
2496 + 'tab' => 'btn-styles',
2497 + 'type' => 'color',
2498 + 'dependency' => [
2499 + 'rules' => [
2500 + [
2501 + 'item' => 'modules.shopify_checkout.enable_multi_step',
2502 + 'value' => 'on',
2503 + 'operator' => '==',
2504 + ],
2505 + [
2506 + 'item' => 'modules.shopify_checkout.shop_return_btn',
2507 + 'value' => 'on',
2508 + 'operator' => '==',
2509 + ],
2510 + ],
2511 + ],
2512 + ],
2513 + 'prev_button_color' => [
2514 + 'id' => 'prev_button_color',
2515 + 'label' => esc_html__( 'Color', 'shopbuilder' ),
2516 + 'isPro' => ! rtsb()->has_pro(),
2517 + 'tab' => 'btn-styles',
2518 + 'type' => 'color',
2519 + 'dependency' => [
2520 + 'rules' => [
2521 + [
2522 + 'item' => 'modules.shopify_checkout.enable_multi_step',
2523 + 'value' => 'on',
2524 + 'operator' => '==',
2525 + ],
2526 + [
2527 + 'item' => 'modules.shopify_checkout.shop_return_btn',
2528 + 'value' => 'on',
2529 + 'operator' => '==',
2530 + ],
2531 + ],
2532 + ],
2533 + ],
2534 + 'prev_button_hover_color' => [
2535 + 'id' => 'prev_button_hover_color',
2536 + 'label' => esc_html__( 'Hover Color', 'shopbuilder' ),
2537 + 'isPro' => ! rtsb()->has_pro(),
2538 + 'tab' => 'btn-styles',
2539 + 'type' => 'color',
2540 + 'dependency' => [
2541 + 'rules' => [
2542 + [
2543 + 'item' => 'modules.shopify_checkout.enable_multi_step',
2544 + 'value' => 'on',
2545 + 'operator' => '==',
2546 + ],
2547 + [
2548 + 'item' => 'modules.shopify_checkout.shop_return_btn',
2549 + 'value' => 'on',
2550 + 'operator' => '==',
2551 + ],
2552 + ],
2553 + ],
2554 + ],
2555 + 'prev_button_border_color' => [
2556 + 'id' => 'prev_button_border_color',
2557 + 'label' => esc_html__( 'Border Color', 'shopbuilder' ),
2558 + 'isPro' => ! rtsb()->has_pro(),
2559 + 'tab' => 'btn-styles',
2560 + 'type' => 'color',
2561 + 'dependency' => [
2562 + 'rules' => [
2563 + [
2564 + 'item' => 'modules.shopify_checkout.enable_multi_step',
2565 + 'value' => 'on',
2566 + 'operator' => '==',
2567 + ],
2568 + [
2569 + 'item' => 'modules.shopify_checkout.shop_return_btn',
2570 + 'value' => 'on',
2571 + 'operator' => '==',
2572 + ],
2573 + ],
2574 + ],
2575 + ],
2576 + 'prev_button_hover_border_color' => [
2577 + 'id' => 'prev_button_hover_border_color',
2578 + 'label' => esc_html__( 'Hover Border Color', 'shopbuilder' ),
2579 + 'isPro' => ! rtsb()->has_pro(),
2580 + 'tab' => 'btn-styles',
2581 + 'type' => 'color',
2582 + 'dependency' => [
2583 + 'rules' => [
2584 + [
2585 + 'item' => 'modules.shopify_checkout.enable_multi_step',
2586 + 'value' => 'on',
2587 + 'operator' => '==',
2588 + ],
2589 + [
2590 + 'item' => 'modules.shopify_checkout.shop_return_btn',
2591 + 'value' => 'on',
2592 + 'operator' => '==',
2593 + ],
2594 + ],
2595 + ],
2596 + ],
2597 + 'coupon_button_styles_settings' => [
2598 + 'id' => 'coupon_button_styles_settings',
2599 + 'type' => 'title',
2600 + 'tab' => 'btn-styles',
2601 + 'label' => esc_html__( 'Apply Coupon Button Style', 'shopbuilder' ),
2602 + ],
2603 + 'coupon_height' => [
2604 + 'id' => 'coupon_height',
2605 + 'label' => esc_html__( 'Coupon Field And Button Height (px)', 'shopbuilder' ),
2606 + 'type' => 'slider',
2607 + 'min' => 10,
2608 + 'max' => 100,
2609 + 'unit' => 'px',
2610 + 'value' => 50,
2611 + 'tab' => 'btn-styles',
2612 + ],
2613 + 'coupon_button_font_size' => [
2614 + 'id' => 'coupon_button_font_size',
2615 + 'label' => esc_html__( 'Font Size (px)', 'shopbuilder' ),
2616 + 'type' => 'slider',
2617 + 'min' => 10,
2618 + 'max' => 50,
2619 + 'unit' => 'px',
2620 + 'value' => 15,
2621 + 'tab' => 'btn-styles',
2622 + ],
2623 + 'coupon_button_bg_color' => [
2624 + 'id' => 'coupon_button_bg_color',
2625 + 'label' => esc_html__( 'Background Color', 'shopbuilder' ),
2626 + 'tab' => 'btn-styles',
2627 + 'type' => 'color',
2628 + ],
2629 + 'coupon_button_hover_bg_color' => [
2630 + 'id' => 'coupon_button_hover_bg_color',
2631 + 'label' => esc_html__( 'Hover Background Color', 'shopbuilder' ),
2632 + 'tab' => 'btn-styles',
2633 + 'type' => 'color',
2634 + ],
2635 + 'coupon_button_color' => [
2636 + 'id' => 'coupon_button_color',
2637 + 'label' => esc_html__( 'Color', 'shopbuilder' ),
2638 + 'tab' => 'btn-styles',
2639 + 'type' => 'color',
2640 + ],
2641 + 'coupon_button_hover_color' => [
2642 + 'id' => 'coupon_button_hover_color',
2643 + 'label' => esc_html__( 'Hover Color', 'shopbuilder' ),
2644 + 'tab' => 'btn-styles',
2645 + 'type' => 'color',
2646 + ],
2647 + 'coupon_button_border_color' => [
2648 + 'id' => 'coupon_button_border_color',
2649 + 'label' => esc_html__( 'Border Color', 'shopbuilder' ),
2650 + 'tab' => 'btn-styles',
2651 + 'type' => 'color',
2652 + ],
2653 + 'coupon_button_hover_border_color' => [
2654 + 'id' => 'coupon_button_hover_border_color',
2655 + 'label' => esc_html__( 'Hover Border Color', 'shopbuilder' ),
2656 + 'tab' => 'btn-styles',
2657 + 'type' => 'color',
2658 + ],
2659 +
2660 + 'header_cart_icon_styles' => [
2661 + 'id' => 'header_cart_icon_styles',
2662 + 'type' => 'title',
2663 + 'tab' => 'styles',
2664 + 'label' => esc_html__( 'Header Cart Icon Style', 'shopbuilder' ),
2665 + 'dependency' => [
2666 + 'rules' => [
2667 + [
2668 + 'item' => 'modules.shopify_checkout.cart_icon_source',
2669 + 'value' => 'none',
2670 + 'operator' => '!=',
2671 + ],
2672 + ],
2673 + ],
2674 + ],
2675 +
2676 + 'shopify_cart_icon_height' => [
2677 + 'id' => 'shopify_cart_icon_height',
2678 + 'label' => esc_html__( 'Cart Icon Height (px)', 'shopbuilder' ),
2679 + 'type' => 'slider',
2680 + 'min' => 10,
2681 + 'max' => 200,
2682 + 'unit' => 'px',
2683 + 'value' => 40,
2684 + 'tab' => 'styles',
2685 + 'dependency' => [
2686 + 'rules' => [
2687 + [
2688 + 'item' => 'modules.shopify_checkout.cart_icon_source',
2689 + 'value' => 'upload_icon',
2690 + 'operator' => '==',
2691 + ],
2692 + ],
2693 + ],
2694 + ],
2695 +
2696 + 'header_cart_icon_color' => [
2697 + 'id' => 'step_menu_color',
2698 + 'label' => esc_html__( 'Color', 'shopbuilder' ),
2699 + 'tab' => 'styles',
2700 + 'type' => 'color',
2701 + 'dependency' => [
2702 + 'rules' => [
2703 + [
2704 + 'item' => 'modules.shopify_checkout.cart_icon_source',
2705 + 'value' => 'select_icon',
2706 + 'operator' => '==',
2707 + ],
2708 + ],
2709 + ],
2710 + ],
2711 + 'header_cart_icon_hover_color' => [
2712 + 'id' => 'header_cart_icon_hover_color',
2713 + 'label' => esc_html__( 'Hover Color', 'shopbuilder' ),
2714 + 'tab' => 'styles',
2715 + 'type' => 'color',
2716 + 'dependency' => [
2717 + 'rules' => [
2718 + [
2719 + 'item' => 'modules.shopify_checkout.cart_icon_source',
2720 + 'value' => 'select_icon',
2721 + 'operator' => '==',
2722 + ],
2723 + ],
2724 + ],
2725 + ],
2726 + 'header_cart_icon_font_size' => [
2727 + 'id' => 'header_cart_icon_font_size',
2728 + 'label' => esc_html__( 'Font Size (px)', 'shopbuilder' ),
2729 + 'type' => 'slider',
2730 + 'min' => 10,
2731 + 'max' => 50,
2732 + 'unit' => 'px',
2733 + 'value' => 15,
2734 + 'tab' => 'styles',
2735 + 'dependency' => [
2736 + 'rules' => [
2737 + [
2738 + 'item' => 'modules.shopify_checkout.cart_icon_source',
2739 + 'value' => 'select_icon',
2740 + 'operator' => '==',
2741 + ],
2742 + ],
2743 + ],
2744 + ],
2745 + 'footer_menu_styles_settings' => [
2746 + 'id' => 'footer_menu_styles_settings',
2747 + 'type' => 'title',
2748 + 'tab' => 'styles',
2749 + 'label' => esc_html__( 'Footer Style', 'shopbuilder' ),
2750 + ],
2751 + 'footer_menu_color' => [
2752 + 'id' => 'footer_menu_color',
2753 + 'label' => esc_html__( 'Menu Color', 'shopbuilder' ),
2754 + 'tab' => 'styles',
2755 + 'type' => 'color',
2756 + ],
2757 + 'footer_menu_hover_color' => [
2758 + 'id' => 'footer_menu_hover_color',
2759 + 'label' => esc_html__( 'Menu Hover Color', 'shopbuilder' ),
2760 + 'tab' => 'styles',
2761 + 'type' => 'color',
2762 + ],
2763 + 'footer_menu_font_size' => [
2764 + 'id' => 'footer_menu_font_size',
2765 + 'label' => esc_html__( 'Menu Font Size (px)', 'shopbuilder' ),
2766 + 'type' => 'slider',
2767 + 'min' => 10,
2768 + 'max' => 50,
2769 + 'unit' => 'px',
2770 + 'value' => 15,
2771 + 'tab' => 'styles',
2772 + ],
2773 + 'footer_text_size' => [
2774 + 'id' => 'footer_text_size',
2775 + 'label' => esc_html__( 'Footer Text Font Size (px)', 'shopbuilder' ),
2776 + 'type' => 'slider',
2777 + 'min' => 10,
2778 + 'max' => 50,
2779 + 'unit' => 'px',
2780 + 'value' => 15,
2781 + 'tab' => 'styles',
2782 + ],
2783 + 'footer_text_color' => [
2784 + 'id' => 'footer_text_color',
2785 + 'label' => esc_html__( 'Footer Text Color', 'shopbuilder' ),
2786 + 'tab' => 'styles',
2787 + 'type' => 'color',
2788 + ],
2789 + 'step_menu_styles_settings' => [
2790 + 'id' => 'step_menu_styles_settings',
2791 + 'type' => 'title',
2792 + 'tab' => 'styles',
2793 + 'label' => esc_html__( 'Step Menu Style', 'shopbuilder' ),
2794 + 'dependency' => [
2795 + 'rules' => [
2796 + [
2797 + 'item' => 'modules.shopify_checkout.enable_multi_step',
2798 + 'value' => 'on',
2799 + 'operator' => '==',
2800 + ],
2801 + [
2802 + 'item' => 'modules.shopify_checkout.show_step_menu',
2803 + 'value' => 'on',
2804 + 'operator' => '==',
2805 + ],
2806 + ],
2807 + ],
2808 + ],
2809 + 'step_menu_color' => [
2810 + 'id' => 'step_menu_color',
2811 + 'label' => esc_html__( 'Color', 'shopbuilder' ),
2812 + 'isPro' => ! rtsb()->has_pro(),
2813 + 'tab' => 'styles',
2814 + 'type' => 'color',
2815 + 'dependency' => [
2816 + 'rules' => [
2817 + [
2818 + 'item' => 'modules.shopify_checkout.enable_multi_step',
2819 + 'value' => 'on',
2820 + 'operator' => '==',
2821 + ],
2822 + [
2823 + 'item' => 'modules.shopify_checkout.show_step_menu',
2824 + 'value' => 'on',
2825 + 'operator' => '==',
2826 + ],
2827 + ],
2828 + ],
2829 + ],
2830 + 'step_menu_hover_color' => [
2831 + 'id' => 'step_menu_hover_color',
2832 + 'label' => esc_html__( 'Hover Color', 'shopbuilder' ),
2833 + 'isPro' => ! rtsb()->has_pro(),
2834 + 'tab' => 'styles',
2835 + 'type' => 'color',
2836 + 'dependency' => [
2837 + 'rules' => [
2838 + [
2839 + 'item' => 'modules.shopify_checkout.enable_multi_step',
2840 + 'value' => 'on',
2841 + 'operator' => '==',
2842 + ],
2843 + [
2844 + 'item' => 'modules.shopify_checkout.show_step_menu',
2845 + 'value' => 'on',
2846 + 'operator' => '==',
2847 + ],
2848 + ],
2849 + ],
2850 + ],
2851 + 'step_menu_font_size' => [
2852 + 'id' => 'step_menu_font_size',
2853 + 'label' => esc_html__( 'Font Size (px)', 'shopbuilder' ),
2854 + 'isPro' => ! rtsb()->has_pro(),
2855 + 'type' => 'slider',
2856 + 'min' => 10,
2857 + 'max' => 50,
2858 + 'unit' => 'px',
2859 + 'value' => 15,
2860 + 'tab' => 'styles',
2861 + 'dependency' => [
2862 + 'rules' => [
2863 + [
2864 + 'item' => 'modules.shopify_checkout.enable_multi_step',
2865 + 'value' => 'on',
2866 + 'operator' => '==',
2867 + ],
2868 + [
2869 + 'item' => 'modules.shopify_checkout.show_step_menu',
2870 + 'value' => 'on',
2871 + 'operator' => '==',
2872 + ],
2873 + ],
2874 + ],
2875 + ],
2876 + ];
2877 + return $fields;
2878 + }
2879 + /**
2880 + * @return array
2881 + */
2882 + public function product_badges_fields() {
2883 + return apply_filters(
2884 + 'rtsb/module/product_badges/fields',
2885 + [
2886 + 'hide_woocommerce_badge' => [
2887 + 'id' => 'hide_woocommerce_badge',
2888 + 'value' => '',
2889 + 'type' => 'switch',
2890 + 'label' => esc_html__( 'Hide Theme Badges', 'shopbuilder' ),
2891 + 'help' => esc_html__( 'Switch on to hide theme default badges.', 'shopbuilder' ),
2892 + 'tab' => 'general',
2893 + ],
2894 + // Hide "On sale".
2895 + 'hide_on_sale' => [
2896 + 'id' => 'hide_on_sale',
2897 + 'type' => 'select',
2898 + 'value' => 'all_products',
2899 + 'isPro' => ! rtsb()->has_pro(),
2900 + 'label' => esc_html__( 'Applicable Products', 'shopbuilder' ),
2901 + 'options' => [
2902 + 'all_products' => esc_html__( 'All products', 'shopbuilder' ),
2903 + 'where_custom_badge_applied' => esc_html__( 'Only for products which have custom badge enabled', 'shopbuilder' ),
2904 + ],
2905 + 'help' => esc_html__( 'Choose where to hide the default badges.', 'shopbuilder' ),
2906 + 'tab' => 'general',
2907 + 'dependency' => [
2908 + 'rules' => [
2909 + [
2910 + 'item' => 'modules.product_badges.hide_woocommerce_badge',
2911 + 'value' => 'on',
2912 + 'operator' => '==',
2913 + ],
2914 + ],
2915 + ],
2916 + ],
2917 +
2918 + 'group_badge_display_as' => [
2919 + 'id' => 'group_badge_display_as',
2920 + 'type' => 'select',
2921 + 'value' => 'horizontal',
2922 + 'isPro' => ! rtsb()->has_pro(),
2923 + 'label' => esc_html__( 'Group Badge Display Type', 'shopbuilder' ),
2924 + 'help' => sprintf(
2925 + // translators: %s for pro message.
2926 + esc_html__( 'Please choose the group display type. %s', 'shopbuilder' ),
2927 + ! rtsb()->has_pro()
2928 + ? sprintf(
2929 + '<a target="_blank" href="' . esc_url( rtsb()->pro_version_link() ) . '">%s </a> %s ',
2930 + esc_html__( 'Upgrade to PRO', 'shopbuilder' ),
2931 + esc_html__( 'for vertical layout.', 'shopbuilder' )
2932 + )
2933 + : ''
2934 + ),
2935 + 'options' => [
2936 + 'horizontal' => esc_html__( 'Horizontal', 'shopbuilder' ),
2937 + 'vertical' => esc_html__( 'Vertical', 'shopbuilder' ),
2938 + ],
2939 + 'tab' => 'group',
2940 + ],
2941 + 'group_badge_gap' => [
2942 + 'id' => 'group_badge_gap',
2943 + 'type' => 'text',
2944 + 'value' => '10px',
2945 + 'label' => esc_html__( 'Group Badge Gap/Spacing', 'shopbuilder' ),
2946 + 'help' => esc_html__( 'Example: 10px', 'shopbuilder' ),
2947 + 'tab' => 'group',
2948 + ],
2949 + 'general_options' => [
2950 + 'id' => 'general_options',
2951 + 'type' => 'title',
2952 + 'label' => esc_html__( 'Shop Page Settings', 'shopbuilder' ),
2953 + 'tab' => 'group',
2954 + ],
2955 + 'loop_group_position' => [
2956 + 'id' => 'loop_group_position',
2957 + 'type' => 'select',
2958 + 'value' => 'above_image',
2959 + 'isPro' => ! rtsb()->has_pro(),
2960 + 'label' => esc_html__( 'Shop Page Group Position', 'shopbuilder' ),
2961 + 'help' => esc_html__( 'Choose the group badges position in Shop page.', 'shopbuilder' ),
2962 + 'options' => [
2963 + 'above_image' => esc_html__( 'Floating Above Image', 'shopbuilder' ),
2964 + 'before_product_title' => esc_html__( 'Before Product Title', 'shopbuilder' ),
2965 + 'after_product_title' => esc_html__( 'After Product Title', 'shopbuilder' ),
2966 + 'before_add_to_cart' => esc_html__( 'Before Add To Cart', 'shopbuilder' ),
2967 + 'after_add_to_cart' => esc_html__( 'After Add To Cart', 'shopbuilder' ),
2968 + 'custom' => esc_html__( 'Custom Position', 'shopbuilder' ),
2969 + ],
2970 + 'tab' => 'group',
2971 + ],
2972 + 'loop_custom_hook_name' => [
2973 + 'id' => 'loop_custom_hook_name',
2974 + 'type' => 'text',
2975 + 'label' => esc_html__( 'Enter Hook Name', 'shopbuilder' ),
2976 + 'tab' => 'group',
2977 + 'help' => sprintf(
2978 + /* translators: 1: The shortcode.*/
2979 + __( 'Or Copy the php code <br />%1$s<br /> and paste it in your product query where you want to show the button.', 'shopbuilder' ),
2980 + "<code>&lt;?php do_action( 'rtsb/modules/product_badges/frontend/display' ); ?&gt;</code> OR Use shortcode <code>&lt;?php echo do_shortcode( '[rtsb_badges]' ); ?&gt;</code>"
2981 + ),
2982 + 'dependency' => [
2983 + 'rules' => [
2984 + [
2985 + 'item' => 'modules.product_badges.loop_group_position',
2986 + 'value' => 'custom',
2987 + 'operator' => '==',
2988 + ],
2989 + ],
2990 + ],
2991 + ],
2992 + 'group_position_hook_priority' => [
2993 + 'id' => 'group_position_hook_priority',
2994 + 'type' => 'number',
2995 + 'size' => 'small',
2996 + 'min' => 0,
2997 + 'max' => 999,
2998 + 'label' => esc_html__( 'Badge Position Priority', 'shopbuilder' ),
2999 + 'help' => esc_html__( 'It\'s depend on your theme functionality. Example: 20', 'shopbuilder' ),
3000 + 'tab' => 'group',
3001 + 'dependency' => [
3002 + 'rules' => [
3003 + [
3004 + 'item' => 'modules.product_badges.loop_group_position',
3005 + 'value' => 'custom',
3006 + 'operator' => '==',
3007 + ],
3008 + ],
3009 + ],
3010 + ],
3011 + 'group_badge_position' => [
3012 + 'id' => 'group_badge_position',
3013 + 'label' => esc_html__( 'Position Above Image', 'shopbuilder' ),
3014 + 'type' => 'text_select',
3015 + 'value' => 'top-left',
3016 + 'options' => [
3017 + 'top-left' => esc_html__( 'Top Left', 'shopbuilder' ),
3018 + 'top-right' => esc_html__( 'Top Right', 'shopbuilder' ),
3019 + 'bottom-left' => esc_html__( 'Bottom Left', 'shopbuilder' ),
3020 + 'bottom-right' => esc_html__( 'Bottom Right', 'shopbuilder' ),
3021 + ],
3022 + 'dependency' => [
3023 + 'rules' => [
3024 + [
3025 + 'item' => 'modules.product_badges.loop_group_position',
3026 + 'value' => 'above_image',
3027 + 'operator' => '==',
3028 + ],
3029 + ],
3030 + ],
3031 + 'tab' => 'group',
3032 + ],
3033 + 'product_options' => [
3034 + 'id' => 'product_options',
3035 + 'type' => 'title',
3036 + 'label' => esc_html__( 'Product Page Settings', 'shopbuilder' ),
3037 + 'tab' => 'group',
3038 + ],
3039 + 'product_page_group_position' => [
3040 + 'id' => 'product_page_group_position',
3041 + 'type' => 'select',
3042 + 'value' => 'above_image',
3043 + 'isPro' => ! rtsb()->has_pro(),
3044 + 'label' => esc_html__( 'Product Page Group Position', 'shopbuilder' ),
3045 + 'help' => esc_html__( 'Choose the group badges position in product page.', 'shopbuilder' ),
3046 + 'options' => [
3047 + 'above_image' => esc_html__( 'Floating Above Image', 'shopbuilder' ),
3048 + 'before_add_to_cart' => esc_html__( 'Before Add To Cart', 'shopbuilder' ),
3049 + 'after_add_to_cart' => esc_html__( 'After Add To Cart', 'shopbuilder' ),
3050 + 'after_summary' => esc_html__( 'After Summary', 'shopbuilder' ),
3051 + 'after_short_desc' => esc_html__( 'After Short Description', 'shopbuilder' ),
3052 + 'shortcode' => esc_html__( 'Use Shortcode', 'shopbuilder' ),
3053 + 'custom' => esc_html__( 'Custom Position', 'shopbuilder' ),
3054 + ],
3055 + 'tab' => 'group',
3056 + ],
3057 + 'product_page_badges_shortcode' => [
3058 + 'type' => 'raw',
3059 + 'label' => ' ',
3060 + 'html' => sprintf(
3061 + /* translators: 1: The shortcode.*/
3062 + esc_html__( 'Choose where to show button on the product page. Copy this shortcode %1$s and paste it where you want to show the button.', 'shopbuilder' ),
3063 + '<code>[rtsb_badges]</code>'
3064 + ),
3065 + 'dependency' => [
3066 + 'rules' => [
3067 + [
3068 + 'item' => 'modules.product_badges.product_page_group_position',
3069 + 'value' => 'shortcode',
3070 + 'operator' => '==',
3071 + ],
3072 + ],
3073 + ],
3074 + 'tab' => 'group',
3075 + ],
3076 + 'product_page_custom_hook_name' => [
3077 + 'id' => 'product_page_custom_hook_name',
3078 + 'type' => 'text',
3079 + 'label' => esc_html__( 'Enter Hook Name', 'shopbuilder' ),
3080 + 'tab' => 'group',
3081 + 'help' => sprintf(
3082 + /* translators: 1: The shortcode.*/
3083 + __( 'Or Copy the php code <br />%1$s<br /> and paste it in your product query where you want to show the button.', 'shopbuilder' ),
3084 + "<code>&lt;?php do_action( 'rtsb/modules/product_badges/frontend/display' ); ?&gt;</code>"
3085 + ),
3086 + 'dependency' => [
3087 + 'rules' => [
3088 + [
3089 + 'item' => 'modules.product_badges.product_page_group_position',
3090 + 'value' => 'custom',
3091 + 'operator' => '==',
3092 + ],
3093 + ],
3094 + ],
3095 + ],
3096 + 'product_page_group_hook_priority' => [
3097 + 'id' => 'product_page_group_hook_priority',
3098 + 'type' => 'number',
3099 + 'size' => 'small',
3100 + 'min' => 0,
3101 + 'max' => 999,
3102 + 'label' => esc_html__( 'Badge Position Priority', 'shopbuilder' ),
3103 + 'help' => esc_html__( 'It\'s depend on your theme functionality. Example: 20', 'shopbuilder' ),
3104 + 'tab' => 'group',
3105 + 'dependency' => [
3106 + 'rules' => [
3107 + [
3108 + 'item' => 'modules.product_badges.product_page_group_position',
3109 + 'value' => 'custom',
3110 + 'operator' => '==',
3111 + ],
3112 + ],
3113 + ],
3114 +
3115 + ],
3116 + 'product_page_group_badge_position' => [
3117 + 'id' => 'product_page_group_badge_position',
3118 + 'label' => esc_html__( 'Position Above Image', 'shopbuilder' ),
3119 + 'type' => 'text_select',
3120 + 'value' => 'top-left',
3121 + 'options' => [
3122 + 'top-left' => esc_html__( 'Top Left', 'shopbuilder' ),
3123 + 'top-right' => esc_html__( 'Top Right', 'shopbuilder' ),
3124 + 'bottom-left' => esc_html__( 'Bottom Left', 'shopbuilder' ),
3125 + 'bottom-right' => esc_html__( 'Bottom Right', 'shopbuilder' ),
3126 + ],
3127 + 'dependency' => [
3128 + 'rules' => [
3129 + [
3130 + 'item' => 'modules.product_badges.product_page_group_position',
3131 + 'value' => 'above_image',
3132 + 'operator' => '==',
3133 + ],
3134 + ],
3135 + ],
3136 + 'tab' => 'group',
3137 + ],
3138 +
3139 + 'badges_field_intro' => [
3140 + 'id' => 'badges_field_intro',
3141 + 'type' => 'description',
3142 + 'text' => esc_html__( 'To add new product badges, simply click on the \'Add New\' button below.', 'shopbuilder' ),
3143 + 'tab' => 'badges',
3144 + ],
3145 + 'badges_field' => [
3146 + 'id' => 'badges_field',
3147 + 'type' => 'repeaters',
3148 + 'label' => '',
3149 + 'tab' => 'badges',
3150 + 'repeat' => [
3151 +
3152 + 'title' => [
3153 + 'id' => 'title',
3154 + 'label' => esc_html__( 'Badge Name', 'shopbuilder' ),
3155 + 'help' => esc_html__( 'Enter badge name.', 'shopbuilder' ),
3156 + 'type' => 'text',
3157 + 'placeholder' => esc_html__( 'Badge Name', 'shopbuilder' ),
3158 + 'value' => esc_html__( 'Badge Name', 'shopbuilder' ),
3159 + ],
3160 + 'badge_condition' => [
3161 + 'id' => 'badge_condition',
3162 + 'type' => 'select',
3163 + 'value' => 'dynamic',
3164 + 'isPro' => ! rtsb()->has_pro(),
3165 + 'label' => esc_html__( 'Badge Type', 'shopbuilder' ),
3166 + 'help' => sprintf(
3167 + // translators: %s for pro message.
3168 + esc_html__( 'Select badge type. %s', 'shopbuilder' ),
3169 + ! rtsb()->has_pro()
3170 + ? sprintf(
3171 + '<a target="_blank" href="' . esc_url( rtsb()->pro_version_link() ) . '">%s</a> %s',
3172 + esc_html__( 'Upgrade to PRO', 'shopbuilder' ),
3173 + esc_html__( 'unlock custom badge creation.', 'shopbuilder' )
3174 + )
3175 + : ''
3176 + ),
3177 + 'options' => [
3178 + 'dynamic' => esc_html__( 'Dynamic', 'shopbuilder' ),
3179 + 'custom' => esc_html__( 'Custom', 'shopbuilder' ),
3180 + ],
3181 + ],
3182 + 'badge_for' => [
3183 + 'id' => 'badge_for',
3184 + 'type' => 'select',
3185 + 'value' => 'on_sale',
3186 + 'label' => esc_html__( 'Dynamic Badge Condition', 'shopbuilder' ),
3187 + 'help' => esc_html__( 'Specify dynamic badge condition', 'shopbuilder' ),
3188 + 'options' => $this->dynamic_badge_list(),
3189 + 'dependency' => [
3190 + 'rules' => [
3191 + [
3192 + 'item' => 'modules.product_badges.badges_field.badge_condition',
3193 + 'value' => 'dynamic',
3194 + 'operator' => '==',
3195 + ],
3196 + ],
3197 + ],
3198 + ],
3199 + 'badge_for_pre_order' => [
3200 + 'type' => 'raw',
3201 + 'label' => ' ',
3202 + 'html' => esc_html__( 'Please ensure that Pre-Order module is activated and properly configured.', 'shopbuilder' ),
3203 + 'tab' => 'general',
3204 + 'dependency' => [
3205 + 'rules' => [
3206 + [
3207 + 'item' => 'modules.product_badges.badges_field.badge_condition',
3208 + 'value' => 'dynamic',
3209 + 'operator' => '==',
3210 + ],
3211 + [
3212 + 'item' => 'modules.product_badges.badges_field.badge_for',
3213 + 'value' => 'pre_order',
3214 + 'operator' => '==',
3215 + ],
3216 + ],
3217 + ],
3218 + ],
3219 + 'minimum_sale_count' => [
3220 + 'id' => 'minimum_sale_count',
3221 + 'type' => 'number',
3222 + 'label' => esc_html__( 'Minimum Sale Count', 'shopbuilder' ),
3223 + 'help' => esc_html__( 'Enter the number of Sale you want to designate for products to be labeled as \'Best Selling.\'', 'shopbuilder' ),
3224 + 'dependency' => [
3225 + 'rules' => [
3226 + [
3227 + 'item' => 'modules.product_badges.badges_field.badge_condition',
3228 + 'value' => 'dynamic',
3229 + 'operator' => '==',
3230 + ],
3231 + [
3232 + 'item' => 'modules.product_badges.badges_field.badge_for',
3233 + 'value' => 'best_selling',
3234 + 'operator' => '==',
3235 + ],
3236 + ],
3237 + ],
3238 + ],
3239 + 'new_arrival_days' => [
3240 + 'id' => 'new_arrival_days',
3241 + 'type' => 'number',
3242 + 'label' => esc_html__( 'Specify Number of Days', 'shopbuilder' ),
3243 + 'help' => esc_html__( 'Enter the number of days you want to designate for products to be labeled as \'New Arrivals.\'', 'shopbuilder' ),
3244 + 'dependency' => [
3245 + 'rules' => [
3246 + [
3247 + 'item' => 'modules.product_badges.badges_field.badge_for',
3248 + 'value' => 'new_arrival',
3249 + 'operator' => '==',
3250 + ],
3251 + ],
3252 + ],
3253 + ],
3254 + 'badges_type' => [
3255 + 'id' => 'badges_type',
3256 + 'type' => 'select',
3257 + 'value' => 'text',
3258 + 'isPro' => ! rtsb()->has_pro(),
3259 + 'label' => esc_html__( 'Show Badge As:', 'shopbuilder' ),
3260 + 'help' => sprintf(
3261 + // translators: %s for pro message.
3262 + esc_html__( 'Specify the badge display as Image Or Text. %s', 'shopbuilder' ),
3263 + ! rtsb()->has_pro()
3264 + ? sprintf(
3265 + '<a target="_blank" href="' . esc_url( rtsb()->pro_version_link() ) . '">%s</a> %s',
3266 + esc_html__( 'Upgrade to PRO', 'shopbuilder' ),
3267 + esc_html__( 'unlock Image badge creation.', 'shopbuilder' )
3268 + )
3269 + : ''
3270 + ),
3271 + 'options' => [
3272 + 'image' => esc_html__( 'Image', 'shopbuilder' ),
3273 + 'text' => esc_html__( 'Text', 'shopbuilder' ),
3274 + ],
3275 + ],
3276 +
3277 + 'badge_preset' => [
3278 + 'id' => 'badge_preset',
3279 + 'label' => esc_html__( 'Text Badge Preset', 'shopbuilder' ),
3280 + 'help' => esc_html__( 'Choose the badge appearance', 'shopbuilder' ),
3281 + 'type' => 'image_select',
3282 + 'value' => 'preset1',
3283 + 'options' => [
3284 + 'preset1' => [
3285 + 'label' => esc_html__( 'Preset 1', 'shopbuilder' ),
3286 + 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/badge-preset-1.png' ) ),
3287 + ],
3288 +
3289 + 'preset2' => [
3290 + 'label' => esc_html__( 'Preset 2', 'shopbuilder' ),
3291 + 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/badge-preset-2.png' ) ),
3292 + ],
3293 +
3294 + 'preset3' => [
3295 + 'label' => esc_html__( 'Preset 3', 'shopbuilder' ),
3296 + 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/badge-preset-3.png' ) ),
3297 + ],
3298 +
3299 + 'preset4' => [
3300 + 'title' => esc_html__( 'Preset 4', 'shopbuilder' ),
3301 + 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/badge-preset-4.png' ) ),
3302 + ],
3303 + ],
3304 + 'dependency' => [
3305 + 'rules' => [
3306 + [
3307 + 'item' => 'modules.product_badges.badges_field.badges_type',
3308 + 'value' => 'text',
3309 + 'operator' => '==',
3310 + ],
3311 + ],
3312 + ],
3313 + ],
3314 + 'badges_text' => [
3315 + 'id' => 'badges_text',
3316 + 'label' => esc_html__( 'Enter Badge Text', 'shopbuilder' ),
3317 + 'help' => esc_html__( 'The badge text will be displayed when the dynamic percentage switch is turned off.', 'shopbuilder' ),
3318 + 'type' => 'text',
3319 + 'placeholder' => 'Badge Text',
3320 + 'value' => esc_html__( 'New', 'shopbuilder' ),
3321 + 'dependency' => [
3322 + 'rules' => [
3323 + [
3324 + 'item' => 'modules.product_badges.badges_field.badges_type',
3325 + 'value' => 'text',
3326 + 'operator' => '==',
3327 + ],
3328 + ],
3329 + ],
3330 + ],
3331 + 'show_badges_percent_text' => [
3332 + 'id' => 'show_badges_percent_text',
3333 + 'type' => 'switch',
3334 + 'label' => esc_html__( 'Show Badges Percentage (%)', 'shopbuilder' ),
3335 + 'help' => esc_html__( 'Switch on to show badge as dynamic percentage instead of text.', 'shopbuilder' ),
3336 + 'dependency' => [
3337 + 'rules' => [
3338 + [
3339 + 'item' => 'modules.product_badges.badges_field.badge_for',
3340 + 'value' => 'on_sale',
3341 + 'operator' => '==',
3342 + ],
3343 + [
3344 + 'item' => 'modules.product_badges.badges_field.badges_type',
3345 + 'value' => 'text',
3346 + 'operator' => '==',
3347 + ],
3348 + [
3349 + 'item' => 'modules.product_badges.badges_field.badge_condition',
3350 + 'value' => 'dynamic',
3351 + 'operator' => '==',
3352 + ],
3353 +
3354 + ],
3355 + ],
3356 + ],
3357 +
3358 + 'upload_image' => [
3359 + 'id' => 'upload_image',
3360 + 'type' => 'fileupload',
3361 + 'label' => esc_html__( 'Upload Image', 'shopbuilder' ),
3362 + 'help' => esc_html__( 'Upload badge image.', 'shopbuilder' ),
3363 + 'tab' => 'general',
3364 + 'dependency' => [
3365 + 'rules' => [
3366 + [
3367 + 'item' => 'modules.product_badges.badges_field.badges_type',
3368 + 'value' => 'image',
3369 + 'operator' => '==',
3370 + ],
3371 + ],
3372 + ],
3373 + ],
3374 +
3375 + 'apply_for' => [
3376 + 'id' => 'apply_for',
3377 + 'type' => 'select',
3378 + 'value' => 'product',
3379 + 'isPro' => ! rtsb()->has_pro(),
3380 + 'label' => esc_html__( 'Applicable For', 'shopbuilder' ),
3381 + 'options' => [
3382 + 'product' => esc_html__( 'Products', 'shopbuilder' ),
3383 + 'product_cat' => esc_html__( 'Product Categories', 'shopbuilder' ),
3384 + ],
3385 + 'help' => esc_html__( 'Badges will apply for selected products, or categories.', 'shopbuilder' ),
3386 + ],
3387 + 'applicable_products' => [
3388 + 'id' => 'applicable_products',
3389 + 'type' => 'search_and_multi_select',
3390 + 'label' => esc_html__( 'Applicable Products', 'shopbuilder' ),
3391 + 'help' => esc_html__( 'Choose products to include. Leave blank to apply in all product.', 'shopbuilder' ),
3392 + 'placeholder' => esc_html__( 'Search Products', 'shopbuilder' ),
3393 + 'func_with_param' => [ Fns::class, 'get_post_types', [ 'post_type' => 'product' ] ],
3394 + 'options' => Fns::get_post_types( null, [ 'post_type' => 'product' ] ),
3395 + 'dependency' => [
3396 + 'rules' => [
3397 + [
3398 + 'item' => 'modules.product_badges.badges_field.apply_for',
3399 + 'value' => 'product',
3400 + 'operator' => '==',
3401 + ],
3402 + ],
3403 + ],
3404 + ],
3405 + 'applicable_categories' => [
3406 + 'id' => 'applicable_categories',
3407 + 'type' => 'search_and_multi_select',
3408 + 'label' => esc_html__( 'Applicable Categories', 'shopbuilder' ),
3409 + 'help' => esc_html__( 'Choose categories to include. Leave blank to apply in all categories.', 'shopbuilder' ),
3410 + 'placeholder' => esc_html__( 'Search Category', 'shopbuilder' ),
3411 + 'func_with_param' => [
3412 + Fns::class,
3413 + 'products_category_query',
3414 + ],
3415 + 'options' => Fns::products_category_query(),
3416 + 'dependency' => [
3417 + 'rules' => [
3418 + [
3419 + 'item' => 'modules.product_badges.badges_field.apply_for',
3420 + 'value' => 'product_cat',
3421 + 'operator' => '==',
3422 + ],
3423 + ],
3424 + ],
3425 + ],
3426 + 'exclude_product' => [
3427 + 'id' => 'exclude_product',
3428 + 'type' => 'search_and_multi_select',
3429 + 'isPro' => ! rtsb()->has_pro(),
3430 + 'label' => esc_html__( 'Exclude Products', 'shopbuilder' ),
3431 + 'help' => esc_html__( 'Choose products to exclude. Leave blank to exclude none.', 'shopbuilder' ),
3432 + 'placeholder' => esc_html__( 'Search Products', 'shopbuilder' ),
3433 + 'func_with_param' => [ Fns::class, 'get_post_types', [ 'post_type' => 'product' ] ],
3434 + 'options' => Fns::get_post_types( null, [ 'post_type' => 'product' ] ),
3435 + ],
3436 +
3437 + /**
3438 + * Style Settings
3439 + */
3440 + 'styles_settings' => [
3441 + 'id' => 'styles_settings',
3442 + 'type' => 'title',
3443 + 'label' => esc_html__( 'Style Settings', 'shopbuilder' ),
3444 + ],
3445 + 'badge_text_color' => [
3446 + 'id' => 'badge_text_color',
3447 + 'label' => esc_html__( 'Text Color', 'shopbuilder' ),
3448 + 'type' => 'color',
3449 + 'dependency' => [
3450 + 'rules' => [
3451 + [
3452 + 'item' => 'modules.product_badges.badges_field.badges_type',
3453 + 'value' => 'text',
3454 + 'operator' => '==',
3455 + ],
3456 + ],
3457 + ],
3458 + ],
3459 + 'badge_bg_color' => [
3460 + 'id' => 'badge_bg_color',
3461 + 'label' => esc_html__( 'Background Color', 'shopbuilder' ),
3462 + 'type' => 'color',
3463 + 'dependency' => [
3464 + 'rules' => [
3465 + [
3466 + 'item' => 'modules.product_badges.badges_field.badges_type',
3467 + 'value' => 'text',
3468 + 'operator' => '==',
3469 + ],
3470 + [
3471 + 'item' => 'modules.product_badges.badges_field.badges_type',
3472 + 'value' => 'text',
3473 + 'operator' => '==',
3474 + ],
3475 + [
3476 + 'item' => 'modules.product_badges.badges_field.badge_preset',
3477 + 'value' => [ 'preset1', 'preset2' ],
3478 + 'operator' => 'in',
3479 + ],
3480 + ],
3481 + ],
3482 + ],
3483 + 'badge_border_color' => [
3484 + 'id' => 'badge_border_color',
3485 + 'label' => esc_html__( 'Border Color', 'shopbuilder' ),
3486 + 'type' => 'color',
3487 + 'dependency' => [
3488 + 'rules' => [
3489 + [
3490 + 'item' => 'modules.product_badges.badges_field.badges_type',
3491 + 'value' => 'text',
3492 + 'operator' => '==',
3493 + ],
3494 + [
3495 + 'item' => 'modules.product_badges.badges_field.badges_type',
3496 + 'value' => 'text',
3497 + 'operator' => '==',
3498 + ],
3499 + [
3500 + 'item' => 'modules.product_badges.badges_field.badge_preset',
3501 + 'value' => [ 'preset3', 'preset4' ],
3502 + 'operator' => 'in',
3503 + ],
3504 + ],
3505 + ],
3506 + ],
3507 + 'badge_font_size' => [
3508 + 'id' => 'badge_font_size',
3509 + 'type' => 'text',
3510 + 'label' => esc_html__( 'Font Size', 'shopbuilder' ),
3511 + 'help' => esc_html__( 'Example: 14px', 'shopbuilder' ),
3512 + 'dependency' => [
3513 + 'rules' => [
3514 + [
3515 + 'item' => 'modules.product_badges.badges_field.badges_type',
3516 + 'value' => 'text',
3517 + 'operator' => '==',
3518 + ],
3519 + ],
3520 + ],
3521 + ],
3522 + 'badge_font_width' => [
3523 + 'id' => 'badge_font_width',
3524 + 'type' => 'select',
3525 + 'value' => '400',
3526 + 'label' => esc_html__( 'Font Weight', 'shopbuilder' ),
3527 + 'options' => [
3528 + '100' => '100',
3529 + '200' => '200',
3530 + '300' => '300',
3531 + '400' => '400',
3532 + '500' => '500',
3533 + '600' => '600',
3534 + '700' => '700',
3535 + '800' => '800',
3536 + '900' => '900',
3537 + 'normal' => 'normal',
3538 + 'bold' => 'bold',
3539 + 'bolder' => 'bolder',
3540 + 'lighter' => 'lighter',
3541 + 'initial' => 'initial',
3542 + 'inherit' => 'inherit',
3543 + ],
3544 + 'dependency' => [
3545 + 'rules' => [
3546 + [
3547 + 'item' => 'modules.product_badges.badges_field.badges_type',
3548 + 'value' => 'text',
3549 + 'operator' => '==',
3550 + ],
3551 + ],
3552 + ],
3553 + ],
3554 + 'badge_width' => [
3555 + 'id' => 'badge_width',
3556 + 'type' => 'text',
3557 + 'label' => esc_html__( 'Width', 'shopbuilder' ),
3558 + 'help' => esc_html__( 'Example: 150px', 'shopbuilder' ),
3559 + 'dependency' => [
3560 + 'rules' => [
3561 + [
3562 + 'item' => 'modules.product_badges.badges_field.badges_type',
3563 + 'value' => 'image',
3564 + 'operator' => '==',
3565 + ],
3566 + ],
3567 + ],
3568 + ],
3569 + 'badge_height' => [
3570 + 'id' => 'badge_height',
3571 + 'type' => 'text',
3572 + 'label' => esc_html__( 'Height', 'shopbuilder' ),
3573 + 'help' => esc_html__( 'Example: 50px', 'shopbuilder' ),
3574 + 'dependency' => [
3575 + 'rules' => [
3576 + [
3577 + 'item' => 'modules.product_badges.badges_field.badges_type',
3578 + 'value' => 'image',
3579 + 'operator' => '==',
3580 + ],
3581 + ],
3582 + ],
3583 + ],
3584 + 'border_radius' => [
3585 + 'id' => 'border_radius',
3586 + 'type' => 'text',
3587 + 'size' => 'small',
3588 + 'label' => esc_html__( 'Border Radius', 'shopbuilder' ),
3589 + 'help' => esc_html__( 'Example: 20px 20px 20px 20px Or 20px', 'shopbuilder' ),
3590 + 'dependency' => [
3591 + 'rules' => [
3592 + [
3593 + 'item' => 'modules.product_badges.badges_field.badges_type',
3594 + 'value' => 'text',
3595 + 'operator' => '==',
3596 + ],
3597 + ],
3598 + ],
3599 + ],
3600 + 'badge_padding' => [
3601 + 'id' => 'badge_padding',
3602 + 'type' => 'text',
3603 + 'size' => 'small',
3604 + 'label' => esc_html__( 'Padding', 'shopbuilder' ),
3605 + 'help' => esc_html__( 'Example: 10px 15px 10px 15px', 'shopbuilder' ),
3606 + 'dependency' => [
3607 + 'rules' => [
3608 + [
3609 + 'item' => 'modules.product_badges.badges_field.badges_type',
3610 + 'value' => 'text',
3611 + 'operator' => '==',
3612 + ],
3613 + ],
3614 + ],
3615 + ],
3616 + ],
3617 + ],
3618 +
3619 + ]
3620 + );
3621 + }
3622 +
3623 + /**
3624 + * Dynamic badge list.
3625 + *
3626 + * @return array
3627 + */
3628 + public function dynamic_badge_list() {
3629 + $items = [
3630 + 'on_sale' => esc_html__( 'Products On Sale', 'shopbuilder' ),
3631 + 'featured' => esc_html__( 'Featured Products', 'shopbuilder' ),
3632 + 'out_of_stock' => esc_html__( 'Out Of Stock Products', 'shopbuilder' ),
3633 + 'best_selling' => esc_html__( 'Best Selling Products', 'shopbuilder' ),
3634 + 'new_arrival' => esc_html__( 'New Arrival Products', 'shopbuilder' ),
3635 + ];
3636 +
3637 + if ( rtsb()->has_pro() && method_exists( FnsPro::class, 'is_module_active' ) && FnsPro::is_module_active( 'pre_order' ) ) {
3638 + $items['pre_order'] = esc_html__( 'Pre-Order Products', 'shopbuilder' );
3639 + }
3640 +
3641 + return $items;
3642 + }
3643 + /**
3644 + * @return array
3645 + */
3646 + public function get_variation_swatches_fields() {
3647 + return apply_filters(
3648 + 'rtsb/module/variation_swatches/fields',
3649 + [
3650 + 'show_tooltip' => [
3651 + 'id' => 'show_tooltip',
3652 + 'value' => 'on',
3653 + 'type' => 'switch',
3654 + 'label' => esc_html__( 'Enable Tooltip', 'shopbuilder' ),
3655 + 'help' => esc_html__( 'Enable / Disable plugin default tooltip on each product attribute.', 'shopbuilder' ),
3656 + 'tab' => 'general',
3657 + ],
3658 + 'shape_style' => [
3659 + 'id' => 'shape_style',
3660 + 'label' => esc_html__( 'Default Shape Style', 'shopbuilder' ),
3661 + 'help' => esc_html__( 'Attribute Shape Style. Note: This option will not be applied to radio and button attributes.', 'shopbuilder' ),
3662 + 'type' => 'image_select',
3663 + 'value' => 'rounded',
3664 + 'options' => [
3665 + 'rounded' => [
3666 + 'label' => esc_html__( 'Rounded Shape', 'shopbuilder' ),
3667 + 'url' => esc_url( rtsb()->get_assets_uri( 'images/variation-swatch/rounded-shape.svg' ) ),
3668 + ],
3669 + 'squared' => [
3670 + 'label' => esc_html__( 'Squared Shape', 'shopbuilder' ),
3671 + 'url' => esc_url( rtsb()->get_assets_uri( 'images/variation-swatch/squared-shape.svg' ) ),
3672 + ],
3673 + ],
3674 + 'tab' => 'general',
3675 + ],
3676 + 'shape_style_checkmark' => [
3677 + 'id' => 'shape_style_checkmark',
3678 + 'type' => 'switch',
3679 + 'isPro' => ! rtsb()->has_pro(),
3680 + 'default' => false,
3681 + 'label' => esc_html__( 'Checkmark Selected Term ', 'shopbuilder' ),
3682 + 'help' => esc_html__( 'Shape style will add checkmark icon. Note: This option will not be applied to radio attributes.', 'shopbuilder' ),
3683 + 'tab' => 'general',
3684 + ],
3685 + 'default_dropdown_convert' => [
3686 + 'id' => 'default_dropdown_convert',
3687 + 'label' => esc_html__( 'Default Dropdown Convert', 'shopbuilder' ),
3688 + 'help' => esc_html__( 'Dropdown Convert To Button Or Image', 'shopbuilder' ),
3689 + 'isPro' => ! rtsb()->has_pro(),
3690 + 'type' => 'select',
3691 + 'value' => 'button',
3692 + 'options' => [
3693 + 'select' => esc_html__( 'Select ( Default, Not Convert )', 'shopbuilder' ),
3694 + 'button' => esc_html__( 'Button', 'shopbuilder' ),
3695 + 'image' => esc_html__( 'Image', 'shopbuilder' ),
3696 + ],
3697 + 'tab' => 'general',
3698 + ],
3699 + 'show_term_name_beside_label' => [
3700 + 'id' => 'show_term_name_beside_label',
3701 + 'type' => 'switch',
3702 + 'isPro' => ! rtsb()->has_pro(),
3703 + 'default' => false,
3704 + 'label' => esc_html__( 'Show Term Name', 'shopbuilder' ),
3705 + 'help' => esc_html__( 'Selected term name will show beside attribute label.', 'shopbuilder' ),
3706 + 'tab' => 'general',
3707 + ],
3708 + 'disabled_attribute_behavior' => [
3709 + 'id' => 'disabled_attribute_behavior',
3710 + 'label' => esc_html__( 'Disabled Attribute behavior', 'shopbuilder' ),
3711 + 'help' => esc_html__( 'Disabled attribute will be hide / blur.', 'shopbuilder' ) . ' <span>' . __( ' Note: This feature will be operational for variation quantities below the "Ajax variation threshold.', 'shopbuilder' ) . '</span>',
3712 + 'type' => 'select',
3713 + 'value' => 'blur-cross',
3714 + 'options' => [
3715 + 'blur-cross' => esc_html__( 'Blur And Cross', 'shopbuilder' ),
3716 + 'blur-no-cross' => esc_html__( 'Only Blur', 'shopbuilder' ),
3717 + 'hide' => esc_html__( 'Hide', 'shopbuilder' ),
3718 + ],
3719 + 'tab' => 'general',
3720 + ],
3721 + 'attr_display_limit' => [
3722 + 'id' => 'attr_display_limit',
3723 + 'type' => 'number',
3724 + 'isPro' => ! rtsb()->has_pro(),
3725 + 'value' => 0,
3726 + 'size' => 'small',
3727 + 'min' => 0,
3728 + 'max' => 999,
3729 + 'label' => esc_html__( 'Product Page Attribute display limit', 'shopbuilder' ),
3730 + 'help' => esc_html__( 'Catalog mode attribute display limit. Default is 0. Means no limit.', 'shopbuilder' ),
3731 + 'tab' => 'general',
3732 + ],
3733 + 'attribute_image_size' => [
3734 + 'id' => 'attribute_image_size',
3735 + 'label' => esc_html__( 'Attribute image size', 'shopbuilder' ),
3736 + 'help' => __( 'Choose attribute image size.', 'shopbuilder' ) . '<a target="_blank" href="' . esc_url( admin_url( 'options-media.php' ) ) . '"> ' . __( 'Media Settings', 'shopbuilder' ) . '</a>',
3737 + 'type' => 'select',
3738 + 'value' => 'thumbnail',
3739 + 'options' => Fns::get_image_sizes(),
3740 + 'tab' => 'general',
3741 + ],
3742 +
3743 + 'tooltip_title' => [
3744 + 'id' => 'tooltip_title',
3745 + 'type' => 'title',
3746 + 'label' => esc_html__( 'Tooltip Options', 'shopbuilder' ),
3747 + 'help' => esc_html__( 'Tooltip settings for single page and catalog mode on shop / archive pages', 'shopbuilder' ),
3748 + 'tab' => 'general',
3749 + 'dependency' => [
3750 + 'rules' => [
3751 + [
3752 + 'item' => 'modules.variation_swatches.show_tooltip',
3753 + 'value' => 'on',
3754 + 'operator' => '==',
3755 + ],
3756 + ],
3757 + ],
3758 + ],
3759 + 'tooltip_image_size' => [
3760 + 'id' => 'tooltip_image_size',
3761 + 'label' => esc_html__( 'Tooltip image size', 'shopbuilder' ),
3762 + 'help' => __( 'Choose Tooltip image size.', 'shopbuilder' ) . '<a target="_blank" href="' . esc_url( admin_url( 'options-media.php' ) ) . '"> ' . __( 'Media Settings', 'shopbuilder' ) . '</a>',
3763 + 'type' => 'select',
3764 + 'isPro' => ! rtsb()->has_pro(),
3765 + 'value' => 'thumbnail',
3766 + 'options' => Fns::get_image_sizes(),
3767 + 'tab' => 'general',
3768 + 'dependency' => [
3769 + 'rules' => [
3770 + [
3771 + 'item' => 'modules.variation_swatches.show_tooltip',
3772 + 'value' => 'on',
3773 + 'operator' => '==',
3774 + ],
3775 + ],
3776 + ],
3777 + ],
3778 + 'advanced_title' => [
3779 + 'id' => 'advanced_title',
3780 + 'type' => 'title',
3781 + 'label' => esc_html__( 'Advanced', 'shopbuilder' ),
3782 + 'tab' => 'general',
3783 + ],
3784 + 'disable_out_of_stock' => [
3785 + 'id' => 'disable_out_of_stock',
3786 + 'type' => 'switch',
3787 + 'default' => true,
3788 + 'label' => esc_html__( 'Disable Out of Stock', 'shopbuilder' ),
3789 + 'help' => __( 'Disable out of stock variation attribute items.', 'shopbuilder' ),
3790 + 'tab' => 'general',
3791 + ],
3792 +
3793 + 'enable_variation_url' => [
3794 + 'id' => 'enable_variation_url',
3795 + 'type' => 'switch',
3796 + 'default' => false,
3797 + 'isPro' => ! rtsb()->has_pro(),
3798 + 'label' => esc_html__( 'Variation URL', 'shopbuilder' ),
3799 + 'help' => esc_html__( 'Generate a URL based on the selected variation attributes.', 'shopbuilder' ),
3800 + 'tab' => 'general',
3801 + ],
3802 + 'enable_showcase_swatches' => [
3803 + 'id' => 'enable_showcase_swatches',
3804 + 'type' => 'switch',
3805 + 'default' => false,
3806 + 'isPro' => ! rtsb()->has_pro(),
3807 + 'label' => esc_html__( 'Enable Swatches', 'shopbuilder' ),
3808 + 'help' => esc_html__( 'Show swatches on archive / shop page.', 'shopbuilder' ),
3809 + 'tab' => 'showcase_shop',
3810 + ],
3811 + 'showcase_product_wrapper_selector' => [
3812 + 'id' => 'showcase_product_wrapper_selector',
3813 + 'type' => 'text',
3814 + 'isPro' => ! rtsb()->has_pro(),
3815 + 'label' => esc_html__( 'Product Wrapper Selector', 'shopbuilder' ),
3816 + 'help' => esc_html__( 'Archive product Wrapper Selector (.rtwpvs-product,.tmb-woocommerce)', 'shopbuilder' ),
3817 + 'value' => '.rtsb-vs-product,.product-item',
3818 + 'dependency' => [
3819 + 'rules' => [
3820 + [
3821 + 'item' => 'modules.variation_swatches.enable_showcase_swatches',
3822 + 'value' => 'on',
3823 + 'operator' => '==',
3824 + ],
3825 + ],
3826 + ],
3827 + 'tab' => 'showcase_shop',
3828 + ],
3829 + 'showcase_swatches_image_selector' => [
3830 + 'id' => 'showcase_swatches_image_selector',
3831 + 'type' => 'text',
3832 + 'isPro' => ! rtsb()->has_pro(),
3833 + 'label' => esc_html__( 'Image Selector', 'shopbuilder' ),
3834 + 'help' => esc_html__( 'Archive product image selector to show variation image. You can also use multiple selectors separated by comma (.attachment-woocommerce_thumbnail, .wp-post-image) ', 'shopbuilder' ),
3835 + 'value' => '.wp-post-image, .attachment-woocommerce_thumbnail, .rtsb-product-image',
3836 + 'dependency' => [
3837 + 'rules' => [
3838 + [
3839 + 'item' => 'modules.variation_swatches.enable_showcase_swatches',
3840 + 'value' => 'on',
3841 + 'operator' => '==',
3842 + ],
3843 + ],
3844 + ],
3845 + 'tab' => 'showcase_shop',
3846 + ],
3847 + 'showcase_swatches_position' => [
3848 + 'id' => 'showcase_swatches_position',
3849 + 'label' => esc_html__( 'Swatches Position', 'shopbuilder' ),
3850 + 'help' => esc_html__( 'Display showcase swatches in a specific position.', 'shopbuilder' ) . '<br/>' . __( 'Note: Some themes remove or override default WooCommerce hooks. If the swatches do not appear as expected, you may need to manually set a custom position.', 'shopbuilder' ),
3851 + 'isPro' => ! rtsb()->has_pro(),
3852 + 'type' => 'select',
3853 + 'value' => 'before_add_to_cart',
3854 + 'options' => apply_filters(
3855 + 'rtsb_showcase_swatches_positions',
3856 + [
3857 + 'custom_hook' => esc_html__( 'Custom Hook', 'shopbuilder' ),
3858 + 'before_add_to_cart' => esc_html__( 'Before Add To Cart', 'shopbuilder' ),
3859 + 'after_add_to_cart' => esc_html__( 'After Add To Cart', 'shopbuilder' ),
3860 + ]
3861 + ),
3862 + 'dependency' => [
3863 + 'rules' => [
3864 + [
3865 + 'item' => 'modules.variation_swatches.enable_showcase_swatches',
3866 + 'value' => 'on',
3867 + 'operator' => '==',
3868 + ],
3869 + ],
3870 + ],
3871 + 'tab' => 'showcase_shop',
3872 + ],
3873 + 'custom_hook_name' => [
3874 + 'type' => 'description',
3875 + 'text' => sprintf(
3876 + /* translators: 1: The shortcode.*/
3877 + esc_html__( 'Copy the php code %1$s and paste it in your product query where you want to show the button.', 'shopbuilder' ),
3878 + "<code style='padding: 5px' >&lt;?php do_action( 'rtsb/vs/showcase/variation' ); ?&gt;</code>"
3879 + ),
3880 + 'id' => 'custom_hook_name',
3881 + 'tab' => 'showcase_shop',
3882 + 'dependency' => [
3883 + 'rules' => [
3884 + [
3885 + 'item' => 'modules.variation_swatches.enable_showcase_swatches',
3886 + 'value' => 'on',
3887 + 'operator' => '==',
3888 + ],
3889 + [
3890 + 'item' => 'modules.variation_swatches.showcase_swatches_position',
3891 + 'value' => 'custom_hook',
3892 + 'operator' => '==',
3893 + ],
3894 + ],
3895 + ],
3896 + ],
3897 + 'showcase_swatches_align' => [
3898 + 'id' => 'showcase_swatches_align',
3899 + 'label' => esc_html__( 'Swatches Align', 'shopbuilder' ),
3900 + 'help' => esc_html__( 'Swatches align on archive page.', 'shopbuilder' ),
3901 + 'isPro' => ! rtsb()->has_pro(),
3902 + 'type' => 'select',
3903 + 'value' => 'left',
3904 + 'options' => apply_filters(
3905 + 'rtsb_get_showcase_swatches_aligns',
3906 + [
3907 + 'left' => esc_html__( 'Left', 'shopbuilder' ),
3908 + 'right' => esc_html__( 'Right', 'shopbuilder' ),
3909 + 'center' => esc_html__( 'Center', 'shopbuilder' ),
3910 + ]
3911 + ),
3912 + 'dependency' => [
3913 + 'rules' => [
3914 + [
3915 + 'item' => 'modules.variation_swatches.enable_showcase_swatches',
3916 + 'value' => 'on',
3917 + 'operator' => '==',
3918 + ],
3919 + ],
3920 + ],
3921 + 'tab' => 'showcase_shop',
3922 + ],
3923 +
3924 + 'show_clear_on_showcase' => [
3925 + 'id' => 'show_clear_on_showcase',
3926 + 'isPro' => ! rtsb()->has_pro(),
3927 + 'type' => 'switch',
3928 + 'label' => esc_html__( 'Show clear link', 'shopbuilder' ),
3929 + 'help' => esc_html__( 'Show clear link on archive, shop page, any other showcase.', 'shopbuilder' ),
3930 + 'dependency' => [
3931 + 'rules' => [
3932 + [
3933 + 'item' => 'modules.variation_swatches.enable_showcase_swatches',
3934 + 'value' => 'on',
3935 + 'operator' => '==',
3936 + ],
3937 + ],
3938 + ],
3939 + 'tab' => 'showcase_shop',
3940 + ],
3941 + 'showcase_special_attribute_title' => [
3942 + 'id' => 'showcase_special_attribute_title',
3943 + 'type' => 'title',
3944 + 'label' => esc_html__( 'Special Attribute', 'shopbuilder' ),
3945 + 'tab' => 'showcase_shop',
3946 + ],
3947 + 'showcase_single_attribute' => [
3948 + 'id' => 'showcase_single_attribute',
3949 + 'isPro' => ! rtsb()->has_pro(),
3950 + 'type' => 'switch',
3951 + 'label' => esc_html__( 'Show Single Attribute', 'shopbuilder' ),
3952 + 'help' => esc_html__( 'Show single attribute taxonomies on archive page.', 'shopbuilder' ),
3953 + 'tab' => 'showcase_shop',
3954 + ],
3955 + 'chose_showcase_single_attribute' => [
3956 + 'id' => 'chose_showcase_single_attribute',
3957 + 'label' => esc_html__( 'Chose Attribute', 'shopbuilder' ),
3958 + 'help' => esc_html__( 'Choose an attribute to show on catalog mode', 'shopbuilder' ),
3959 + 'isPro' => ! rtsb()->has_pro(),
3960 + 'type' => 'select',
3961 + 'options' => SwatchesFns::get_wc_attributes( esc_html__( ' - Choose Attribute - ', 'shopbuilder' ) ),
3962 + 'dependency' => [
3963 + 'rules' => [
3964 + [
3965 + 'item' => 'modules.variation_swatches.showcase_single_attribute',
3966 + 'value' => 'on',
3967 + 'operator' => '==',
3968 + ],
3969 + ],
3970 + ],
3971 + 'tab' => 'showcase_shop',
3972 + ],
3973 +
3974 + 'showcase_swatches_display_event' => [
3975 + 'id' => 'showcase_swatches_display_event',
3976 + 'label' => esc_html__( 'Catalog Mode Display Event', 'shopbuilder' ),
3977 + 'help' => esc_html__( 'Show catalog mode image display event.', 'shopbuilder' ),
3978 + 'isPro' => ! rtsb()->has_pro(),
3979 + 'type' => 'select',
3980 + 'value' => 'click',
3981 + 'options' => [
3982 + 'click' => esc_html__( 'on Click', 'shopbuilder' ),
3983 + 'hover' => esc_html__( 'on Hover', 'shopbuilder' ),
3984 + ],
3985 + 'dependency' => [
3986 + 'rules' => [
3987 + [
3988 + 'item' => 'modules.variation_swatches.enable_showcase_swatches',
3989 + 'value' => 'on',
3990 + 'operator' => '==',
3991 + ],
3992 + ],
3993 + ],
3994 + 'tab' => 'showcase_shop',
3995 + ],
3996 +
3997 + 'showcase_swatches_display_limit' => [
3998 + 'id' => 'showcase_swatches_display_limit',
3999 + 'type' => 'number',
4000 + 'isPro' => ! rtsb()->has_pro(),
4001 + 'value' => 0,
4002 + 'size' => 'small',
4003 + 'min' => 0,
4004 + 'max' => 999,
4005 + 'label' => esc_html__( 'Attribute display limit', 'shopbuilder' ),
4006 + 'help' => esc_html__( 'Catalog mode attribute display limit. Default is 0. Means no limit.', 'shopbuilder' ),
4007 + 'dependency' => [
4008 + 'rules' => [
4009 + [
4010 + 'item' => 'modules.variation_swatches.enable_showcase_swatches',
4011 + 'value' => 'on',
4012 + 'operator' => '==',
4013 + ],
4014 + ],
4015 + ],
4016 + 'tab' => 'showcase_shop',
4017 + ],
4018 + 'checkmark_size' => [
4019 + 'id' => 'checkmark_size',
4020 + 'type' => 'title',
4021 + 'label' => esc_html__( 'Checkmark', 'shopbuilder' ),
4022 + 'tab' => 'style',
4023 + ],
4024 + 'checkmark_bg_color' => [
4025 + 'id' => 'checkmark_bg_color',
4026 + 'label' => esc_html__( 'Checkmark Background Color', 'shopbuilder' ),
4027 + 'isPro' => ! rtsb()->has_pro(),
4028 + 'type' => 'color',
4029 + 'value' => '#333333',
4030 + 'tab' => 'style',
4031 + ],
4032 + 'checkmark_icon_color' => [
4033 + 'id' => 'checkmark_icon_color',
4034 + 'label' => esc_html__( 'Checkmark Icon Color', 'shopbuilder' ),
4035 + 'isPro' => ! rtsb()->has_pro(),
4036 + 'type' => 'color',
4037 + 'value' => '#ffffff',
4038 + 'tab' => 'style',
4039 + ],
4040 + 'attribute_checkmark_width' => [
4041 + 'id' => 'attribute_checkmark_width',
4042 + 'label' => esc_html__( 'Checkmark Width', 'shopbuilder' ),
4043 + 'isPro' => ! rtsb()->has_pro(),
4044 + 'help' => esc_html__( 'Set the width (in px) for selected attribute checkmark,', 'shopbuilder' ),
4045 + 'type' => 'slider',
4046 + 'min' => 10,
4047 + 'max' => 200,
4048 + 'unit' => 'px',
4049 + 'value' => 15,
4050 + 'tab' => 'style',
4051 + ],
4052 + 'attribute_checkmark_height' => [
4053 + 'id' => 'attribute_checkmark_height',
4054 + 'label' => esc_html__( 'Checkmark Height', 'shopbuilder' ),
4055 + 'isPro' => ! rtsb()->has_pro(),
4056 + 'help' => esc_html__( 'Set the height (in px) for selected attribute checkmark,', 'shopbuilder' ),
4057 + 'type' => 'slider',
4058 + 'min' => 10,
4059 + 'max' => 200,
4060 + 'unit' => 'px',
4061 + 'value' => 15,
4062 + 'tab' => 'style',
4063 + ],
4064 + 'attribute_checkmark_icon_size' => [
4065 + 'id' => 'attribute_checkmark_icon_size',
4066 + 'isPro' => ! rtsb()->has_pro(),
4067 + 'label' => esc_html__( 'Checkmark Icon Size', 'shopbuilder' ),
4068 + 'help' => esc_html__( 'Checkmark Icon Size.', 'shopbuilder' ),
4069 + 'type' => 'slider',
4070 + 'min' => 8,
4071 + 'max' => 30,
4072 + 'unit' => 'px',
4073 + 'value' => 11,
4074 + 'tab' => 'style',
4075 + ],
4076 + 'attribute_style' => [
4077 + 'id' => 'attribute_style',
4078 + 'type' => 'title',
4079 + 'label' => esc_html__( 'Attribute Style', 'shopbuilder' ),
4080 + 'tab' => 'style',
4081 + ],
4082 + 'attribute_border_color' => [
4083 + 'id' => 'attribute_border_color',
4084 + 'label' => esc_html__( 'Attribute Border Color', 'shopbuilder' ),
4085 + 'type' => 'color',
4086 + 'value' => '#D1D5DB',
4087 + 'tab' => 'style',
4088 + ],
4089 + 'attribute_border_color_hover' => [
4090 + 'id' => 'attribute_border_color_hover',
4091 + 'label' => esc_html__( 'Attribute Border Color Hover/Active', 'shopbuilder' ),
4092 + 'type' => 'color',
4093 + 'value' => '#333333',
4094 + 'tab' => 'style',
4095 + ],
4096 + 'details_page_attribute_size' => [
4097 + 'id' => 'details_page_attribute_size',
4098 + 'type' => 'title',
4099 + 'label' => esc_html__( 'Details Page Attributes', 'shopbuilder' ),
4100 + 'tab' => 'style',
4101 + ],
4102 + 'details_page_attr_label_color' => [
4103 + 'id' => 'details_page_attr_label_color',
4104 + 'label' => esc_html__( 'Product Page Attribute Label Color', 'shopbuilder' ),
4105 + 'type' => 'color',
4106 + 'value' => '#333333',
4107 + 'tab' => 'style',
4108 + ],
4109 + 'details_page_attr_label_font_size' => [
4110 + 'id' => 'details_page_attr_label_font_size',
4111 + 'label' => esc_html__( 'Product Page Attribute Label Font Size', 'shopbuilder' ),
4112 + 'type' => 'slider',
4113 + 'min' => 8,
4114 + 'max' => 50,
4115 + 'unit' => 'px',
4116 + 'value' => 16,
4117 + 'tab' => 'style',
4118 + ],
4119 + 'details_page_attribute_width' => [
4120 + 'id' => 'details_page_attribute_width',
4121 + 'label' => esc_html__( 'Variation Item Width', 'shopbuilder' ),
4122 + 'help' => esc_html__( 'Set the width (in px) for each variation attribute option, Note: This option will not be applied to radio and button attributes.', 'shopbuilder' ),
4123 + 'type' => 'slider',
4124 + 'min' => 10,
4125 + 'max' => 150,
4126 + 'unit' => 'px',
4127 + 'value' => 30,
4128 + 'tab' => 'style',
4129 + ],
4130 + 'details_page_attribute_height' => [
4131 + 'id' => 'details_page_attribute_height',
4132 + 'label' => esc_html__( 'Variation Item Height', 'shopbuilder' ),
4133 + 'help' => esc_html__( 'Set the height (in px) for each variation attribute option, Note: This option will not be applied to radio attributes.', 'shopbuilder' ),
4134 + 'type' => 'slider',
4135 + 'min' => 10,
4136 + 'max' => 150,
4137 + 'unit' => 'px',
4138 + 'value' => 30,
4139 + 'tab' => 'style',
4140 + ],
4141 + 'details_page_attribute_font_size' => [
4142 + 'id' => 'details_page_attribute_font_size',
4143 + 'label' => esc_html__( 'Variation Item Font Size', 'shopbuilder' ),
4144 + 'help' => esc_html__( 'Set the font size (in px) for text within variation attribute options, such as labels on buttons.', 'shopbuilder' ),
4145 + 'type' => 'slider',
4146 + 'min' => 8,
4147 + 'max' => 30,
4148 + 'unit' => 'px',
4149 + 'value' => 16,
4150 + 'tab' => 'style',
4151 + ],
4152 + 'showcase_attribute_size' => [
4153 + 'id' => 'showcase_attribute_size',
4154 + 'type' => 'title',
4155 + 'label' => esc_html__( 'Shop Page / Product Showcase Attributes Size', 'shopbuilder' ),
4156 + 'tab' => 'style',
4157 + ],
4158 + 'showcase_attribute_width' => [
4159 + 'id' => 'showcase_attribute_width',
4160 + 'label' => esc_html__( 'Variation Item Width', 'shopbuilder' ),
4161 + 'help' => esc_html__( 'Set the width (in px) for each variation attribute option, Note: This option will not be applied to radio and button attributes.', 'shopbuilder' ),
4162 + 'type' => 'slider',
4163 + 'min' => 10,
4164 + 'max' => 200,
4165 + 'unit' => 'px',
4166 + 'value' => 30,
4167 + 'tab' => 'style',
4168 + ],
4169 + 'showcase_attribute_height' => [
4170 + 'id' => 'showcase_attribute_height',
4171 + 'label' => esc_html__( 'Variation Item Height', 'shopbuilder' ),
4172 + 'help' => esc_html__( 'Set the height (in px) for each variation attribute option, Note: This option will not be applied to radio and button attributes.', 'shopbuilder' ),
4173 + 'type' => 'slider',
4174 + 'min' => 10,
4175 + 'max' => 200,
4176 + 'unit' => 'px',
4177 + 'value' => 30,
4178 + 'tab' => 'style',
4179 + ],
4180 + 'showcase_attribute_font_size' => [
4181 + 'id' => 'showcase_attribute_font_size',
4182 + 'label' => esc_html__( 'Variation Item Font Size', 'shopbuilder' ),
4183 + 'help' => esc_html__( 'Set the font size (in px) for text within variation attribute options, such as labels on buttons.', 'shopbuilder' ),
4184 + 'type' => 'slider',
4185 + 'min' => 8,
4186 + 'max' => 30,
4187 + 'unit' => 'px',
4188 + 'value' => 16,
4189 + 'tab' => 'style',
4190 + ],
4191 + 'tooltip_style' => [
4192 + 'id' => 'tooltip_style',
4193 + 'type' => 'title',
4194 + 'label' => esc_html__( 'Tooltip Style', 'shopbuilder' ),
4195 + 'tab' => 'style',
4196 + ],
4197 + 'tooltip_images_padding' => [
4198 + 'id' => 'tooltip_images_padding',
4199 + 'label' => esc_html__( 'Tooltip Images Padding', 'shopbuilder' ),
4200 + 'type' => 'slider',
4201 + 'min' => 0,
4202 + 'max' => 30,
4203 + 'unit' => 'px',
4204 + 'value' => 3,
4205 + 'tab' => 'style',
4206 + ],
4207 + 'tooltip_bg_color' => [
4208 + 'id' => 'tooltip_bg_color',
4209 + 'label' => esc_html__( 'Tooltip Background Color', 'shopbuilder' ),
4210 + 'type' => 'color',
4211 + 'value' => '#333333',
4212 + 'tab' => 'style',
4213 + ],
4214 + 'tooltip_image_bg_color' => [
4215 + 'id' => 'tooltip_bg_color',
4216 + 'label' => esc_html__( 'Tooltip Image Background Color', 'shopbuilder' ),
4217 + 'type' => 'color',
4218 + 'value' => '#333333',
4219 + 'tab' => 'style',
4220 + ],
4221 + 'tooltip_text_color' => [
4222 + 'id' => 'tooltip_text_color',
4223 + 'label' => esc_html__( 'Tooltip Text Color', 'shopbuilder' ),
4224 + 'type' => 'color',
4225 + 'value' => '#ffffff',
4226 + 'tab' => 'style',
4227 + ],
4228 + ]
4229 + ); // @phpstan-ignore-line
4230 + }
4231 + /**
4232 + * @return array
4233 + */
4234 + public function get_variation_gallery_fields() {
4235 + return apply_filters(
4236 + 'rtsb/module/variation_gallery/fields',
4237 + [
4238 + 'image_zoom' => [
4239 + 'id' => 'image_zoom',
4240 + 'type' => 'switch',
4241 + 'default' => false,
4242 + 'label' => esc_html__( 'Zoom Gallery image', 'shopbuilder' ),
4243 + 'tab' => 'general',
4244 + ],
4245 + 'lightBox' => [
4246 + 'id' => 'lightBox',
4247 + 'type' => 'switch',
4248 + 'default' => false,
4249 + 'label' => esc_html__( 'Enable Images lightBox', 'shopbuilder' ),
4250 + 'tab' => 'general',
4251 + ],
4252 + 'lightBox_button_position' => [
4253 + 'id' => 'lightBox_button_position',
4254 + 'type' => 'select',
4255 + 'value' => 'top-right',
4256 + 'label' => esc_html__( 'Zoom Button Position', 'shopbuilder' ),
4257 + 'isPro' => ! rtsb()->has_pro(),
4258 + 'options' => [
4259 + 'top-right' => esc_html__( 'Top Right', 'shopbuilder' ),
4260 + 'top-left' => esc_html__( 'Top Left', 'shopbuilder' ),
4261 + 'bottom-right' => esc_html__( 'Bottom Right', 'shopbuilder' ),
4262 + 'bottom-left' => esc_html__( 'Bottom Left', 'shopbuilder' ),
4263 + ],
4264 + 'tab' => 'general',
4265 + ],
4266 + 'thumbnails_columns' => [
4267 + 'id' => 'thumbnails_columns',
4268 + 'type' => 'slider',
4269 + 'label' => esc_html__( 'Thumbnails Items per row / slider view', 'shopbuilder' ),
4270 + 'help' => esc_html__( 'Product Thumbnails Item Image. Default value is: 4. Limit: 2-8. The field required for slider.', 'shopbuilder' ),
4271 + 'min' => 2,
4272 + 'max' => 8,
4273 + 'unit' => '',
4274 + 'value' => 4,
4275 + 'tab' => 'general',
4276 + ],
4277 + 'thumbnails_gap' => [
4278 + 'id' => 'thumbnails_gap',
4279 + 'type' => 'slider',
4280 + 'label' => esc_html__( 'Thumbnails Gap', 'shopbuilder' ),
4281 + 'help' => esc_html__( 'Product Thumbnails Gap In Pixel. Default value is: 0. Limit: 0-50.', 'shopbuilder' ),
4282 + 'min' => 0,
4283 + 'max' => 50,
4284 + 'unit' => 'px',
4285 + 'value' => 0,
4286 + 'tab' => 'general',
4287 + ],
4288 + 'gallery_style' => [
4289 + 'id' => 'gallery_style',
4290 + 'type' => 'select',
4291 + 'value' => 'bottom',
4292 + 'label' => esc_html__( 'Gallery Style', 'shopbuilder' ),
4293 + 'isPro' => ! rtsb()->has_pro(),
4294 + 'options' => [
4295 + 'bottom' => esc_html__( 'Thumbnail Position Bottom', 'shopbuilder' ),
4296 + 'left' => esc_html__( 'Thumbnail Position Left', 'shopbuilder' ),
4297 + 'right' => esc_html__( 'Thumbnail Position Right', 'shopbuilder' ),
4298 + 'grid' => esc_html__( 'Grid View Images', 'shopbuilder' ),
4299 + ],
4300 + 'tab' => 'general',
4301 + ],
4302 + 'adaptive_height' => [
4303 + 'id' => 'adaptive_height',
4304 + 'type' => 'switch',
4305 + 'default' => false,
4306 + 'label' => esc_html__( 'Main Slider Adaptive Height', 'shopbuilder' ),
4307 + 'tab' => 'general',
4308 + 'dependency' => [
4309 + 'rules' => [
4310 + [
4311 + 'item' => 'modules.variation_gallery.gallery_style',
4312 + 'value' => 'bottom',
4313 + 'operator' => '==',
4314 + ],
4315 + ],
4316 + ],
4317 + ],
4318 + 'main_slider_alignment' => [
4319 + 'id' => 'main_slider_alignment',
4320 + 'type' => 'switch',
4321 + 'value' => 'center',
4322 + 'label' => esc_html__( 'Main Image Middle Position', 'shopbuilder' ),
4323 + 'help' => esc_html__( 'The main image area will align vertically in the center if the inner content is shorter than the adjacent content.', 'shopbuilder' ),
4324 + 'tab' => 'general',
4325 + 'dependency' => [
4326 + 'rules' => [
4327 + [
4328 + 'item' => 'modules.variation_gallery.gallery_style',
4329 + 'value' => [ 'left', 'right' ],
4330 + 'operator' => 'in',
4331 + ],
4332 + ],
4333 + ],
4334 + ],
4335 +
4336 + 'main_image_transition_effect' => [
4337 + 'id' => 'main_image_transition_effect',
4338 + 'type' => 'select',
4339 + 'value' => 'slide',
4340 + 'label' => esc_html__( 'Main Image Transition Effect', 'shopbuilder' ),
4341 + 'isPro' => ! rtsb()->has_pro(),
4342 + 'options' => [
4343 + 'slide' => esc_html__( 'Slide', 'shopbuilder' ),
4344 + 'fade' => esc_html__( 'Fade', 'shopbuilder' ),
4345 + ],
4346 + 'tab' => 'general',
4347 + 'dependency' => [
4348 + 'rules' => [
4349 + [
4350 + 'item' => 'modules.variation_gallery.gallery_style',
4351 + 'value' => 'grid',
4352 + 'operator' => '!=',
4353 + ],
4354 + ],
4355 + ],
4356 + ],
4357 + 'thumb_image_section_width' => [
4358 + 'id' => 'thumb_image_section_width',
4359 + 'type' => 'slider',
4360 + 'label' => esc_html__( 'Thumbnail Image Section Width', 'shopbuilder' ),
4361 + 'help' => esc_html__( 'Product Thumbnails Section Width In Pixel.', 'shopbuilder' ),
4362 + 'min' => 150,
4363 + 'max' => 1000,
4364 + 'unit' => 'px',
4365 + 'value' => 150,
4366 + 'tab' => 'general',
4367 + 'dependency' => [
4368 + 'rules' => [
4369 + [
4370 + 'item' => 'modules.variation_gallery.gallery_style',
4371 + 'value' => [ 'left', 'right' ],
4372 + 'operator' => 'in',
4373 + ],
4374 + ],
4375 + ],
4376 + ],
4377 + 'image_section_height' => [
4378 + 'id' => 'image_section_height',
4379 + 'type' => 'slider',
4380 + 'label' => esc_html__( 'Slider Height/Image Section Height', 'shopbuilder' ),
4381 + 'help' => esc_html__( 'Product Thumbnails And Main Image Section Height In Pixel.', 'shopbuilder' ),
4382 + 'min' => 400,
4383 + 'max' => 2000,
4384 + 'unit' => 'px',
4385 + 'value' => 500,
4386 + 'tab' => 'general',
4387 + 'dependency' => [
4388 + 'rules' => [
4389 + [
4390 + 'item' => 'modules.variation_gallery.gallery_style',
4391 + 'value' => [ 'left', 'right' ],
4392 + 'operator' => 'in',
4393 + ],
4394 + ],
4395 + ],
4396 + ],
4397 + 'main_image_border_color' => [
4398 + 'id' => 'main_image_border_color',
4399 + 'label' => esc_html__( 'Main Image Border Color', 'shopbuilder' ),
4400 + 'tab' => 'styles',
4401 + 'type' => 'color',
4402 + 'dependency' => [
4403 + 'rules' => [
4404 + [
4405 + 'item' => 'modules.variation_gallery.gallery_style',
4406 + 'value' => 'grid',
4407 + 'operator' => '!=',
4408 + ],
4409 + ],
4410 + ],
4411 + ],
4412 + 'thumbnail_item_border_color' => [
4413 + 'id' => 'thumbnail_item_border_color',
4414 + 'label' => esc_html__( 'Thumbnail item Border Color', 'shopbuilder' ),
4415 + 'tab' => 'styles',
4416 + 'type' => 'color',
4417 + ],
4418 + 'thumbnail_item_inner_padding' => [
4419 + 'id' => 'thumbnail_item_inner_padding',
4420 + 'type' => 'slider',
4421 + 'label' => esc_html__( 'Thumbnail Item Inner Padding', 'shopbuilder' ),
4422 + 'min' => 0,
4423 + 'max' => 30,
4424 + 'unit' => 'px',
4425 + 'value' => 10,
4426 + 'tab' => 'styles',
4427 + ],
4428 + 'thumbnail_item_border_radius' => [
4429 + 'id' => 'thumbnail_item_border_radius',
4430 + 'type' => 'slider',
4431 + 'label' => esc_html__( 'Thumbnail Item Border Radius', 'shopbuilder' ),
4432 + 'min' => 0,
4433 + 'max' => 30,
4434 + 'unit' => 'px',
4435 + 'value' => 5,
4436 + 'tab' => 'styles',
4437 + ],
4438 + ]
4439 + );
943 4440 }
944 4441 }