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

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

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