PluginProbe
ShopBuilder – WooCommerce Builder For Elementor / 3.1.2
ShopBuilder – WooCommerce Builder For Elementor v3.1.2
3.4.2 3.4.1 3.4.0 2.0.1 2.0.2 2.0.3 2.1.0 2.1.1 2.1.10 2.1.11 2.1.12 2.1.13 2.1.14 2.1.15 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 2.2.0 2.2.1 2.2.2 All 63 releases
shopbuilder / app / Models / ModuleList.php

ModuleList.php in ShopBuilder – WooCommerce Builder For Elementor 3.1.2, at app/Models/ModuleList.php

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