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