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