PluginProbe
ShopBuilder – WooCommerce Builder For Elementor / 2.6.1
ShopBuilder – WooCommerce Builder For Elementor v2.6.1
3.4.2 3.4.1 3.4.0 2.0.1 2.0.2 2.0.3 2.1.0 2.1.1 2.1.10 2.1.11 2.1.12 2.1.13 2.1.14 2.1.15 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 2.2.0 2.2.1 2.2.2 All 63 releases
← All changes | app/Models/ModuleList.php +289 -1657 3.4.22.6.1 View file →
@@ -7,19 +7,13 @@
7 7
8 8 namespace RadiusTheme\SB\Models;
9 9
10 10 use RadiusTheme\SB\Helpers\Fns;
11 -use RadiusTheme\SB\Helpers\SvgIcons;
12 11 use RadiusTheme\SB\Models\Base\ListModel;
13 12 use RadiusTheme\SB\Modules\Badges\Badges;
13 +use RadiusTheme\SB\Modules\CheckoutEditor\CheckoutEditorInit;
14 14 use RadiusTheme\SB\Modules\CheckoutEditor\CheckoutFns;
15 -use RadiusTheme\SB\Modules\VariationSwatches\SwatchesFns;
16 15 use RadiusTheme\SB\Modules\ShopifyCheckout\ShopifyCheckout;
17 -use RadiusTheme\SB\Modules\CheckoutEditor\CheckoutEditorInit;
18 -use RadiusTheme\SB\Modules\AbandonedCartRecovery\CartRecoveryInit;
19 -use RadiusTheme\SB\Modules\VariationSwatches\VariationSwatches;
20 -use RadiusTheme\SB\Modules\VariationGallery\VariationGalleryInit;
21 -use RadiusTheme\SB\Modules\AbandonedCartRecovery\CartRecoveryOptions;
22 16 use RadiusTheme\SB\Traits\SingletonTrait;
23 17 use RadiusTheme\SB\Modules\Compare\Compare;
24 18 use RadiusTheme\SB\Modules\WishList\Wishlist;
25 19 use RadiusTheme\SB\Modules\Compare\CompareFns;
@@ -57,129 +51,16 @@
57 51 *
58 52 * @return mixed|null
59 53 */
60 54 protected function raw_list() {
61 - $isSwatchActive = false;
62 - $isGalleryActive = false;
63 - $variationSwatch = apply_filters(
64 - 'rtsb/module/variation_swatches/options',
65 - [
66 - 'id' => 'variation_swatches',
67 - 'title' => esc_html__( 'Variation Swatches', 'shopbuilder' ),
68 - 'badge' => 'new',
69 - 'package' => 'free',
70 - 'active' => 'on',
71 - 'base_class' => VariationSwatches::class,
72 - 'active_field' => [
73 - 'label' => esc_html__( 'Enable Variation Swatches Module?', 'shopbuilder' ),
74 - 'help' => esc_html__( 'Switch on to enable variation swatches module.', 'shopbuilder' ),
75 - ],
76 - 'tabs' => [
77 - 'general' => [
78 - 'title' => esc_html__( 'General', 'shopbuilder' ),
79 - ],
80 - 'showcase_shop' => [
81 - 'title' => esc_html__( 'Showcase / Shop', 'shopbuilder' ),
82 - ],
83 - 'style' => [
84 - 'title' => esc_html__( 'Style', 'shopbuilder' ),
85 - ],
86 - ],
87 - 'fields' => $this->get_variation_swatches_fields(),
88 - ],
89 - $isSwatchActive
90 - );
91 -
92 - if ( Fns::check_plugin_active( 'woo-product-variation-swatches/woo-product-variation-swatches.php' ) ) {
93 - $isSwatchActive = true;
94 - $variationSwatch = apply_filters(
95 - 'rtsb/module/variation_swatches/options',
96 - [
97 - 'id' => 'variation_swatches',
98 - 'external' => true,
99 - 'title' => esc_html__( 'Variation Swatches', 'shopbuilder' ),
100 - 'pluginSlug' => 'woo-product-variation-swatches',
101 - 'pluginIsInstalled' => Fns::check_plugin_installed( 'woo-product-variation-swatches/woo-product-variation-swatches.php' ),
102 - 'pluginIsActive' => Fns::check_plugin_active( 'woo-product-variation-swatches/woo-product-variation-swatches.php' ),
103 - 'pluginActiveUrl' => add_query_arg(
104 - [
105 - '_wpnonce' => wp_create_nonce( 'activate-plugin_woo-product-variation-swatches/woo-product-variation-swatches.php' ),
106 - 'action' => 'activate',
107 - 'plugin' => 'woo-product-variation-swatches/woo-product-variation-swatches.php',
108 - ],
109 - admin_url( 'plugins.php' )
110 - ),
111 - 'help' => __( 'Currently using an external plugin. You can disable the external plugin and enable the built-in module for better performance. You’ll need to reconfigure settings if you switch to built-in module.', 'shopbuilder' ),
112 - 'package' => 'free',
113 - 'active_field' => [
114 - 'disable' => false,
115 - ],
116 - 'fields' => [],
117 - ],
118 - $isSwatchActive
119 - );
120 - }
121 - $variationGallery = apply_filters(
122 - 'rtsb/module/variation_gallery/options',
123 - [
124 - 'id' => 'variation_gallery',
125 - 'title' => esc_html__( 'Variation Gallery', 'shopbuilder' ),
126 - 'badge' => 'new',
127 - 'package' => 'free',
128 - 'active' => 'on',
129 - 'base_class' => VariationGalleryInit::class,
130 - 'active_field' => [
131 - 'label' => esc_html__( 'Enable Variation Gallery Module?', 'shopbuilder' ),
132 - 'help' => esc_html__( 'Switch on to enable variation gallery module.', 'shopbuilder' ),
133 - ],
134 - 'tabs' => [
135 - 'general' => [
136 - 'title' => esc_html__( 'General', 'shopbuilder' ),
137 - ],
138 - 'styles' => [
139 - 'title' => esc_html__( 'Styles', 'shopbuilder' ),
140 - ],
141 - ],
142 - 'fields' => $this->get_variation_gallery_fields(),
143 - ],
144 - $isGalleryActive
145 - );
146 - if ( Fns::check_plugin_active( 'woo-product-variation-gallery/woo-product-variation-gallery.php' ) ) {
147 - $isGalleryActive = true;
148 - $variationGallery = apply_filters(
149 - 'rtsb/module/variation_gallery/options',
150 - [
151 - 'id' => 'variation_gallery',
152 - 'external' => true,
153 - 'title' => esc_html__( 'Variation Gallery', 'shopbuilder' ),
154 - 'pluginSlug' => 'woo-product-variation-gallery',
155 - 'pluginIsInstalled' => Fns::check_plugin_installed( 'woo-product-variation-gallery/woo-product-variation-gallery.php' ),
156 - 'pluginIsActive' => Fns::check_plugin_active( 'woo-product-variation-gallery/woo-product-variation-gallery.php' ),
157 - 'pluginActiveUrl' => add_query_arg(
158 - [
159 - '_wpnonce' => wp_create_nonce( 'activate-plugin_woo-product-variation-gallery/woo-product-variation-gallery.php' ),
160 - 'action' => 'activate',
161 - 'plugin' => 'woo-product-variation-gallery/woo-product-variation-gallery.php',
162 - ],
163 - admin_url( 'plugins.php' )
164 - ),
165 - 'help' => __( 'Currently using an external plugin. You can disable the external plugin and enable the built-in module for better performance. You’ll need to reconfigure settings if you switch to built-in module.', 'shopbuilder' ),
166 - 'package' => 'free',
167 - 'active_field' => [
168 - 'disable' => false,
169 - ],
170 - 'fields' => [],
171 - ],
172 - $isGalleryActive
173 - );
174 - }
175 55 $list = [
176 - 'quick_view' => apply_filters(
56 + 'quick_view' => apply_filters(
177 57 'rtsb/module/quick_view/options',
178 58 [
179 59 'id' => 'quick_view',
180 60 'title' => esc_html__( 'Quick View', 'shopbuilder' ),
181 61 'base_class' => QuickView::class,
62 + 'category' => 'general',
182 63 'active' => 'on',
183 64 'package' => 'free',
184 65 'active_field' => [
185 66 'label' => esc_html__( 'Enable Quick View?', 'shopbuilder' ),
@@ -199,14 +80,14 @@
199 80 'loop_btn_position' => [
200 81 'id' => 'loop_btn_position',
201 82 'type' => 'select',
202 83 'value' => 'custom',
203 - 'label' => esc_html__( 'Showcase Button Position', 'shopbuilder' ),
204 - 'help' => esc_html__( 'Manage quick view button position in product showcases (Shop, Related, Upsells, Cross-sells, etc.).', 'shopbuilder' ),
84 + 'label' => esc_html__( 'Shop Page Button Position', 'shopbuilder' ),
85 + 'help' => esc_html__( 'You can manage quick view button position in shop page.', 'shopbuilder' ),
205 86 'tab' => 'general',
206 87 'options' => [
207 - 'before_add_to_cart' => esc_html__( 'Above Add To Cart', 'shopbuilder' ),
208 - 'after_add_to_cart' => esc_html__( 'Below Add To Cart', 'shopbuilder' ),
88 + 'before_add_to_cart' => esc_html__( 'Before Add To Cart', 'shopbuilder' ),
89 + 'after_add_to_cart' => esc_html__( 'After Add To Cart', 'shopbuilder' ),
209 90 'shortcode' => esc_html__( 'Use Shortcode', 'shopbuilder' ),
210 91 'custom' => esc_html__( 'Custom Position', 'shopbuilder' ),
211 92 ],
212 93
@@ -290,11 +171,11 @@
290 171 ],
291 172
292 173 'modal_height' => [
293 174 'id' => 'modal_height',
294 - 'label' => esc_html__( 'Modal Height (in px)', 'shopbuilder' ),
295 - 'help' => esc_html__( 'Quick view button modal height. Example: 450', 'shopbuilder' ),
296 - 'type' => 'number',
175 + 'label' => esc_html__( 'Modal Height', 'shopbuilder' ),
176 + 'help' => esc_html__( 'Quick view button modal height. Example: 450px', 'shopbuilder' ),
177 + 'type' => 'text',
297 178 'value' => '',
298 179 'tab' => 'style',
299 180 ],
300 181
@@ -335,9 +216,9 @@
335 216 ]
336 217 ),
337 218 ]
338 219 ),
339 - 'wishlist' => apply_filters(
220 + 'wishlist' => apply_filters(
340 221 'rtsb/module/wishlist/options',
341 222 [
342 223 'id' => 'wishlist',
343 224 'title' => esc_html__( 'Wishlist', 'shopbuilder' ),
@@ -343,8 +224,9 @@
343 224 'title' => esc_html__( 'Wishlist', 'shopbuilder' ),
344 225 'package' => 'free',
345 226 'active' => 'on',
346 227 'base_class' => Wishlist::class,
228 + 'category' => 'general',
347 229 'active_field' => [
348 230 'label' => esc_html__( 'Enable Wishlist?', 'shopbuilder' ),
349 231 'help' => esc_html__( 'Switch on to enable wishlist module.', 'shopbuilder' ),
350 232 ],
@@ -376,9 +258,9 @@
376 258 ],
377 259 'wishlist_shop_wrapper_heading' => [
378 260 'id' => 'wishlist_shop_wrapper_heading',
379 261 'type' => 'title',
380 - 'label' => esc_html__( 'Product Showcase Settings', 'shopbuilder' ),
262 + 'label' => esc_html__( 'Shop Page Settings', 'shopbuilder' ),
381 263 'tab' => 'button',
382 264 ],
383 265 'show_btn_on_loop' => [
384 266 'id' => 'show_btn_on_loop',
@@ -383,9 +265,9 @@
383 265 'show_btn_on_loop' => [
384 266 'id' => 'show_btn_on_loop',
385 267 'value' => 'on',
386 268 'type' => 'switch',
387 - 'label' => esc_html__( 'Show in Product Showcase', 'shopbuilder' ),
269 + 'label' => esc_html__( 'Show in Shop Page', 'shopbuilder' ),
388 270 'tab' => 'button',
389 271 ],
390 272 'loop_btn_position' => [
391 273 'id' => 'loop_btn_position',
@@ -390,13 +272,13 @@
390 272 'loop_btn_position' => [
391 273 'id' => 'loop_btn_position',
392 274 'type' => 'select',
393 275 'value' => 'custom',
394 - 'label' => esc_html__( 'Showcase Button Position', 'shopbuilder' ),
395 - 'help' => esc_html__( 'Manage wishlist button position in product showcases (Shop, Related, Upsells, Cross-sells, etc.).', 'shopbuilder' ),
276 + 'label' => esc_html__( 'Shop Page Button Position', 'shopbuilder' ),
277 + 'help' => esc_html__( 'You can manage wishlist button position in shop page.', 'shopbuilder' ),
396 278 'options' => [
397 - 'before_add_to_cart' => esc_html__( 'Above Add To Cart', 'shopbuilder' ),
398 - 'after_add_to_cart' => esc_html__( 'Below Add To Cart', 'shopbuilder' ),
279 + 'before_add_to_cart' => esc_html__( 'Before Add To Cart', 'shopbuilder' ),
280 + 'after_add_to_cart' => esc_html__( 'After Add To Cart', 'shopbuilder' ),
399 281 'shortcode' => esc_html__( 'Use Shortcode', 'shopbuilder' ),
400 282 'custom' => esc_html__( 'Custom Position', 'shopbuilder' ),
401 283 ],
402 284 'dependency' => [
@@ -503,10 +385,10 @@
503 385 'help' => esc_html__( 'You can manage compare button position in single product page.', 'shopbuilder' ),
504 386 'type' => 'select',
505 387 'value' => 'custom',
506 388 'options' => [
507 - 'before_add_to_cart' => esc_html__( 'Above Add To Cart', 'shopbuilder' ),
508 - 'after_add_to_cart' => esc_html__( 'Below Add To Cart', 'shopbuilder' ),
389 + 'before_add_to_cart' => esc_html__( 'Before Add To Cart', 'shopbuilder' ),
390 + 'after_add_to_cart' => esc_html__( 'After Add To Cart', 'shopbuilder' ),
509 391 'after_thumbnail' => esc_html__( 'After Image', 'shopbuilder' ),
510 392 'after_summary' => esc_html__( 'After Summary', 'shopbuilder' ),
511 393 'shortcode' => esc_html__( 'Use Shortcode', 'shopbuilder' ),
512 394 'custom' => esc_html__( 'Custom Position', 'shopbuilder' ),
@@ -631,8 +513,26 @@
631 513 'value' => esc_html__( 'Browse Wishlist', 'shopbuilder' ),
632 514 'placeholder' => esc_html__( 'Browse Wishlist', 'shopbuilder' ),
633 515 'tab' => 'general',
634 516 ],
517 + /*
518 + * TODO:: Will Implement Later.
519 + 'redirect_cart' => array(
520 + 'id' => 'redirect_cart',
521 + 'type' => 'switch',
522 + 'help' => esc_html__( 'Redirect users to the cart page when they add a product to the cart from the wishlist page', 'shopbuilder' ),
523 + 'label' => esc_html__( 'Redirect to Cart', 'shopbuilder' ),
524 + 'tab' => 'page',
525 + ),
526 + 'remove_after_add_to_cart' => array(
527 + 'value' => 'on',
528 + 'id' => 'remove_after_add_to_cart',
529 + 'type' => 'switch',
530 + 'help' => esc_html__( 'Remove the product from the wishlist after it has been added to the cart', 'shopbuilder' ),
531 + 'label' => esc_html__( 'Remove if Added to Cart', 'shopbuilder' ),
532 + 'tab' => 'page',
533 + ),
534 + */
635 535 'page' => [
636 536 'id' => 'page',
637 537 'type' => 'select',
638 538 'label' => esc_html__( 'Select Wishlist Page', 'shopbuilder' ),
@@ -655,62 +555,29 @@
655 555 'label' => esc_html__( 'Wishlist Table Fields Visibility', 'shopbuilder' ),
656 556 'tab' => 'page',
657 557 ],
658 558
659 - 'shortcode_list_heading' => [
660 - 'id' => 'shortcode_list_heading',
661 - 'type' => 'title',
662 - 'label' => esc_html__( 'Available Shortcodes', 'shopbuilder' ),
663 - 'tab' => 'shortcodes',
664 - ],
665 - 'shortcode_wishlist_table' => [
666 - 'type' => 'raw',
667 - 'label' => esc_html__( 'Wishlist Table', 'shopbuilder' ),
668 - 'html' => '<code>[rtsb_wishlist]</code><p class="description">'
669 - . esc_html__( 'Displays the wishlist table with all added products. Use this shortcode on the wishlist page.', 'shopbuilder' )
670 - . '</p>',
671 - 'tab' => 'shortcodes',
672 - ],
673 - 'shortcode_wishlist_button' => [
674 - 'type' => 'raw',
675 - 'label' => esc_html__( 'Wishlist Button', 'shopbuilder' ),
676 - 'html' => '<code>[rtsb_wishlist_button]</code><p class="description">'
677 - . esc_html__( 'Displays the "Add to Wishlist" button. Use inside a product loop or on a single product page.', 'shopbuilder' )
678 - . '</p>',
679 - 'tab' => 'shortcodes',
680 - ],
681 - 'shortcode_wishlist_counter' => [
682 - 'type' => 'raw',
683 - 'label' => esc_html__( 'Wishlist Counter', 'shopbuilder' ),
684 - 'html' => '<code>[rtsb_wishlist_counter]</code><p class="description">'
685 - . esc_html__( 'Displays the wishlist item count. Place it in the header or menu to show total wishlist items.', 'shopbuilder' )
686 - . '</p>',
687 - 'tab' => 'shortcodes',
688 - ],
689 -
690 559 ]
691 560 ),
692 561 'tabs' => [
693 - 'general' => [
562 + 'general' => [
694 563 'title' => esc_html__( 'General', 'shopbuilder' ),
695 564 ],
696 - 'button' => [
565 + 'button' => [
697 566 'title' => esc_html__( 'Button', 'shopbuilder' ),
698 567 ],
699 - 'page' => [
568 + 'page' => [
700 569 'title' => esc_html__( 'Page', 'shopbuilder' ),
701 570 ],
702 - 'shortcodes' => [
703 - 'title' => esc_html__( 'Shortcodes', 'shopbuilder' ),
704 - ],
705 571 ],
706 572 ]
707 573 ),
708 - 'compare' => apply_filters(
574 + 'compare' => apply_filters(
709 575 'rtsb/module/compare/options',
710 576 [
711 577 'id' => 'compare',
712 578 'base_class' => Compare::class,
579 + 'category' => 'general',
713 580 'title' => esc_html__( 'Product Compare', 'shopbuilder' ),
714 581 'package' => 'free',
715 582 'active' => 'on',
716 583 'active_field' => [
@@ -722,9 +589,9 @@
722 589 [
723 590 'compare_shop_wrapper_heading' => [
724 591 'id' => 'compare_shop_wrapper_heading',
725 592 'type' => 'title',
726 - 'label' => esc_html__( 'Product Showcase Settings', 'shopbuilder' ),
593 + 'label' => esc_html__( 'Shop Page Settings', 'shopbuilder' ),
727 594 'tab' => 'button',
728 595 ],
729 596 'show_btn_on_loop' => [
730 597 'id' => 'show_btn_on_loop',
@@ -729,9 +596,9 @@
729 596 'show_btn_on_loop' => [
730 597 'id' => 'show_btn_on_loop',
731 598 'value' => 'on',
732 599 'type' => 'switch',
733 - 'label' => esc_html__( 'Show in Product Showcase', 'shopbuilder' ),
600 + 'label' => esc_html__( 'Show in Shop Page', 'shopbuilder' ),
734 601 'tab' => 'button',
735 602 ],
736 603 'loop_btn_position' => [
737 604 'id' => 'loop_btn_position',
@@ -736,13 +603,13 @@
736 603 'loop_btn_position' => [
737 604 'id' => 'loop_btn_position',
738 605 'type' => 'select',
739 606 'value' => 'custom',
740 - 'label' => esc_html__( 'Showcase Button Position', 'shopbuilder' ),
741 - 'help' => esc_html__( 'Manage compare button position in product showcases (Shop, Related, Upsells, Cross-sells, etc.).', 'shopbuilder' ),
607 + 'label' => esc_html__( 'Shop Page Button Position', 'shopbuilder' ),
608 + 'help' => esc_html__( 'You can manage wishlist button position in shop page.', 'shopbuilder' ),
742 609 'options' => [
743 - 'before_add_to_cart' => esc_html__( 'Above Add To Cart', 'shopbuilder' ),
744 - 'after_add_to_cart' => esc_html__( 'Below Add To Cart', 'shopbuilder' ),
610 + 'before_add_to_cart' => esc_html__( 'Before Add To Cart', 'shopbuilder' ),
611 + 'after_add_to_cart' => esc_html__( 'After Add To Cart', 'shopbuilder' ),
745 612 'shortcode' => esc_html__( 'Use Shortcode', 'shopbuilder' ),
746 613 'custom' => esc_html__( 'Custom Position', 'shopbuilder' ),
747 614 ],
748 615 'dependency' => [
@@ -849,10 +716,10 @@
849 716 'help' => esc_html__( 'You can manage compare button position in single product page.', 'shopbuilder' ),
850 717 'type' => 'select',
851 718 'value' => 'custom',
852 719 'options' => [
853 - 'before_add_to_cart' => esc_html__( 'Above Add To Cart', 'shopbuilder' ),
854 - 'after_add_to_cart' => esc_html__( 'Below Add To Cart', 'shopbuilder' ),
720 + 'before_add_to_cart' => esc_html__( 'Before Add To Cart', 'shopbuilder' ),
721 + 'after_add_to_cart' => esc_html__( 'After Add To Cart', 'shopbuilder' ),
855 722 'after_thumbnail' => esc_html__( 'After Image', 'shopbuilder' ),
856 723 'after_summary' => esc_html__( 'After Summary', 'shopbuilder' ),
857 724 'shortcode' => esc_html__( 'Use Shortcode', 'shopbuilder' ),
858 725 'custom' => esc_html__( 'Custom Position', 'shopbuilder' ),
@@ -1027,11 +894,90 @@
1027 894
1028 895 ],
1029 896 ]
1030 897 ),
1031 - 'variation_swatches' => $variationSwatch,
1032 - 'variation_gallery' => $variationGallery,
1033 - 'product_badges' => apply_filters(
898 + 'variation_swatches' => apply_filters(
899 + 'rtsb/module/variation_swatches/options',
900 + [
901 + 'id' => 'variation_swatches',
902 + 'external' => true,
903 + 'category' => 'general',
904 + 'title' => esc_html__( 'Variation Swatches', 'shopbuilder' ),
905 + 'pluginSlug' => 'woo-product-variation-swatches',
906 + 'pluginIsInstalled' => Fns::check_plugin_installed( 'woo-product-variation-swatches/woo-product-variation-swatches.php' ),
907 + 'pluginIsActive' => Fns::check_plugin_active( 'woo-product-variation-swatches/woo-product-variation-swatches.php' ),
908 + 'pluginActiveUrl' => add_query_arg(
909 + [
910 + '_wpnonce' => wp_create_nonce( 'activate-plugin_woo-product-variation-swatches/woo-product-variation-swatches.php' ),
911 + 'action' => 'activate',
912 + 'plugin' => 'woo-product-variation-swatches/woo-product-variation-swatches.php',
913 + ],
914 + admin_url( 'plugins.php' )
915 + ),
916 + 'help' => __( 'This module requires: <a href="https://wordpress.org/plugins/woo-product-variation-swatches/">Variation Swatches for WooCommerce</a>.', 'shopbuilder' ),
917 + 'package' => 'free',
918 + 'active_field' => [
919 + 'disable' => false,
920 + ],
921 + 'fields' => [],
922 + ]
923 + ),
924 + 'variation_gallery' => apply_filters(
925 + 'rtsb/module/variation_gallery/options',
926 + [
927 + 'id' => 'variation_gallery',
928 + 'external' => true,
929 + 'category' => 'general',
930 + 'title' => esc_html__( 'Variation Gallery', 'shopbuilder' ),
931 + 'pluginSlug' => 'woo-product-variation-gallery',
932 + 'pluginIsInstalled' => Fns::check_plugin_installed( 'woo-product-variation-gallery/woo-product-variation-gallery.php' ),
933 + 'pluginIsActive' => Fns::check_plugin_active( 'woo-product-variation-gallery/woo-product-variation-gallery.php' ),
934 + 'pluginActiveUrl' => add_query_arg(
935 + [
936 + '_wpnonce' => wp_create_nonce( 'activate-plugin_woo-product-variation-gallery/woo-product-variation-gallery.php' ),
937 + 'action' => 'activate',
938 + 'plugin' => 'woo-product-variation-gallery/woo-product-variation-gallery.php',
939 + ],
940 + admin_url( 'plugins.php' )
941 + ),
942 + 'help' => __( 'This module requires: <a href="https://wordpress.org/plugins/woo-product-variation-gallery/">Variation Images Gallery for WooCommerce</a>.', 'shopbuilder' ),
943 + 'package' => 'free',
944 + 'active_field' => [
945 + 'disable' => false,
946 + ],
947 + 'fields' => [],
948 + ]
949 + ),
950 + 'mini_cart' => apply_filters(
951 + 'rtsb/module/mini_cart/options',
952 + [
953 + 'id' => 'mini_cart',
954 + 'active' => '',
955 + 'title' => esc_html__( 'Mini Cart', 'shopbuilder' ),
956 + 'package' => $this->pro_package(),
957 + 'active_field' => [
958 + 'label' => esc_html__( 'Enable Mini Cart?', 'shopbuilder' ),
959 + 'help' => esc_html__( 'Switch on to enable mini cart module.', 'shopbuilder' ),
960 + ],
961 + 'is_active' => true,
962 + 'fields' => Fns::pro_version_notice( '1.0.0' ),
963 + ]
964 + ),
965 + 'product_size_chart' => apply_filters(
966 + 'rtsb/module/product_size_chart/options',
967 + [
968 + 'id' => 'product_size_chart',
969 + 'active' => '',
970 + 'title' => esc_html__( 'Product Size Chart', 'shopbuilder' ),
971 + 'package' => $this->pro_package(),
972 + 'active_field' => [
973 + 'label' => esc_html__( 'Enable Product Size Chart?', 'shopbuilder' ),
974 + 'help' => esc_html__( 'Switch on to enable Product Size Chart module.', 'shopbuilder' ),
975 + ],
976 + 'fields' => Fns::pro_version_notice( '1.0.0' ),
977 + ]
978 + ),
979 + 'product_badges' => apply_filters(
1034 980 'rtsb/module/product_badges/options',
1035 981 [
1036 982 'id' => 'product_badges',
1037 983 'active' => '',
@@ -1055,9 +1001,68 @@
1055 1001 ],
1056 1002 ],
1057 1003 ]
1058 1004 ),
1059 - 'checkout_fields_editor' => apply_filters(
1005 + 'customize_my_account' => apply_filters(
1006 + 'rtsb/module/customize_my_account/options',
1007 + [
1008 + 'id' => 'customize_my_account',
1009 + 'active' => '',
1010 + 'title' => esc_html__( 'Customize My Account', 'shopbuilder' ),
1011 + 'package' => $this->pro_package(),
1012 + 'active_field' => [
1013 + 'label' => esc_html__( 'Enable Customize My Account?', 'shopbuilder' ),
1014 + 'help' => esc_html__( 'Switch on to enable customize my account module.', 'shopbuilder' ),
1015 + ],
1016 + 'fields' => Fns::pro_version_notice( '1.4.0' ),
1017 + ]
1018 + ),
1019 + 'pre_order' => apply_filters(
1020 + 'rtsb/module/pre_order/options',
1021 + [
1022 + 'id' => 'pre_order',
1023 + 'active' => '',
1024 + 'title' => esc_html__( 'Pre-Order', 'shopbuilder' ),
1025 + 'package' => $this->pro_package(),
1026 + 'active_field' => [
1027 + 'label' => esc_html__( 'Enable Pre-Order?', 'shopbuilder' ),
1028 + 'help' => esc_html__( 'Switch on to enable pre-order module.', 'shopbuilder' ),
1029 + ],
1030 + 'fields' => Fns::pro_version_notice( '1.5.0' ),
1031 + ]
1032 + ),
1033 + 'currency_switcher' => apply_filters(
1034 + 'rtsb/module/currency_switcher/options',
1035 + [
1036 + 'id' => 'currency_switcher',
1037 + 'active' => '',
1038 + 'title' => esc_html__( 'Currency Switcher', 'shopbuilder' ),
1039 + 'package' => $this->pro_package(),
1040 + 'active_field' => [
1041 + 'label' => esc_html__( 'Enable Currency Switcher?', 'shopbuilder' ),
1042 + 'help' => esc_html__( 'Switch on to enable currency switcher module.', 'shopbuilder' ),
1043 + ],
1044 + 'is_active' => true,
1045 + 'fields' => Fns::pro_version_notice( '1.5.0' ),
1046 + ]
1047 + ),
1048 + 'product_add_ons' => apply_filters(
1049 + 'rtsb/module/product_add_ons/options',
1050 + [
1051 + 'id' => 'product_add_ons',
1052 + 'active' => '',
1053 + 'title' => esc_html__( 'Product Add-Ons', 'shopbuilder' ),
1054 + 'package' => $this->pro_package(),
1055 + 'active_field' => [
1056 + 'label' => esc_html__( 'Enable Product Add-Ons?', 'shopbuilder' ),
1057 + 'help' => esc_html__( 'Switch on to enable product add-ons module.', 'shopbuilder' ),
1058 + ],
1059 + 'is_active' => true,
1060 + 'fields' => Fns::pro_version_notice( '1.6.0' ),
1061 + ]
1062 + ),
1063 + // Checkout Fields Manager.
1064 + 'checkout_fields_editor' => apply_filters(
1060 1065 'rtsb/module/checkout_fields_editor/options',
1061 1066 [
1062 1067 'id' => 'checkout_fields_editor',
1063 1068 'active' => '',
@@ -1214,124 +1219,9 @@
1214 1219 ],
1215 1220 ],
1216 1221 ]
1217 1222 ),
1218 - 'shopify_checkout' => apply_filters(
1219 - 'rtsb/module/shopify_checkout/options',
1220 - [
1221 - 'id' => 'shopify_checkout',
1222 - 'active' => '',
1223 - 'title' => esc_html__( 'Shopify Checkout', 'shopbuilder' ),
1224 - 'base_class' => ShopifyCheckout::class,
1225 - 'active_field' => [
1226 - 'label' => esc_html__( 'Enable Shopify Checkout?', 'shopbuilder' ),
1227 - 'help' => esc_html__( 'Switch on to enable Shopify Checkout module.', 'shopbuilder' ),
1228 - ],
1229 - 'fields' => $this->shopify_checkout_options(),
1230 - 'tabs' => [
1231 - 'general' => [
1232 - 'title' => esc_html__( 'General', 'shopbuilder' ),
1233 - ],
1234 - 'multi-step' => [
1235 - 'title' => esc_html__( 'Multi-Step', 'shopbuilder' ),
1236 - ],
1237 - 'styles' => [
1238 - 'title' => esc_html__( 'General Styles', 'shopbuilder' ),
1239 - ],
1240 - 'btn-styles' => [
1241 - 'title' => esc_html__( 'Button Styles', 'shopbuilder' ),
1242 - ],
1243 - ],
1244 - ]
1245 - ),
1246 - 'mini_cart' => apply_filters(
1247 - 'rtsb/module/mini_cart/options',
1248 - [
1249 - 'id' => 'mini_cart',
1250 - 'active' => '',
1251 - 'title' => esc_html__( 'Mini Cart', 'shopbuilder' ),
1252 - 'package' => $this->pro_package(),
1253 - 'active_field' => [
1254 - 'label' => esc_html__( 'Enable Mini Cart?', 'shopbuilder' ),
1255 - 'help' => esc_html__( 'Switch on to enable mini cart module.', 'shopbuilder' ),
1256 - ],
1257 - 'is_active' => true,
1258 - 'fields' => Fns::pro_version_notice( '1.0.0' ),
1259 - ]
1260 - ),
1261 - 'product_size_chart' => apply_filters(
1262 - 'rtsb/module/product_size_chart/options',
1263 - [
1264 - 'id' => 'product_size_chart',
1265 - 'active' => '',
1266 - 'title' => esc_html__( 'Product Size Chart', 'shopbuilder' ),
1267 - 'package' => $this->pro_package(),
1268 - 'active_field' => [
1269 - 'label' => esc_html__( 'Enable Product Size Chart?', 'shopbuilder' ),
1270 - 'help' => esc_html__( 'Switch on to enable Product Size Chart module.', 'shopbuilder' ),
1271 - ],
1272 - 'fields' => Fns::pro_version_notice( '1.0.0' ),
1273 - ]
1274 - ),
1275 - 'customize_my_account' => apply_filters(
1276 - 'rtsb/module/customize_my_account/options',
1277 - [
1278 - 'id' => 'customize_my_account',
1279 - 'active' => '',
1280 - 'title' => esc_html__( 'Customize My Account', 'shopbuilder' ),
1281 - 'package' => $this->pro_package(),
1282 - 'active_field' => [
1283 - 'label' => esc_html__( 'Enable Customize My Account?', 'shopbuilder' ),
1284 - 'help' => esc_html__( 'Switch on to enable customize my account module.', 'shopbuilder' ),
1285 - ],
1286 - 'fields' => Fns::pro_version_notice( '1.4.0' ),
1287 - ]
1288 - ),
1289 - 'pre_order' => apply_filters(
1290 - 'rtsb/module/pre_order/options',
1291 - [
1292 - 'id' => 'pre_order',
1293 - 'active' => '',
1294 - 'title' => esc_html__( 'Pre-Order', 'shopbuilder' ),
1295 - 'package' => $this->pro_package(),
1296 - 'active_field' => [
1297 - 'label' => esc_html__( 'Enable Pre-Order?', 'shopbuilder' ),
1298 - 'help' => esc_html__( 'Switch on to enable pre-order module.', 'shopbuilder' ),
1299 - ],
1300 - 'fields' => Fns::pro_version_notice( '1.5.0' ),
1301 - ]
1302 - ),
1303 - 'currency_switcher' => apply_filters(
1304 - 'rtsb/module/currency_switcher/options',
1305 - [
1306 - 'id' => 'currency_switcher',
1307 - 'active' => '',
1308 - 'title' => esc_html__( 'Currency Switcher', 'shopbuilder' ),
1309 - 'package' => $this->pro_package(),
1310 - 'active_field' => [
1311 - 'label' => esc_html__( 'Enable Currency Switcher?', 'shopbuilder' ),
1312 - 'help' => esc_html__( 'Switch on to enable currency switcher module.', 'shopbuilder' ),
1313 - ],
1314 - 'is_active' => true,
1315 - 'fields' => Fns::pro_version_notice( '1.5.0' ),
1316 - ]
1317 - ),
1318 - 'product_add_ons' => apply_filters(
1319 - 'rtsb/module/product_add_ons/options',
1320 - [
1321 - 'id' => 'product_add_ons',
1322 - 'active' => '',
1323 - 'title' => esc_html__( 'Product Add-Ons', 'shopbuilder' ),
1324 - 'package' => $this->pro_package(),
1325 - 'active_field' => [
1326 - 'label' => esc_html__( 'Enable Product Add-Ons?', 'shopbuilder' ),
1327 - 'help' => esc_html__( 'Switch on to enable product add-ons module.', 'shopbuilder' ),
1328 - ],
1329 - 'is_active' => true,
1330 - 'fields' => Fns::pro_version_notice( '1.6.0' ),
1331 - ]
1332 - ),
1333 - 'sales_notification' => apply_filters(
1223 + 'sales_notification' => apply_filters(
1334 1224 'rtsb/module/sales_notification/options',
1335 1225 [
1336 1226 'id' => 'sales_notification',
1337 1227 'active' => '',
@@ -1343,9 +1233,9 @@
1343 1233 ],
1344 1234 'fields' => Fns::pro_version_notice( '1.0.0' ),
1345 1235 ]
1346 1236 ),
1347 - 'flash_sale_countdown' => apply_filters(
1237 + 'flash_sale_countdown' => apply_filters(
1348 1238 'rtsb/module/flash_sale_countdown/options',
1349 1239 [
1350 1240 'id' => 'flash_sale_countdown',
1351 1241 'active' => '',
@@ -1357,9 +1247,9 @@
1357 1247 ],
1358 1248 'fields' => Fns::pro_version_notice( '1.0.0' ),
1359 1249 ]
1360 1250 ),
1361 - 'quick_checkout' => apply_filters(
1251 + 'quick_checkout' => apply_filters(
1362 1252 'rtsb/module/quick_checkout/options',
1363 1253 [
1364 1254 'id' => 'quick_checkout',
1365 1255 'active' => '',
@@ -1371,9 +1261,9 @@
1371 1261 ],
1372 1262 'fields' => Fns::pro_version_notice( '1.1.0' ),
1373 1263 ]
1374 1264 ),
1375 - 'multi_step_checkout' => apply_filters(
1265 + 'multi_step_checkout' => apply_filters(
1376 1266 'rtsb/module/multi_step_checkout/options',
1377 1267 [
1378 1268 'id' => 'multi_step_checkout',
1379 1269 'active' => '',
@@ -1385,9 +1275,9 @@
1385 1275 ],
1386 1276 'fields' => Fns::pro_version_notice( '1.0.0' ),
1387 1277 ]
1388 1278 ),
1389 - 'back_order' => apply_filters(
1279 + 'back_order' => apply_filters(
1390 1280 'rtsb/module/back_order/options',
1391 1281 [
1392 1282 'id' => 'back_order',
1393 1283 'active' => '',
@@ -1396,12 +1286,12 @@
1396 1286 'active_field' => [
1397 1287 'label' => esc_html__( 'Enable Back-Order?', 'shopbuilder' ),
1398 1288 'help' => esc_html__( 'Switch on to enable back-order module.', 'shopbuilder' ),
1399 1289 ],
1400 - 'fields' => Fns::pro_version_notice( '1.3.0', 'general', 'Back-Order', false ),
1290 + 'fields' => Fns::pro_version_notice( '1.3.0' ),
1401 1291 ]
1402 1292 ),
1403 - 'sticky_add_to_cart' => apply_filters(
1293 + 'sticky_add_to_cart' => apply_filters(
1404 1294 'rtsb/module/sticky_add_to_cart/options',
1405 1295 [
1406 1296 'id' => 'sticky_add_to_cart',
1407 1297 'active' => '',
@@ -1410,365 +1300,88 @@
1410 1300 'active_field' => [
1411 1301 'label' => esc_html__( 'Enable Sticky Add-To-Cart?', 'shopbuilder' ),
1412 1302 'help' => esc_html__( 'Switch on to enable sticky add-to-cart module.', 'shopbuilder' ),
1413 1303 ],
1414 - 'fields' => Fns::pro_version_notice( '1.7.0', 'general', 'Sticky Add-To-Cart', false ),
1304 + 'fields' => Fns::pro_version_notice( '1.7.0' ),
1415 1305 ]
1416 1306 ),
1417 - 'smart_coupons' => apply_filters(
1418 - 'rtsb/module/smart_coupons/options',
1307 + 'shopify_checkout' => apply_filters(
1308 + 'rtsb/module/shopify_checkout/options',
1419 1309 [
1420 - 'id' => 'smart_coupons',
1310 + 'id' => 'shopify_checkout',
1421 1311 'active' => '',
1422 - 'title' => esc_html__( 'Smart Coupons', 'shopbuilder' ),
1423 - 'package' => $this->pro_package(),
1312 + 'title' => esc_html__( 'Shopify Checkout', 'shopbuilder' ),
1313 + 'base_class' => ShopifyCheckout::class,
1424 1314 'active_field' => [
1425 - 'label' => esc_html__( 'Enable Smart Coupons?', 'shopbuilder' ),
1426 - 'help' => esc_html__( 'Switch on to enable smart coupons module.', 'shopbuilder' ),
1315 + 'label' => esc_html__( 'Enable Shopify Checkout?', 'shopbuilder' ),
1316 + 'help' => esc_html__( 'Switch on to enable Shopify Checkout module.', 'shopbuilder' ),
1427 1317 ],
1428 - 'fields' => Fns::pro_version_notice( '1.10.0', 'general', 'ShopBuilder Pro', false ),
1429 - ]
1430 - ),
1431 - 'bulk_discounts' => apply_filters(
1432 - 'rtsb/module/bulk_discounts/options',
1433 - [
1434 - 'id' => 'bulk_discounts',
1435 - 'active' => '',
1436 - 'title' => esc_html__( 'Volume Discount', 'shopbuilder' ),
1437 - 'active_field' => [
1438 - 'label' => esc_html__( 'Enable Volume Discount?', 'shopbuilder' ),
1439 - 'help' => esc_html__( 'Switch on to enable volume discount module.', 'shopbuilder' ),
1440 - ],
1441 - 'package' => $this->pro_package(),
1442 - 'fields' => Fns::pro_version_notice( '1.10.0', 'general', 'ShopBuilder Pro', false ),
1443 - ]
1444 - ),
1445 - 'bogo_bxgy_free_gift_discounts' => apply_filters(
1446 - 'rtsb/module/bogo_bxgy_free_gift_discounts/options',
1447 - [
1448 - 'id' => 'bogo_bxgy_free_gift_discounts',
1449 - 'active' => '',
1450 - 'title' => esc_html__( 'Buy X Get Y | BOGO', 'shopbuilder' ),
1451 - 'active_field' => [
1452 - 'label' => esc_html__( 'Enable Buy X Get Y | BOGO?', 'shopbuilder' ),
1453 - 'help' => esc_html__( 'Switch on to enable Buy X Get Y | BOGO module.', 'shopbuilder' ),
1454 - ],
1455 - 'package' => $this->pro_package(),
1456 - 'fields' => Fns::pro_version_notice( '1.11.0', 'general', 'ShopBuilder Pro', false ),
1457 - ]
1458 - ),
1459 - 'partial_pay' => apply_filters(
1460 - 'rtsb/module/partial_pay/options',
1461 - [
1462 - 'id' => 'partial_pay',
1463 - 'active' => '',
1464 - 'title' => esc_html__( 'Partial Pay', 'shopbuilder' ),
1465 - 'active_field' => [
1466 - 'label' => esc_html__( 'Enable Partial Pay?', 'shopbuilder' ),
1467 - 'help' => esc_html__( 'Switch on to enable partial pay module.', 'shopbuilder' ),
1468 - ],
1469 - 'package' => $this->pro_package(),
1470 - 'fields' => Fns::pro_version_notice( '1.12.0', 'general', 'ShopBuilder Pro', false ),
1471 - ]
1472 - ),
1473 - 'gift_card' => apply_filters(
1474 - 'rtsb/module/gift_card/options',
1475 - [
1476 - 'id' => 'gift_card',
1477 - 'active' => '',
1478 - 'title' => esc_html__( 'Gift Card', 'shopbuilder' ),
1479 - 'active_field' => [
1480 - 'label' => esc_html__( 'Enable Gift Card?', 'shopbuilder' ),
1481 - 'help' => esc_html__( 'Switch on to enable Gift Card module.', 'shopbuilder' ),
1482 - ],
1483 - 'package' => $this->pro_package(),
1484 - 'fields' => Fns::pro_version_notice( '1.10.0' ),
1485 - ]
1486 - ),
1487 - 'pdf_invoice' => apply_filters(
1488 - 'rtsb/module/pdf_invoice/options',
1489 - [
1490 - 'id' => 'pdf_invoice',
1491 - 'active' => '',
1492 - 'title' => esc_html__( 'PDF Invoice', 'shopbuilder' ),
1493 - 'active_field' => [
1494 - 'label' => esc_html__( 'Enable PDF Invoice?', 'shopbuilder' ),
1495 - 'help' => esc_html__( 'Switch on to enable PDF Invoice module.', 'shopbuilder' ),
1496 - ],
1497 - 'package' => $this->pro_package(),
1498 - 'fields' => Fns::pro_version_notice( '2.1.0', 'general', 'ShopBuilder Pro', false ),
1499 - ]
1500 - ),
1501 - 'extended_cross_sell' => apply_filters(
1502 - 'rtsb/module/extended_cross_sell/options',
1503 - [
1504 - 'id' => 'extended_cross_sell',
1505 - 'active' => '',
1506 - 'title' => esc_html__( 'Extended Cross Sell', 'shopbuilder' ),
1507 - 'active_field' => [
1508 - 'label' => esc_html__( 'Enable Extended Cross Sell?', 'shopbuilder' ),
1509 - 'help' => esc_html__( 'Switch on to enable Extended Cross Sell.', 'shopbuilder' ),
1510 - ],
1511 - 'package' => $this->pro_package(),
1512 - 'fields' => Fns::pro_version_notice( '2.1.4', 'general', 'ShopBuilder Pro', false ),
1513 - ]
1514 - ),
1515 - 'abandoned_cart_recovery' => apply_filters(
1516 - 'rtsb/module/abandoned_cart_recovery/options',
1517 - [
1518 - 'id' => 'abandoned_cart_recovery',
1519 - 'active' => '',
1520 - 'badge' => 'new',
1521 - 'title' => esc_html__( 'Abandoned Cart Recovery', 'shopbuilder' ),
1522 - 'active_field' => [
1523 - 'label' => esc_html__( 'Enable Abandoned Cart Recovery?', 'shopbuilder' ),
1524 - 'help' => esc_html__( 'Cart will be considered abandoned if order is not completed in cut-off time.', 'shopbuilder' ),
1525 - ],
1526 - 'fields' => CartRecoveryOptions::get_cart_recovery_fields(),
1527 - 'base_class' => CartRecoveryInit::class,
1318 + 'fields' => $this->shopify_checkout_options(),
1528 1319 'tabs' => [
1529 - 'general' => [
1320 + 'general' => [
1530 1321 'title' => esc_html__( 'General', 'shopbuilder' ),
1531 1322 ],
1532 - 'emailTemplates' => [
1533 - 'title' => esc_html__( 'Email Templates', 'shopbuilder' ),
1323 + 'multi-step' => [
1324 + 'title' => esc_html__( 'Multi-Step', 'shopbuilder' ),
1534 1325 ],
1326 + 'styles' => [
1327 + 'title' => esc_html__( 'General Styles', 'shopbuilder' ),
1328 + ],
1329 + 'btn-styles' => [
1330 + 'title' => esc_html__( 'Button Styles', 'shopbuilder' ),
1331 + ],
1535 1332 ],
1536 1333 ]
1537 1334 ),
1538 - 'popup_builder' => apply_filters(
1539 - 'rtsb/module/popup_builder/options',
1335 + 'smart_coupons' => apply_filters(
1336 + 'rtsb/module/smart_coupons/options',
1540 1337 [
1541 - 'id' => 'popup_builder',
1338 + 'id' => 'smart_coupons',
1542 1339 'active' => '',
1543 - 'title' => esc_html__( 'Popup Builder', 'shopbuilder' ),
1544 - 'active_field' => [
1545 - 'label' => esc_html__( 'Enable Popup Builder?', 'shopbuilder' ),
1546 - 'help' => esc_html__( 'Switch on to enable Popup Builder.', 'shopbuilder' ),
1547 - ],
1340 + 'title' => esc_html__( 'Smart Coupons', 'shopbuilder' ),
1548 1341 'package' => $this->pro_package(),
1549 - 'fields' => Fns::pro_version_notice( '2.1.5', 'general', 'ShopBuilder Pro', false ),
1550 - ]
1551 - ),
1552 - 'save_for_buy_later' => apply_filters(
1553 - 'rtsb/module/save_for_buy_later/options',
1554 - [
1555 - 'id' => 'save_for_buy_later',
1556 - 'active' => '',
1557 - 'title' => esc_html__( 'Save Cart For Buy Later', 'shopbuilder' ),
1558 1342 'active_field' => [
1559 - 'label' => esc_html__( 'Enable Save Cart For Buy Later?', 'shopbuilder' ),
1560 - 'help' => esc_html__( 'Switch on to enable Save Cart For Buy Later.', 'shopbuilder' ),
1343 + 'label' => esc_html__( 'Enable Smart Coupons?', 'shopbuilder' ),
1344 + 'help' => esc_html__( 'Switch on to enable smart coupons module.', 'shopbuilder' ),
1561 1345 ],
1562 - 'package' => $this->pro_package(),
1563 - 'fields' => Fns::pro_version_notice( '2.1.8', 'general', 'ShopBuilder Pro', false ),
1346 + 'fields' => Fns::pro_version_notice( '1.10.0' ),
1564 1347 ]
1565 1348 ),
1566 - 'catalog_mode' => apply_filters(
1567 - 'rtsb/module/catalog_mode/options',
1349 + 'bulk_discounts' => apply_filters(
1350 + 'rtsb/module/bulk_discounts/options',
1568 1351 [
1569 - 'id' => 'catalog_mode',
1352 + 'id' => 'bulk_discounts',
1570 1353 'active' => '',
1571 - 'title' => esc_html__( 'Catalog Mode', 'shopbuilder' ),
1354 + 'title' => esc_html__( 'Bulk Discounts', 'shopbuilder' ),
1572 1355 'active_field' => [
1573 - 'label' => esc_html__( 'Enable Catalog Mode?', 'shopbuilder' ),
1574 - 'help' => esc_html__( 'Switch on to enable Catalog Mode.', 'shopbuilder' ),
1356 + 'label' => esc_html__( 'Enable Bulk Discount?', 'shopbuilder' ),
1357 + 'help' => esc_html__( 'Switch on to enable Discount Rules module.', 'shopbuilder' ),
1575 1358 ],
1576 1359 'package' => $this->pro_package(),
1577 - 'fields' => Fns::pro_version_notice( '2.1.9', 'general', 'ShopBuilder Pro', false ),
1360 + 'fields' => Fns::pro_version_notice( '1.10.0' ),
1578 1361 ]
1579 1362 ),
1580 - 'back_in_stock_notifier' => apply_filters(
1581 - 'rtsb/module/back_in_stock_notifier/options',
1363 + /*
1364 + 'bogo_bxgy_discounts' => apply_filters(
1365 + 'rtsb/module/bogo_bxgy_discounts/options',
1582 1366 [
1583 - 'id' => 'back_in_stock_notifier',
1367 + 'id' => 'bogo_bxgy_discounts',
1584 1368 'active' => '',
1585 - 'title' => esc_html__( 'Back In Stock Notifier', 'shopbuilder' ),
1369 + 'title' => esc_html__( 'BOGO And Buy X Get Y', 'shopbuilder' ),
1586 1370 'active_field' => [
1587 - 'label' => esc_html__( 'Enable Back In Stock Notifier?', 'shopbuilder' ),
1588 - 'help' => esc_html__( 'Switch on to enable Back In Stock Notifier.', 'shopbuilder' ),
1371 + 'label' => esc_html__( 'Enable Discount Rules?', 'shopbuilder' ),
1372 + 'help' => esc_html__( 'Switch on to enable Discount Rules module.', 'shopbuilder' ),
1589 1373 ],
1590 1374 'package' => $this->pro_package(),
1591 - 'fields' => Fns::pro_version_notice( '2.1.11', 'general', 'ShopBuilder Pro', false ),
1375 + 'fields' => Fns::pro_version_notice( '1.11.0' ),
1592 1376 ]
1593 1377 ),
1594 - 'mega_menu' => apply_filters(
1595 - 'rtsb/module/mega_menu/options',
1596 - [
1597 - 'id' => 'mega_menu',
1598 - 'active' => '',
1599 - 'title' => esc_html__( 'Mega Menu', 'shopbuilder' ),
1600 - 'active_field' => [
1601 - 'label' => esc_html__( 'Enable Mega Menu?', 'shopbuilder' ),
1602 - 'help' => esc_html__( 'Switch on to enable Mega Menu module.', 'shopbuilder' ),
1603 - ],
1604 - 'package' => $this->pro_package(),
1605 - 'fields' => Fns::pro_version_notice( '2.1.12', 'general', 'ShopBuilder Pro', false ),
1606 - ]
1607 - ),
1378 + */
1608 1379 ];
1609 - // Inject icons, descriptions and links per module.
1610 - $meta = self::module_meta();
1611 - foreach ( $list as $key => &$item ) {
1612 - if ( isset( $meta[ $key ] ) ) {
1613 - $item['icon'] = SvgIcons::get( $meta[ $key ]['icon'] ?? 'default' );
1614 - $item['description'] = $meta[ $key ]['desc'] ?? '';
1615 - } else {
1616 - $item['icon'] = SvgIcons::get( 'default' );
1617 - $item['description'] = '';
1618 - }
1619 - $item['links'] = [
1620 - 'doc' => '',
1621 - 'video' => '',
1622 - ];
1623 - }
1624 - unset( $item );
1625 -
1626 1380 return apply_filters( 'rtsb/core/modules/raw_list', $list );
1627 1381 }
1628 1382
1629 1383 /**
1630 - * Module icon and description metadata.
1631 - *
1632 - * @return array<string, array{icon: string, desc: string}>
1633 - */
1634 - private static function module_meta() {
1635 - return [
1636 - 'variation_swatches' => [
1637 - 'icon' => 'dots',
1638 - 'desc' => 'Replace dropdowns with color, image, label, or radio swatches.',
1639 - ],
1640 - 'variation_gallery' => [
1641 - 'icon' => 'image',
1642 - 'desc' => 'Show a unique product gallery for every variation.',
1643 - ],
1644 - 'quick_view' => [
1645 - 'icon' => 'eye',
1646 - 'desc' => 'Open a popup product preview from grids without a full page load.',
1647 - ],
1648 - 'wishlist' => [
1649 - 'icon' => 'heart',
1650 - 'desc' => 'Let customers save products to a wishlist they can revisit or share.',
1651 - ],
1652 - 'compare' => [
1653 - 'icon' => 'flip_box',
1654 - 'desc' => 'Side-by-side product attribute comparison with sticky header.',
1655 - ],
1656 - 'product_badges' => [
1657 - 'icon' => 'onsale',
1658 - 'desc' => 'Sale, new, featured, low-stock, and custom badges with rules.',
1659 - ],
1660 - 'checkout_fields_editor' => [
1661 - 'icon' => 'form',
1662 - 'desc' => 'Add, edit, reorder, or remove billing, shipping, and checkout fields.',
1663 - ],
1664 - 'shopify_checkout' => [
1665 - 'icon' => 'cart',
1666 - 'desc' => 'Single-page Shopify-style checkout with autofill and express pay.',
1667 - ],
1668 - 'mini_cart' => [
1669 - 'icon' => 'cart',
1670 - 'desc' => 'Sliding cart drawer with AJAX add-to-cart and quantity edits.',
1671 - ],
1672 - 'product_size_chart' => [
1673 - 'icon' => 'ruler',
1674 - 'desc' => 'Per-category size guides with units, conversion, and modal preview.',
1675 - ],
1676 - 'customize_my_account' => [
1677 - 'icon' => 'user',
1678 - 'desc' => 'Build the customer dashboard with custom tabs, fields, and layouts.',
1679 - ],
1680 - 'pre_order' => [
1681 - 'icon' => 'countdown',
1682 - 'desc' => 'Accept orders before launch with deposit and scheduled release.',
1683 - ],
1684 - 'currency_switcher' => [
1685 - 'icon' => 'currency',
1686 - 'desc' => 'Geo-detected switcher with live exchange rates and pricing rules.',
1687 - ],
1688 - 'product_add_ons' => [
1689 - 'icon' => 'grid',
1690 - 'desc' => 'Optional extras like gift wrap and warranties with conditional pricing.',
1691 - ],
1692 - 'sales_notification' => [
1693 - 'icon' => 'notification',
1694 - 'desc' => 'Real-time sales popups to create social proof and urgency.',
1695 - ],
1696 - 'flash_sale_countdown' => [
1697 - 'icon' => 'flash',
1698 - 'desc' => 'Scheduled flash sale countdown timers with auto-pricing.',
1699 - ],
1700 - 'quick_checkout' => [
1701 - 'icon' => 'checkout',
1702 - 'desc' => 'One-click checkout from product pages, skipping the cart.',
1703 - ],
1704 - 'multi_step_checkout' => [
1705 - 'icon' => 'multi_step',
1706 - 'desc' => 'Break checkout into guided steps with progress indicator.',
1707 - ],
1708 - 'back_order' => [
1709 - 'icon' => 'document',
1710 - 'desc' => 'Allow orders on out-of-stock products with availability dates.',
1711 - ],
1712 - 'sticky_add_to_cart' => [
1713 - 'icon' => 'button',
1714 - 'desc' => 'Sticky add-to-cart bar that follows the user on product pages.',
1715 - ],
1716 - 'smart_coupons' => [
1717 - 'icon' => 'discount',
1718 - 'desc' => 'Advanced coupon rules, URL coupons, and auto-apply conditions.',
1719 - ],
1720 - 'bulk_discounts' => [
1721 - 'icon' => 'pricing',
1722 - 'desc' => 'Tiered quantity-based pricing tables for bulk purchases.',
1723 - ],
1724 - 'bogo_bxgy_free_gift_discounts' => [
1725 - 'icon' => 'star',
1726 - 'desc' => 'Buy-one-get-one, buy-X-get-Y, and free gift promotions.',
1727 - ],
1728 - 'partial_pay' => [
1729 - 'icon' => 'payment',
1730 - 'desc' => 'Allow customers to pay in installments or deposits.',
1731 - ],
1732 - 'gift_card' => [
1733 - 'icon' => 'coupon',
1734 - 'desc' => 'Digital gift cards with email delivery and balance management.',
1735 - ],
1736 - 'pdf_invoice' => [
1737 - 'icon' => 'note',
1738 - 'desc' => 'Auto-generated PDF invoices and packing slips for orders.',
1739 - ],
1740 - 'extended_cross_sell' => [
1741 - 'icon' => 'grid',
1742 - 'desc' => 'Extended cross-sell recommendations across cart and checkout.',
1743 - ],
1744 - 'abandoned_cart_recovery' => [
1745 - 'icon' => 'cart',
1746 - 'desc' => 'Automated email nudges, discount triggers, and recovery analytics.',
1747 - ],
1748 - 'popup_builder' => [
1749 - 'icon' => 'popup',
1750 - 'desc' => 'Create promotional popups with triggers, targeting, and templates.',
1751 - ],
1752 - 'save_for_buy_later' => [
1753 - 'icon' => 'heart',
1754 - 'desc' => 'Save cart items for later purchase with one-click restore.',
1755 - ],
1756 - 'catalog_mode' => [
1757 - 'icon' => 'list',
1758 - 'desc' => 'Hide prices and add-to-cart buttons for catalog-only browsing.',
1759 - ],
1760 - 'back_in_stock_notifier' => [
1761 - 'icon' => 'notification',
1762 - 'desc' => 'Email notifications when out-of-stock products become available.',
1763 - ],
1764 - 'mega_menu' => [
1765 - 'icon' => 'grid',
1766 - 'desc' => 'Multi-column mega menus with widgets, images, and icons.',
1767 - ],
1768 - ];
1769 - }
1770 - /**
1771 1384 * Get All Menu
1772 1385 */
1773 1386 public function get_all_menu() {
1774 1387 $manus = [
@@ -1825,9 +1438,10 @@
1825 1438 // translators: %s for pro message.
1826 1439 __( 'Choose a cart icon to display in your checkout\'s header. <br />%s', 'shopbuilder' ),
1827 1440 ! rtsb()->has_pro()
1828 1441 ? sprintf(
1829 - '<a target="_blank" href="' . esc_url( rtsb()->pro_version_link() ) . '">%s </a> %s ',
1442 + '<a target="_blank" href="%s">%s </a> %s ',
1443 + esc_url( rtsb()->pro_version_link() ),
1830 1444 esc_html__( 'Upgrade to PRO', 'shopbuilder' ),
1831 1445 esc_html__( 'to unlock custom image icon.', 'shopbuilder' )
1832 1446 )
1833 1447 : ''
@@ -3050,179 +2664,8 @@
3050 2664 ],
3051 2665 ],
3052 2666 ],
3053 2667 ],
3054 - 'cart_button_styles_settings' => [
3055 - 'id' => 'cart_button_styles_settings',
3056 - 'type' => 'title',
3057 - 'tab' => 'styles',
3058 - 'label' => esc_html__( 'Cart Button Style', 'shopbuilder' ),
3059 - 'dependency' => [
3060 - 'rules' => [
3061 - [
3062 - 'item' => 'modules.shopify_checkout.cart_icon_source',
3063 - 'value' => 'select_icon',
3064 - 'operator' => '==',
3065 - ],
3066 - ],
3067 - ],
3068 - ],
3069 - 'cart_button_height' => [
3070 - 'id' => 'cart_button_height',
3071 - 'label' => esc_html__( 'Button Height (px)', 'shopbuilder' ),
3072 - 'type' => 'slider',
3073 - 'min' => 10,
3074 - 'max' => 200,
3075 - 'unit' => 'px',
3076 - 'tab' => 'styles',
3077 - 'dependency' => [
3078 - 'rules' => [
3079 - [
3080 - 'item' => 'modules.shopify_checkout.cart_icon_source',
3081 - 'value' => 'select_icon',
3082 - 'operator' => '==',
3083 - ],
3084 - ],
3085 - ],
3086 - ],
3087 - 'cart_button_width' => [
3088 - 'id' => 'cart_button_width',
3089 - 'label' => esc_html__( 'Button Width (px)', 'shopbuilder' ),
3090 - 'type' => 'slider',
3091 - 'min' => 10,
3092 - 'max' => 200,
3093 - 'unit' => 'px',
3094 - 'tab' => 'styles',
3095 - 'dependency' => [
3096 - 'rules' => [
3097 - [
3098 - 'item' => 'modules.shopify_checkout.cart_icon_source',
3099 - 'value' => 'select_icon',
3100 - 'operator' => '==',
3101 - ],
3102 - ],
3103 - ],
3104 - ],
3105 - 'cart_button_padding' => [
3106 - 'id' => 'cart_button_padding',
3107 - 'label' => esc_html__( 'Padding (px)', 'shopbuilder' ),
3108 - 'type' => 'slider',
3109 - 'min' => 0,
3110 - 'max' => 50,
3111 - 'unit' => 'px',
3112 - 'tab' => 'styles',
3113 - 'dependency' => [
3114 - 'rules' => [
3115 - [
3116 - 'item' => 'modules.shopify_checkout.cart_icon_source',
3117 - 'value' => 'select_icon',
3118 - 'operator' => '==',
3119 - ],
3120 - ],
3121 - ],
3122 - ],
3123 - 'cart_button_border_style' => [
3124 - 'id' => 'cart_button_border_style',
3125 - 'label' => esc_html__( 'Border Style', 'shopbuilder' ),
3126 - 'type' => 'select',
3127 - 'options' => [
3128 - 'none' => esc_html__( 'None', 'shopbuilder' ),
3129 - 'solid' => esc_html__( 'Solid', 'shopbuilder' ),
3130 - 'dashed' => esc_html__( 'Dashed', 'shopbuilder' ),
3131 - 'dotted' => esc_html__( 'Dotted', 'shopbuilder' ),
3132 - ],
3133 - 'tab' => 'styles',
3134 - 'dependency' => [
3135 - 'rules' => [
3136 - [
3137 - 'item' => 'modules.shopify_checkout.cart_icon_source',
3138 - 'value' => 'select_icon',
3139 - 'operator' => '==',
3140 - ],
3141 - ],
3142 - ],
3143 - ],
3144 - 'cart_button_border_width' => [
3145 - 'id' => 'cart_button_border_width',
3146 - 'label' => esc_html__( 'Border Width (px)', 'shopbuilder' ),
3147 - 'type' => 'slider',
3148 - 'min' => 0,
3149 - 'max' => 10,
3150 - 'unit' => 'px',
3151 - 'tab' => 'styles',
3152 - 'dependency' => [
3153 - 'rules' => [
3154 - [
3155 - 'item' => 'modules.shopify_checkout.cart_icon_source',
3156 - 'value' => 'select_icon',
3157 - 'operator' => '==',
3158 - ],
3159 - ],
3160 - ],
3161 - ],
3162 - 'cart_button_border_color' => [
3163 - 'id' => 'cart_button_border_color',
3164 - 'label' => esc_html__( 'Border Color', 'shopbuilder' ),
3165 - 'tab' => 'styles',
3166 - 'type' => 'color',
3167 - 'dependency' => [
3168 - 'rules' => [
3169 - [
3170 - 'item' => 'modules.shopify_checkout.cart_icon_source',
3171 - 'value' => 'select_icon',
3172 - 'operator' => '==',
3173 - ],
3174 - ],
3175 - ],
3176 - ],
3177 - 'cart_button_border_radius' => [
3178 - 'id' => 'cart_button_border_radius',
3179 - 'label' => esc_html__( 'Border Radius (px)', 'shopbuilder' ),
3180 - 'type' => 'slider',
3181 - 'min' => 0,
3182 - 'max' => 100,
3183 - 'unit' => 'px',
3184 - 'tab' => 'styles',
3185 - 'dependency' => [
3186 - 'rules' => [
3187 - [
3188 - 'item' => 'modules.shopify_checkout.cart_icon_source',
3189 - 'value' => 'select_icon',
3190 - 'operator' => '==',
3191 - ],
3192 - ],
3193 - ],
3194 - ],
3195 - 'cart_button_bg_color' => [
3196 - 'id' => 'cart_button_bg_color',
3197 - 'label' => esc_html__( 'Background Color', 'shopbuilder' ),
3198 - 'tab' => 'styles',
3199 - 'type' => 'color',
3200 - 'dependency' => [
3201 - 'rules' => [
3202 - [
3203 - 'item' => 'modules.shopify_checkout.cart_icon_source',
3204 - 'value' => 'select_icon',
3205 - 'operator' => '==',
3206 - ],
3207 - ],
3208 - ],
3209 - ],
3210 - 'cart_button_hover_bg_color' => [
3211 - 'id' => 'cart_button_hover_bg_color',
3212 - 'label' => esc_html__( 'Hover Background Color', 'shopbuilder' ),
3213 - 'tab' => 'styles',
3214 - 'type' => 'color',
3215 - 'dependency' => [
3216 - 'rules' => [
3217 - [
3218 - 'item' => 'modules.shopify_checkout.cart_icon_source',
3219 - 'value' => 'select_icon',
3220 - 'operator' => '==',
3221 - ],
3222 - ],
3223 - ],
3224 - ],
3225 2668 'footer_menu_styles_settings' => [
3226 2669 'id' => 'footer_menu_styles_settings',
3227 2670 'type' => 'title',
3228 2671 'tab' => 'styles',
@@ -3405,9 +2848,10 @@
3405 2848 // translators: %s for pro message.
3406 2849 esc_html__( 'Please choose the group display type. %s', 'shopbuilder' ),
3407 2850 ! rtsb()->has_pro()
3408 2851 ? sprintf(
3409 - '<a target="_blank" href="' . esc_url( rtsb()->pro_version_link() ) . '">%s </a> %s ',
2852 + '<a target="_blank" href="%s">%s </a> %s ',
2853 + esc_url( rtsb()->pro_version_link() ),
3410 2854 esc_html__( 'Upgrade to PRO', 'shopbuilder' ),
3411 2855 esc_html__( 'for vertical layout.', 'shopbuilder' )
3412 2856 )
3413 2857 : ''
@@ -3442,10 +2886,10 @@
3442 2886 'options' => [
3443 2887 'above_image' => esc_html__( 'Floating Above Image', 'shopbuilder' ),
3444 2888 'before_product_title' => esc_html__( 'Before Product Title', 'shopbuilder' ),
3445 2889 'after_product_title' => esc_html__( 'After Product Title', 'shopbuilder' ),
3446 - 'before_add_to_cart' => esc_html__( 'Above Add To Cart', 'shopbuilder' ),
3447 - 'after_add_to_cart' => esc_html__( 'Below Add To Cart', 'shopbuilder' ),
2890 + 'before_add_to_cart' => esc_html__( 'Before Add To Cart', 'shopbuilder' ),
2891 + 'after_add_to_cart' => esc_html__( 'After Add To Cart', 'shopbuilder' ),
3448 2892 'custom' => esc_html__( 'Custom Position', 'shopbuilder' ),
3449 2893 ],
3450 2894 'tab' => 'group',
3451 2895 ],
@@ -3468,8 +2912,25 @@
3468 2912 ],
3469 2913 ],
3470 2914 ],
3471 2915 ],
2916 + /*
2917 + 'loop_priority_note' => [
2918 + 'type' => 'raw',
2919 + 'label' => ' ',
2920 + 'html' => '<span style="color:red">' . esc_html__( 'If the badge position is incorrect or not displayed, please adjust the priority of hooks accordingly by increasing or decreasing them as necessary.', 'shopbuilder' ) . '</span>',
2921 + 'dependency' => [
2922 + 'rules' => [
2923 + [
2924 + 'item' => 'modules.product_badges.loop_group_position',
2925 + 'value' => 'above_image',
2926 + 'operator' => '!=',
2927 + ],
2928 + ],
2929 + ],
2930 + 'tab' => 'group',
2931 + ],
2932 + */
3472 2933 'group_position_hook_priority' => [
3473 2934 'id' => 'group_position_hook_priority',
3474 2935 'type' => 'number',
3475 2936 'size' => 'small',
@@ -3524,10 +2985,10 @@
3524 2985 'label' => esc_html__( 'Product Page Group Position', 'shopbuilder' ),
3525 2986 'help' => esc_html__( 'Choose the group badges position in product page.', 'shopbuilder' ),
3526 2987 'options' => [
3527 2988 'above_image' => esc_html__( 'Floating Above Image', 'shopbuilder' ),
3528 - 'before_add_to_cart' => esc_html__( 'Above Add To Cart', 'shopbuilder' ),
3529 - 'after_add_to_cart' => esc_html__( 'Below Add To Cart', 'shopbuilder' ),
2989 + 'before_add_to_cart' => esc_html__( 'Before Add To Cart', 'shopbuilder' ),
2990 + 'after_add_to_cart' => esc_html__( 'After Add To Cart', 'shopbuilder' ),
3530 2991 'after_summary' => esc_html__( 'After Summary', 'shopbuilder' ),
3531 2992 'after_short_desc' => esc_html__( 'After Short Description', 'shopbuilder' ),
3532 2993 'shortcode' => esc_html__( 'Use Shortcode', 'shopbuilder' ),
3533 2994 'custom' => esc_html__( 'Custom Position', 'shopbuilder' ),
@@ -3572,8 +3033,25 @@
3572 3033 ],
3573 3034 ],
3574 3035 ],
3575 3036 ],
3037 + /*
3038 + 'product_page_priority_note' => [
3039 + 'type' => 'raw',
3040 + 'label' => ' ',
3041 + 'html' => '<span style="color:red">' . esc_html__( 'If the badge position is incorrect or not displayed, please adjust the priority of hooks accordingly by increasing or decreasing them as necessary.', 'shopbuilder' ) . '</span>',
3042 + 'dependency' => [
3043 + 'rules' => [
3044 + [
3045 + 'item' => 'modules.product_badges.product_page_group_position',
3046 + 'value' => [ 'above_image', 'shortcode' ],
3047 + 'operator' => '!in',
3048 + ],
3049 + ],
3050 + ],
3051 + 'tab' => 'group',
3052 + ],
3053 + */
3576 3054 'product_page_group_hook_priority' => [
3577 3055 'id' => 'product_page_group_hook_priority',
3578 3056 'type' => 'number',
3579 3057 'size' => 'small',
@@ -3627,8 +3105,9 @@
3627 3105 'type' => 'repeaters',
3628 3106 'label' => '',
3629 3107 'tab' => 'badges',
3630 3108 'repeat' => [
3109 +
3631 3110 'title' => [
3632 3111 'id' => 'title',
3633 3112 'label' => esc_html__( 'Badge Name', 'shopbuilder' ),
3634 3113 'help' => esc_html__( 'Enter badge name.', 'shopbuilder' ),
@@ -3646,9 +3125,10 @@
3646 3125 // translators: %s for pro message.
3647 3126 esc_html__( 'Select badge type. %s', 'shopbuilder' ),
3648 3127 ! rtsb()->has_pro()
3649 3128 ? sprintf(
3650 - '<a target="_blank" href="' . esc_url( rtsb()->pro_version_link() ) . '">%s</a> %s',
3129 + '<a target="_blank" href="%s">%s</a> %s',
3130 + esc_url( rtsb()->pro_version_link() ),
3651 3131 esc_html__( 'Upgrade to PRO', 'shopbuilder' ),
3652 3132 esc_html__( 'unlock custom badge creation.', 'shopbuilder' )
3653 3133 )
3654 3134 : ''
@@ -3740,9 +3220,10 @@
3740 3220 // translators: %s for pro message.
3741 3221 esc_html__( 'Specify the badge display as Image Or Text. %s', 'shopbuilder' ),
3742 3222 ! rtsb()->has_pro()
3743 3223 ? sprintf(
3744 - '<a target="_blank" href="' . esc_url( rtsb()->pro_version_link() ) . '">%s</a> %s',
3224 + '<a target="_blank" href="%s">%s</a> %s',
3225 + esc_url( rtsb()->pro_version_link() ),
3745 3226 esc_html__( 'Upgrade to PRO', 'shopbuilder' ),
3746 3227 esc_html__( 'unlock Image badge creation.', 'shopbuilder' )
3747 3228 )
3748 3229 : ''
@@ -3809,8 +3290,9 @@
3809 3290 ],
3810 3291 'show_badges_percent_text' => [
3811 3292 'id' => 'show_badges_percent_text',
3812 3293 'type' => 'switch',
3294 + // 'isPro' => ! rtsb()->has_pro(),
3813 3295 'label' => esc_html__( 'Show Badges Percentage (%)', 'shopbuilder' ),
3814 3296 'help' => esc_html__( 'Switch on to show badge as dynamic percentage instead of text.', 'shopbuilder' ),
3815 3297 'dependency' => [
3816 3298 'rules' => [
@@ -4117,856 +3599,6 @@
4117 3599 $items['pre_order'] = esc_html__( 'Pre-Order Products', 'shopbuilder' );
4118 3600 }
4119 3601
4120 3602 return $items;
4121 - }
4122 - /**
4123 - * @return array
4124 - */
4125 - public function get_variation_swatches_fields() {
4126 - return apply_filters(
4127 - 'rtsb/module/variation_swatches/fields',
4128 - [
4129 - 'show_tooltip' => [
4130 - 'id' => 'show_tooltip',
4131 - 'value' => 'on',
4132 - 'type' => 'switch',
4133 - 'label' => esc_html__( 'Enable Tooltip', 'shopbuilder' ),
4134 - 'help' => esc_html__( 'Enable / Disable plugin default tooltip on each product attribute.', 'shopbuilder' ),
4135 - 'tab' => 'general',
4136 - ],
4137 - 'shape_style_checkmark' => [
4138 - 'id' => 'shape_style_checkmark',
4139 - 'type' => 'switch',
4140 - 'isPro' => ! rtsb()->has_pro(),
4141 - 'default' => false,
4142 - 'label' => esc_html__( 'Checkmark Selected Term ', 'shopbuilder' ),
4143 - 'help' => esc_html__( 'Shape style will add checkmark icon. Note: This option will not be applied to radio attributes.', 'shopbuilder' ),
4144 - 'tab' => 'general',
4145 - ],
4146 - 'default_dropdown_convert' => [
4147 - 'id' => 'default_dropdown_convert',
4148 - 'label' => esc_html__( 'Default Dropdown Convert', 'shopbuilder' ),
4149 - 'help' => esc_html__( 'Dropdown Convert To Button Or Image', 'shopbuilder' ),
4150 - 'isPro' => ! rtsb()->has_pro(),
4151 - 'type' => 'select',
4152 - 'value' => 'button',
4153 - 'options' => [
4154 - 'select' => esc_html__( 'Select ( Default, Not Convert )', 'shopbuilder' ),
4155 - 'button' => esc_html__( 'Button', 'shopbuilder' ),
4156 - 'image' => esc_html__( 'Image', 'shopbuilder' ),
4157 - ],
4158 - 'tab' => 'general',
4159 - ],
4160 - 'show_term_name_beside_label' => [
4161 - 'id' => 'show_term_name_beside_label',
4162 - 'type' => 'switch',
4163 - 'isPro' => ! rtsb()->has_pro(),
4164 - 'default' => false,
4165 - 'label' => esc_html__( 'Show Selected Term Name', 'shopbuilder' ),
4166 - 'help' => esc_html__( 'Displays the selected attribute value next to its label (e.g. "Color: Red").', 'shopbuilder' ),
4167 - 'tab' => 'general',
4168 - ],
4169 - 'disabled_attribute_behavior' => [
4170 - 'id' => 'disabled_attribute_behavior',
4171 - 'label' => esc_html__( 'Disabled Attribute behavior', 'shopbuilder' ),
4172 - 'help' => esc_html__( 'Disabled attribute will be hide / blur.', 'shopbuilder' ) . ' <span>' . __( ' Note: This feature will be operational for variation quantities below the "Ajax variation threshold.', 'shopbuilder' ) . '</span>',
4173 - 'type' => 'select',
4174 - 'value' => 'blur-cross',
4175 - 'options' => [
4176 - 'blur-cross' => esc_html__( 'Blur And Cross', 'shopbuilder' ),
4177 - 'blur-no-cross' => esc_html__( 'Only Blur', 'shopbuilder' ),
4178 - 'hide' => esc_html__( 'Hide', 'shopbuilder' ),
4179 - ],
4180 - 'tab' => 'general',
4181 - ],
4182 - 'attr_display_limit' => [
4183 - 'id' => 'attr_display_limit',
4184 - 'type' => 'number',
4185 - 'isPro' => ! rtsb()->has_pro(),
4186 - 'value' => 0,
4187 - 'size' => 'small',
4188 - 'min' => 0,
4189 - 'max' => 999,
4190 - 'label' => esc_html__( 'Product Page Attribute display limit', 'shopbuilder' ),
4191 - 'help' => esc_html__( 'Catalog mode attribute display limit. Default is 0. Means no limit.', 'shopbuilder' ),
4192 - 'tab' => 'general',
4193 - ],
4194 - 'attribute_image_size' => [
4195 - 'id' => 'attribute_image_size',
4196 - 'label' => esc_html__( 'Attribute image size', 'shopbuilder' ),
4197 - 'help' => __( 'Choose attribute image size.', 'shopbuilder' ) . '<a target="_blank" href="' . esc_url( admin_url( 'options-media.php' ) ) . '"> ' . __( 'Media Settings', 'shopbuilder' ) . '</a>',
4198 - 'type' => 'select',
4199 - 'value' => 'thumbnail',
4200 - 'options' => Fns::get_image_sizes(),
4201 - 'tab' => 'general',
4202 - ],
4203 -
4204 - 'tooltip_title' => [
4205 - 'id' => 'tooltip_title',
4206 - 'type' => 'title',
4207 - 'label' => esc_html__( 'Tooltip Options', 'shopbuilder' ),
4208 - 'help' => esc_html__( 'Tooltip settings for single page and catalog mode on shop / archive pages', 'shopbuilder' ),
4209 - 'tab' => 'general',
4210 - 'dependency' => [
4211 - 'rules' => [
4212 - [
4213 - 'item' => 'modules.variation_swatches.show_tooltip',
4214 - 'value' => 'on',
4215 - 'operator' => '==',
4216 - ],
4217 - ],
4218 - ],
4219 - ],
4220 - 'tooltip_image_size' => [
4221 - 'id' => 'tooltip_image_size',
4222 - 'label' => esc_html__( 'Tooltip image size', 'shopbuilder' ),
4223 - 'help' => __( 'Choose Tooltip image size.', 'shopbuilder' ) . '<a target="_blank" href="' . esc_url( admin_url( 'options-media.php' ) ) . '"> ' . __( 'Media Settings', 'shopbuilder' ) . '</a>',
4224 - 'type' => 'select',
4225 - 'isPro' => ! rtsb()->has_pro(),
4226 - 'value' => 'thumbnail',
4227 - 'options' => Fns::get_image_sizes(),
4228 - 'tab' => 'general',
4229 - 'dependency' => [
4230 - 'rules' => [
4231 - [
4232 - 'item' => 'modules.variation_swatches.show_tooltip',
4233 - 'value' => 'on',
4234 - 'operator' => '==',
4235 - ],
4236 - ],
4237 - ],
4238 - ],
4239 - 'advanced_title' => [
4240 - 'id' => 'advanced_title',
4241 - 'type' => 'title',
4242 - 'label' => esc_html__( 'Advanced', 'shopbuilder' ),
4243 - 'tab' => 'general',
4244 - ],
4245 - 'disable_out_of_stock' => [
4246 - 'id' => 'disable_out_of_stock',
4247 - 'type' => 'switch',
4248 - 'default' => true,
4249 - 'label' => esc_html__( 'Disable Out of Stock', 'shopbuilder' ),
4250 - 'help' => __( 'Disable out of stock variation attribute items.', 'shopbuilder' ),
4251 - 'tab' => 'general',
4252 - ],
4253 -
4254 - 'enable_variation_url' => [
4255 - 'id' => 'enable_variation_url',
4256 - 'type' => 'switch',
4257 - 'default' => false,
4258 - 'isPro' => ! rtsb()->has_pro(),
4259 - 'label' => esc_html__( 'Variation URL', 'shopbuilder' ),
4260 - 'help' => esc_html__( 'Generate a URL based on the selected variation attributes.', 'shopbuilder' ),
4261 - 'tab' => 'general',
4262 - ],
4263 - 'enable_showcase_swatches' => [
4264 - 'id' => 'enable_showcase_swatches',
4265 - 'type' => 'switch',
4266 - 'default' => false,
4267 - 'isPro' => ! rtsb()->has_pro(),
4268 - 'label' => esc_html__( 'Enable Swatches', 'shopbuilder' ),
4269 - 'help' => esc_html__( 'Show swatches on archive / shop page.', 'shopbuilder' ),
4270 - 'tab' => 'showcase_shop',
4271 - ],
4272 - 'showcase_product_wrapper_selector' => [
4273 - 'id' => 'showcase_product_wrapper_selector',
4274 - 'type' => 'text',
4275 - 'isPro' => ! rtsb()->has_pro(),
4276 - 'label' => esc_html__( 'Product Wrapper Selector', 'shopbuilder' ),
4277 - 'help' => esc_html__( 'Archive product Wrapper Selector (.rtwpvs-product,.tmb-woocommerce)', 'shopbuilder' ),
4278 - 'value' => '.rtsb-vs-product,.product-item',
4279 - 'dependency' => [
4280 - 'rules' => [
4281 - [
4282 - 'item' => 'modules.variation_swatches.enable_showcase_swatches',
4283 - 'value' => 'on',
4284 - 'operator' => '==',
4285 - ],
4286 - ],
4287 - ],
4288 - 'tab' => 'showcase_shop',
4289 - ],
4290 - 'showcase_swatches_image_selector' => [
4291 - 'id' => 'showcase_swatches_image_selector',
4292 - 'type' => 'text',
4293 - 'isPro' => ! rtsb()->has_pro(),
4294 - 'label' => esc_html__( 'Image Selector', 'shopbuilder' ),
4295 - 'help' => esc_html__( 'Archive product image selector to show variation image. You can also use multiple selectors separated by comma (.attachment-woocommerce_thumbnail, .wp-post-image) ', 'shopbuilder' ),
4296 - 'value' => '.wp-post-image, .attachment-woocommerce_thumbnail, .rtsb-product-image',
4297 - 'dependency' => [
4298 - 'rules' => [
4299 - [
4300 - 'item' => 'modules.variation_swatches.enable_showcase_swatches',
4301 - 'value' => 'on',
4302 - 'operator' => '==',
4303 - ],
4304 - ],
4305 - ],
4306 - 'tab' => 'showcase_shop',
4307 - ],
4308 - 'showcase_image_size' => [
4309 - 'id' => 'showcase_image_size',
4310 - 'label' => esc_html__( 'Showcase Image Size', 'shopbuilder' ),
4311 - 'help' => __( 'Choose showcase variation image size.', 'shopbuilder' ) ,
4312 - 'type' => 'select',
4313 - 'isPro' => ! rtsb()->has_pro(),
4314 - 'value' => 'woocommerce_thumbnail',
4315 - 'options' => array_diff_key( Fns::get_image_sizes(), [ 'rtsb_custom' => '' ] ),
4316 - 'dependency' => [
4317 - 'rules' => [
4318 - [
4319 - 'item' => 'modules.variation_swatches.enable_showcase_swatches',
4320 - 'value' => 'on',
4321 - 'operator' => '==',
4322 - ],
4323 - ],
4324 - ],
4325 - 'tab' => 'showcase_shop',
4326 - ],
4327 - 'showcase_swatches_position' => [
4328 - 'id' => 'showcase_swatches_position',
4329 - 'label' => esc_html__( 'Swatches Position', 'shopbuilder' ),
4330 - 'help' => esc_html__( 'Display showcase swatches in a specific position.', 'shopbuilder' ) . '<br/>' . __( 'Note: Some themes remove or override default WooCommerce hooks. If the swatches do not appear as expected, you may need to manually set a custom position.', 'shopbuilder' ),
4331 - 'isPro' => ! rtsb()->has_pro(),
4332 - 'type' => 'select',
4333 - 'value' => 'before_add_to_cart',
4334 - 'options' => apply_filters(
4335 - 'rtsb_showcase_swatches_positions',
4336 - [
4337 - 'custom_hook' => esc_html__( 'Custom Hook', 'shopbuilder' ),
4338 - 'before_add_to_cart' => esc_html__( 'Above Add To Cart', 'shopbuilder' ),
4339 - 'after_add_to_cart' => esc_html__( 'Below Add To Cart', 'shopbuilder' ),
4340 - ]
4341 - ),
4342 - 'dependency' => [
4343 - 'rules' => [
4344 - [
4345 - 'item' => 'modules.variation_swatches.enable_showcase_swatches',
4346 - 'value' => 'on',
4347 - 'operator' => '==',
4348 - ],
4349 - ],
4350 - ],
4351 - 'tab' => 'showcase_shop',
4352 - ],
4353 - 'custom_hook_name' => [
4354 - 'type' => 'description',
4355 - 'text' => sprintf(
4356 - /* translators: 1: The shortcode.*/
4357 - esc_html__( 'Copy the php code %1$s and paste it in your product query where you want to show the button.', 'shopbuilder' ),
4358 - "<code style='padding: 5px' >&lt;?php do_action( 'rtsb/vs/showcase/variation' ); ?&gt;</code>"
4359 - ),
4360 - 'id' => 'custom_hook_name',
4361 - 'tab' => 'showcase_shop',
4362 - 'dependency' => [
4363 - 'rules' => [
4364 - [
4365 - 'item' => 'modules.variation_swatches.enable_showcase_swatches',
4366 - 'value' => 'on',
4367 - 'operator' => '==',
4368 - ],
4369 - [
4370 - 'item' => 'modules.variation_swatches.showcase_swatches_position',
4371 - 'value' => 'custom_hook',
4372 - 'operator' => '==',
4373 - ],
4374 - ],
4375 - ],
4376 - ],
4377 - 'showcase_swatches_align' => [
4378 - 'id' => 'showcase_swatches_align',
4379 - 'label' => esc_html__( 'Swatches Align', 'shopbuilder' ),
4380 - 'help' => esc_html__( 'Swatches align on archive page.', 'shopbuilder' ),
4381 - 'isPro' => ! rtsb()->has_pro(),
4382 - 'type' => 'select',
4383 - 'value' => 'left',
4384 - 'options' => apply_filters(
4385 - 'rtsb_get_showcase_swatches_aligns',
4386 - [
4387 - 'left' => esc_html__( 'Left', 'shopbuilder' ),
4388 - 'right' => esc_html__( 'Right', 'shopbuilder' ),
4389 - 'center' => esc_html__( 'Center', 'shopbuilder' ),
4390 - ]
4391 - ),
4392 - 'dependency' => [
4393 - 'rules' => [
4394 - [
4395 - 'item' => 'modules.variation_swatches.enable_showcase_swatches',
4396 - 'value' => 'on',
4397 - 'operator' => '==',
4398 - ],
4399 - ],
4400 - ],
4401 - 'tab' => 'showcase_shop',
4402 - ],
4403 -
4404 - 'show_clear_on_showcase' => [
4405 - 'id' => 'show_clear_on_showcase',
4406 - 'isPro' => ! rtsb()->has_pro(),
4407 - 'type' => 'switch',
4408 - 'label' => esc_html__( 'Show clear link', 'shopbuilder' ),
4409 - 'help' => esc_html__( 'Show clear link on archive, shop page, any other showcase.', 'shopbuilder' ),
4410 - 'dependency' => [
4411 - 'rules' => [
4412 - [
4413 - 'item' => 'modules.variation_swatches.enable_showcase_swatches',
4414 - 'value' => 'on',
4415 - 'operator' => '==',
4416 - ],
4417 - ],
4418 - ],
4419 - 'tab' => 'showcase_shop',
4420 - ],
4421 - 'showcase_special_attribute_title' => [
4422 - 'id' => 'showcase_special_attribute_title',
4423 - 'type' => 'title',
4424 - 'label' => esc_html__( 'Special Attribute', 'shopbuilder' ),
4425 - 'tab' => 'showcase_shop',
4426 - ],
4427 - 'showcase_single_attribute' => [
4428 - 'id' => 'showcase_single_attribute',
4429 - 'isPro' => ! rtsb()->has_pro(),
4430 - 'type' => 'switch',
4431 - 'label' => esc_html__( 'Show Single Attribute', 'shopbuilder' ),
4432 - 'help' => esc_html__( 'Show single attribute taxonomies on archive page.', 'shopbuilder' ),
4433 - 'tab' => 'showcase_shop',
4434 - ],
4435 - 'chose_showcase_single_attribute' => [
4436 - 'id' => 'chose_showcase_single_attribute',
4437 - 'label' => esc_html__( 'Chose Attribute', 'shopbuilder' ),
4438 - 'help' => esc_html__( 'Choose an attribute to show on catalog mode', 'shopbuilder' ),
4439 - 'isPro' => ! rtsb()->has_pro(),
4440 - 'type' => 'select',
4441 - 'options' => SwatchesFns::get_wc_attributes( esc_html__( ' - Choose Attribute - ', 'shopbuilder' ) ),
4442 - 'dependency' => [
4443 - 'rules' => [
4444 - [
4445 - 'item' => 'modules.variation_swatches.showcase_single_attribute',
4446 - 'value' => 'on',
4447 - 'operator' => '==',
4448 - ],
4449 - ],
4450 - ],
4451 - 'tab' => 'showcase_shop',
4452 - ],
4453 -
4454 - 'showcase_swatches_display_event' => [
4455 - 'id' => 'showcase_swatches_display_event',
4456 - 'label' => esc_html__( 'Catalog Mode Display Event', 'shopbuilder' ),
4457 - 'help' => esc_html__( 'Show catalog mode image display event.', 'shopbuilder' ),
4458 - 'isPro' => ! rtsb()->has_pro(),
4459 - 'type' => 'select',
4460 - 'value' => 'click',
4461 - 'options' => [
4462 - 'click' => esc_html__( 'on Click', 'shopbuilder' ),
4463 - 'hover' => esc_html__( 'on Hover', 'shopbuilder' ),
4464 - ],
4465 - 'dependency' => [
4466 - 'rules' => [
4467 - [
4468 - 'item' => 'modules.variation_swatches.enable_showcase_swatches',
4469 - 'value' => 'on',
4470 - 'operator' => '==',
4471 - ],
4472 - ],
4473 - ],
4474 - 'tab' => 'showcase_shop',
4475 - ],
4476 -
4477 - 'showcase_swatches_display_limit' => [
4478 - 'id' => 'showcase_swatches_display_limit',
4479 - 'type' => 'number',
4480 - 'isPro' => ! rtsb()->has_pro(),
4481 - 'value' => 0,
4482 - 'size' => 'small',
4483 - 'min' => 0,
4484 - 'max' => 999,
4485 - 'label' => esc_html__( 'Attribute display limit', 'shopbuilder' ),
4486 - 'help' => esc_html__( 'Catalog mode attribute display limit. Default is 0. Means no limit.', 'shopbuilder' ),
4487 - 'dependency' => [
4488 - 'rules' => [
4489 - [
4490 - 'item' => 'modules.variation_swatches.enable_showcase_swatches',
4491 - 'value' => 'on',
4492 - 'operator' => '==',
4493 - ],
4494 - ],
4495 - ],
4496 - 'tab' => 'showcase_shop',
4497 - ],
4498 - 'checkmark_size' => [
4499 - 'id' => 'checkmark_size',
4500 - 'type' => 'title',
4501 - 'label' => esc_html__( 'Checkmark', 'shopbuilder' ),
4502 - 'tab' => 'style',
4503 - ],
4504 - 'checkmark_bg_color' => [
4505 - 'id' => 'checkmark_bg_color',
4506 - 'label' => esc_html__( 'Checkmark Background Color', 'shopbuilder' ),
4507 - 'isPro' => ! rtsb()->has_pro(),
4508 - 'type' => 'color',
4509 - 'value' => '#333333',
4510 - 'tab' => 'style',
4511 - ],
4512 - 'attribute_checkmark_width' => [
4513 - 'id' => 'attribute_checkmark_width',
4514 - 'label' => esc_html__( 'Checkmark Width', 'shopbuilder' ),
4515 - 'isPro' => ! rtsb()->has_pro(),
4516 - 'help' => esc_html__( 'Set the width (in px) for selected attribute checkmark,', 'shopbuilder' ),
4517 - 'type' => 'slider',
4518 - 'min' => 15,
4519 - 'max' => 200,
4520 - 'unit' => 'px',
4521 - 'value' => 18,
4522 - 'tab' => 'style',
4523 - ],
4524 - 'attribute_checkmark_height' => [
4525 - 'id' => 'attribute_checkmark_height',
4526 - 'label' => esc_html__( 'Checkmark Height', 'shopbuilder' ),
4527 - 'isPro' => ! rtsb()->has_pro(),
4528 - 'help' => esc_html__( 'Set the height (in px) for selected attribute checkmark,', 'shopbuilder' ),
4529 - 'type' => 'slider',
4530 - 'min' => 15,
4531 - 'max' => 200,
4532 - 'unit' => 'px',
4533 - 'value' => 18,
4534 - 'tab' => 'style',
4535 - ],
4536 - 'attribute_checkmark_icon_size' => [
4537 - 'id' => 'attribute_checkmark_icon_size',
4538 - 'isPro' => ! rtsb()->has_pro(),
4539 - 'label' => esc_html__( 'Checkmark Icon Size', 'shopbuilder' ),
4540 - 'help' => esc_html__( 'Checkmark Icon Size.', 'shopbuilder' ),
4541 - 'type' => 'slider',
4542 - 'min' => 10,
4543 - 'max' => 30,
4544 - 'unit' => 'px',
4545 - 'value' => 13,
4546 - 'tab' => 'style',
4547 - ],
4548 - 'attribute_style' => [
4549 - 'id' => 'attribute_style',
4550 - 'type' => 'title',
4551 - 'label' => esc_html__( 'Attribute Style', 'shopbuilder' ),
4552 - 'tab' => 'style',
4553 - ],
4554 - 'attribute_border_color' => [
4555 - 'id' => 'attribute_border_color',
4556 - 'label' => esc_html__( 'Attribute Border Color', 'shopbuilder' ),
4557 - 'type' => 'color',
4558 - 'value' => '#D1D5DB',
4559 - 'tab' => 'style',
4560 - ],
4561 - 'attribute_border_color_hover' => [
4562 - 'id' => 'attribute_border_color_hover',
4563 - 'label' => esc_html__( 'Attribute Border Color Hover/Active', 'shopbuilder' ),
4564 - 'type' => 'color',
4565 - 'value' => '#333333',
4566 - 'tab' => 'style',
4567 - ],
4568 - 'attribute_border_radius' => [
4569 - 'id' => 'attribute_border_radius',
4570 - 'label' => esc_html__( 'Attribute Border Radius', 'shopbuilder' ),
4571 - 'isPro' => ! rtsb()->has_pro(),
4572 - 'help' => esc_html__( 'Set the border radius (in px) for attribute items. Use a small value for squared corners or a large value (e.g. 100+) for fully rounded / circular swatches.', 'shopbuilder' ),
4573 - 'type' => 'slider',
4574 - 'min' => 0,
4575 - 'max' => 200,
4576 - 'unit' => 'px',
4577 - 'value' => 4,
4578 - 'tab' => 'style',
4579 - ],
4580 - 'details_page_attribute_size' => [
4581 - 'id' => 'details_page_attribute_size',
4582 - 'type' => 'title',
4583 - 'label' => esc_html__( 'Details Page Attributes', 'shopbuilder' ),
4584 - 'tab' => 'style',
4585 - ],
4586 - 'details_page_attr_label_color' => [
4587 - 'id' => 'details_page_attr_label_color',
4588 - 'label' => esc_html__( 'Product Page Attribute Label Color', 'shopbuilder' ),
4589 - 'type' => 'color',
4590 - 'value' => '#333333',
4591 - 'tab' => 'style',
4592 - ],
4593 - 'details_page_attr_label_font_size' => [
4594 - 'id' => 'details_page_attr_label_font_size',
4595 - 'label' => esc_html__( 'Product Page Attribute Label Font Size', 'shopbuilder' ),
4596 - 'type' => 'slider',
4597 - 'min' => 8,
4598 - 'max' => 50,
4599 - 'unit' => 'px',
4600 - 'value' => 16,
4601 - 'tab' => 'style',
4602 - ],
4603 - 'details_page_attribute_width' => [
4604 - 'id' => 'details_page_attribute_width',
4605 - 'label' => esc_html__( 'Variation Item Width', 'shopbuilder' ),
4606 - 'help' => esc_html__( 'Set the width (in px) for each variation attribute option, Note: This option will not be applied to radio and button attributes.', 'shopbuilder' ),
4607 - 'type' => 'slider',
4608 - 'min' => 10,
4609 - 'max' => 150,
4610 - 'unit' => 'px',
4611 - 'value' => 30,
4612 - 'tab' => 'style',
4613 - ],
4614 - 'details_page_attribute_height' => [
4615 - 'id' => 'details_page_attribute_height',
4616 - 'label' => esc_html__( 'Variation Item Height', 'shopbuilder' ),
4617 - 'help' => esc_html__( 'Set the height (in px) for each variation attribute option, Note: This option will not be applied to radio attributes.', 'shopbuilder' ),
4618 - 'type' => 'slider',
4619 - 'min' => 10,
4620 - 'max' => 150,
4621 - 'unit' => 'px',
4622 - 'value' => 30,
4623 - 'tab' => 'style',
4624 - ],
4625 - 'details_page_attribute_font_size' => [
4626 - 'id' => 'details_page_attribute_font_size',
4627 - 'label' => esc_html__( 'Variation Item Font Size', 'shopbuilder' ),
4628 - 'help' => esc_html__( 'Set the font size (in px) for text within variation attribute options, such as labels on buttons.', 'shopbuilder' ),
4629 - 'type' => 'slider',
4630 - 'min' => 8,
4631 - 'max' => 30,
4632 - 'unit' => 'px',
4633 - 'value' => 16,
4634 - 'tab' => 'style',
4635 - ],
4636 - 'details_page_radio_size' => [
4637 - 'id' => 'details_page_radio_size',
4638 - 'label' => esc_html__( 'Radio Attribute Size', 'shopbuilder' ),
4639 - 'help' => esc_html__( 'Set the size (in px) for radio-button variation attributes. Independent from the Variation Item Width/Height settings.', 'shopbuilder' ),
4640 - 'type' => 'slider',
4641 - 'min' => 10,
4642 - 'max' => 80,
4643 - 'unit' => 'px',
4644 - 'value' => 25,
4645 - 'tab' => 'style',
4646 - ],
4647 - 'showcase_attribute_size' => [
4648 - 'id' => 'showcase_attribute_size',
4649 - 'type' => 'title',
4650 - 'label' => esc_html__( 'Shop Page / Product Showcase Attributes Size', 'shopbuilder' ),
4651 - 'tab' => 'style',
4652 - ],
4653 - 'showcase_attribute_width' => [
4654 - 'id' => 'showcase_attribute_width',
4655 - 'label' => esc_html__( 'Variation Item Width', 'shopbuilder' ),
4656 - 'help' => esc_html__( 'Set the width (in px) for each variation attribute option, Note: This option will not be applied to radio and button attributes.', 'shopbuilder' ),
4657 - 'type' => 'slider',
4658 - 'min' => 10,
4659 - 'max' => 200,
4660 - 'unit' => 'px',
4661 - 'value' => 30,
4662 - 'tab' => 'style',
4663 - ],
4664 - 'showcase_attribute_height' => [
4665 - 'id' => 'showcase_attribute_height',
4666 - 'label' => esc_html__( 'Variation Item Height', 'shopbuilder' ),
4667 - 'help' => esc_html__( 'Set the height (in px) for each variation attribute option, Note: This option will not be applied to radio and button attributes.', 'shopbuilder' ),
4668 - 'type' => 'slider',
4669 - 'min' => 10,
4670 - 'max' => 200,
4671 - 'unit' => 'px',
4672 - 'value' => 30,
4673 - 'tab' => 'style',
4674 - ],
4675 - 'showcase_attribute_font_size' => [
4676 - 'id' => 'showcase_attribute_font_size',
4677 - 'label' => esc_html__( 'Variation Item Font Size', 'shopbuilder' ),
4678 - 'help' => esc_html__( 'Set the font size (in px) for text within variation attribute options, such as labels on buttons.', 'shopbuilder' ),
4679 - 'type' => 'slider',
4680 - 'min' => 8,
4681 - 'max' => 30,
4682 - 'unit' => 'px',
4683 - 'value' => 16,
4684 - 'tab' => 'style',
4685 - ],
4686 - 'showcase_radio_size' => [
4687 - 'id' => 'showcase_radio_size',
4688 - 'label' => esc_html__( 'Radio Attribute Size', 'shopbuilder' ),
4689 - 'help' => esc_html__( 'Set the size (in px) for radio-button variation attributes in shop/showcase contexts.', 'shopbuilder' ),
4690 - 'type' => 'slider',
4691 - 'min' => 10,
4692 - 'max' => 80,
4693 - 'unit' => 'px',
4694 - 'value' => 25,
4695 - 'tab' => 'style',
4696 - ],
4697 - 'tooltip_style' => [
4698 - 'id' => 'tooltip_style',
4699 - 'type' => 'title',
4700 - 'label' => esc_html__( 'Tooltip Style', 'shopbuilder' ),
4701 - 'tab' => 'style',
4702 - ],
4703 - 'tooltip_text_color' => [
4704 - 'id' => 'tooltip_text_color',
4705 - 'label' => esc_html__( 'Tooltip Text Color', 'shopbuilder' ),
4706 - 'type' => 'color',
4707 - 'value' => '#ffffff',
4708 - 'tab' => 'style',
4709 - ],
4710 - 'tooltip_bg_color' => [
4711 - 'id' => 'tooltip_bg_color',
4712 - 'label' => esc_html__( 'Tooltip Background Color', 'shopbuilder' ),
4713 - 'type' => 'color',
4714 - 'value' => '#333333',
4715 - 'tab' => 'style',
4716 - ],
4717 - 'tooltip_images_padding' => [
4718 - 'id' => 'tooltip_images_padding',
4719 - 'label' => esc_html__( 'Tooltip Images Padding', 'shopbuilder' ),
4720 - 'type' => 'slider',
4721 - 'min' => 0,
4722 - 'max' => 30,
4723 - 'unit' => 'px',
4724 - 'value' => 3,
4725 - 'tab' => 'style',
4726 - ],
4727 - 'tooltip_image_bg_color' => [
4728 - 'id' => 'tooltip_image_bg_color',
4729 - 'label' => esc_html__( 'Tooltip Image Background Color', 'shopbuilder' ),
4730 - 'type' => 'color',
4731 - 'value' => '#333333',
4732 - 'tab' => 'style',
4733 - ],
4734 -
4735 - ]
4736 - ); // @phpstan-ignore-line
4737 - }
4738 - /**
4739 - * @return array
4740 - */
4741 - public function get_variation_gallery_fields() {
4742 - return apply_filters(
4743 - 'rtsb/module/variation_gallery/fields',
4744 - [
4745 - 'main_image_controls_title' => [
4746 - 'id' => 'main_image_controls_title',
4747 - 'type' => 'title',
4748 - 'label' => esc_html__( 'Main Image Controls', 'shopbuilder' ),
4749 - 'tab' => 'general',
4750 - ],
4751 - 'image_zoom' => [
4752 - 'id' => 'image_zoom',
4753 - 'type' => 'switch',
4754 - 'default' => false,
4755 - 'label' => esc_html__( 'Zoom Gallery image', 'shopbuilder' ),
4756 - 'tab' => 'general',
4757 - ],
4758 - 'lightBox' => [
4759 - 'id' => 'lightBox',
4760 - 'type' => 'switch',
4761 - 'default' => false,
4762 - 'label' => esc_html__( 'Enable Images lightBox', 'shopbuilder' ),
4763 - 'tab' => 'general',
4764 - ],
4765 - 'lightBox_button_position' => [
4766 - 'id' => 'lightBox_button_position',
4767 - 'type' => 'select',
4768 - 'value' => 'top-right',
4769 - 'label' => esc_html__( 'Zoom Button Position', 'shopbuilder' ),
4770 - 'isPro' => ! rtsb()->has_pro(),
4771 - 'options' => [
4772 - 'top-right' => esc_html__( 'Top Right', 'shopbuilder' ),
4773 - 'top-left' => esc_html__( 'Top Left', 'shopbuilder' ),
4774 - 'bottom-right' => esc_html__( 'Bottom Right', 'shopbuilder' ),
4775 - 'bottom-left' => esc_html__( 'Bottom Left', 'shopbuilder' ),
4776 - ],
4777 - 'tab' => 'general',
4778 - ],
4779 -
4780 - 'adaptive_height' => [
4781 - 'id' => 'adaptive_height',
4782 - 'type' => 'switch',
4783 - 'default' => false,
4784 - 'label' => esc_html__( 'Main Images Slider Adaptive Height', 'shopbuilder' ),
4785 - 'tab' => 'general',
4786 - 'dependency' => [
4787 - 'rules' => [
4788 - [
4789 - 'item' => 'modules.variation_gallery.gallery_style',
4790 - 'value' => 'grid',
4791 - 'operator' => '!=',
4792 - ],
4793 - ],
4794 - ],
4795 - ],
4796 - 'main_slider_alignment' => [
4797 - 'id' => 'main_slider_alignment',
4798 - 'type' => 'switch',
4799 - 'value' => 'center',
4800 - 'label' => esc_html__( 'Main Image Middle Position', 'shopbuilder' ),
4801 - 'help' => esc_html__( 'The main image area will align vertically in the center if the inner content is shorter than the adjacent content.', 'shopbuilder' ),
4802 - 'tab' => 'general',
4803 - 'dependency' => [
4804 - 'rules' => [
4805 - [
4806 - 'item' => 'modules.variation_gallery.gallery_style',
4807 - 'value' => [ 'left', 'right' ],
4808 - 'operator' => 'in',
4809 - ],
4810 - ],
4811 - ],
4812 - ],
4813 - 'main_image_transition_effect' => [
4814 - 'id' => 'main_image_transition_effect',
4815 - 'type' => 'select',
4816 - 'value' => 'slide',
4817 - 'label' => esc_html__( 'Transition Effect For Main Image Carousel', 'shopbuilder' ),
4818 - 'isPro' => ! rtsb()->has_pro(),
4819 - 'options' => [
4820 - 'slide' => esc_html__( 'Slide', 'shopbuilder' ),
4821 - 'fade' => esc_html__( 'Fade', 'shopbuilder' ),
4822 - ],
4823 - 'tab' => 'general',
4824 - 'dependency' => [
4825 - 'rules' => [
4826 - [
4827 - 'item' => 'modules.variation_gallery.gallery_style',
4828 - 'value' => 'grid',
4829 - 'operator' => '!=',
4830 - ],
4831 - ],
4832 - ],
4833 - ],
4834 - 'preloader' => [
4835 - 'id' => 'preloader',
4836 - 'type' => 'switch',
4837 - 'default' => false,
4838 - 'label' => esc_html__( 'Preloader', 'shopbuilder' ),
4839 - 'help' => esc_html__( 'Show a loading animation while the gallery images are being loaded.', 'shopbuilder' ),
4840 - 'tab' => 'general',
4841 - ],
4842 - 'preloader_image' => [
4843 - 'id' => 'preloader_image',
4844 - 'type' => 'fileupload',
4845 - 'label' => esc_html__( 'Preloader Image', 'shopbuilder' ),
4846 - 'help' => esc_html__( 'Upload a custom preloader image to replace the default loading animation. Recommended size: 60x60 pixels.', 'shopbuilder' ),
4847 - 'tab' => 'general',
4848 - // Preserve the { id, source } media array on save (the default text
4849 - // sanitizer would flatten it to an empty string and drop the upload).
4850 - 'sanitize_fn' => [ Fns::class, 'sanitize_fileupload_value' ],
4851 - 'dependency' => [
4852 - 'rules' => [
4853 - [
4854 - 'item' => 'modules.variation_gallery.preloader',
4855 - 'value' => 'on',
4856 - 'operator' => '==',
4857 - ],
4858 - ],
4859 - ],
4860 - ],
4861 - 'gallery_change_effect' => [
4862 - 'id' => 'gallery_change_effect',
4863 - 'type' => 'select',
4864 - 'value' => 'blur',
4865 - 'label' => esc_html__( 'Gallery Change Effect', 'shopbuilder' ),
4866 - 'help' => esc_html__( 'Choose the visual effect applied to the gallery when switching between variations.', 'shopbuilder' ),
4867 - 'options' => [
4868 - 'blur' => esc_html__( 'Blur', 'shopbuilder' ),
4869 - 'fade' => esc_html__( 'Fade', 'shopbuilder' ),
4870 - 'gray' => esc_html__( 'Gray', 'shopbuilder' ),
4871 - 'none' => esc_html__( 'No Effect', 'shopbuilder' ),
4872 - ],
4873 - 'tab' => 'general',
4874 - ],
4875 - 'gallery_thumbnail_controls_title' => [
4876 - 'id' => 'gallery_thumbnail_controls_title',
4877 - 'type' => 'title',
4878 - 'label' => esc_html__( 'Gallery / Thumbnail Item Controls', 'shopbuilder' ),
4879 - 'tab' => 'general',
4880 - ],
4881 - 'gallery_style' => [
4882 - 'id' => 'gallery_style',
4883 - 'type' => 'select',
4884 - 'value' => 'bottom',
4885 - 'label' => esc_html__( 'Thumbnail Position/Gallery Style', 'shopbuilder' ),
4886 - // Bottom, left and right are free. Grid needs the pro templates, so
4887 - // it is only offered when pro is active; a value saved while pro was
4888 - // active degrades to bottom via GalleryFns::get_gallery_style().
4889 - 'options' => array_merge(
4890 - [
4891 - 'bottom' => esc_html__( 'Thumbnail Position Bottom', 'shopbuilder' ),
4892 - 'left' => esc_html__( 'Thumbnail Position Left', 'shopbuilder' ),
4893 - 'right' => esc_html__( 'Thumbnail Position Right', 'shopbuilder' ),
4894 - ],
4895 - rtsb()->has_pro() ? [ 'grid' => esc_html__( 'Grid View Images', 'shopbuilder' ) ] : []
4896 - ),
4897 - 'tab' => 'general',
4898 - ],
4899 - 'thumbnails_columns' => [
4900 - 'id' => 'thumbnails_columns',
4901 - 'type' => 'slider',
4902 - 'label' => esc_html__( 'Thumbnail Items', 'shopbuilder' ),
4903 - 'help' => esc_html__( 'Add slides per view, or items per row if the slider is not activated.', 'shopbuilder' ),
4904 - 'min' => 2,
4905 - 'max' => 8,
4906 - 'unit' => '',
4907 - 'value' => 4,
4908 - 'tab' => 'general',
4909 - ],
4910 - 'thumbnails_gap' => [
4911 - 'id' => 'thumbnails_gap',
4912 - 'type' => 'slider',
4913 - 'label' => esc_html__( 'Thumbnails Gap', 'shopbuilder' ),
4914 - 'help' => esc_html__( 'Product Thumbnails Gap In Pixel. Default value is: 0. Limit: 0-50.', 'shopbuilder' ),
4915 - 'min' => 0,
4916 - 'max' => 50,
4917 - 'unit' => 'px',
4918 - 'value' => 10,
4919 - 'tab' => 'general',
4920 - ],
4921 - 'main_image_border_color' => [
4922 - 'id' => 'main_image_border_color',
4923 - 'label' => esc_html__( 'Main Image Border Color', 'shopbuilder' ),
4924 - 'tab' => 'styles',
4925 - 'type' => 'color',
4926 - 'dependency' => [
4927 - 'rules' => [
4928 - [
4929 - 'item' => 'modules.variation_gallery.gallery_style',
4930 - 'value' => 'grid',
4931 - 'operator' => '!=',
4932 - ],
4933 - ],
4934 - ],
4935 - ],
4936 - 'thumbnail_item_border_color' => [
4937 - 'id' => 'thumbnail_item_border_color',
4938 - 'label' => esc_html__( 'Thumbnail item Border Color', 'shopbuilder' ),
4939 - 'tab' => 'styles',
4940 - 'type' => 'color',
4941 - ],
4942 - 'thumbnail_active_border_color' => [
4943 - 'id' => 'thumbnail_active_border_color',
4944 - 'label' => esc_html__( 'Active Thumbnail Border Color', 'shopbuilder' ),
4945 - 'help' => esc_html__( 'Border color of the currently selected thumbnail.', 'shopbuilder' ),
4946 - 'tab' => 'styles',
4947 - 'type' => 'color',
4948 - ],
4949 - 'thumbnail_item_inner_padding' => [
4950 - 'id' => 'thumbnail_item_inner_padding',
4951 - 'type' => 'slider',
4952 - 'label' => esc_html__( 'Thumbnail Item Inner Padding', 'shopbuilder' ),
4953 - 'min' => 0,
4954 - 'max' => 30,
4955 - 'unit' => 'px',
4956 - 'value' => 10,
4957 - 'tab' => 'styles',
4958 - ],
4959 - 'thumbnail_item_border_radius' => [
4960 - 'id' => 'thumbnail_item_border_radius',
4961 - 'type' => 'slider',
4962 - 'label' => esc_html__( 'Thumbnail Item Border Radius', 'shopbuilder' ),
4963 - 'min' => 0,
4964 - 'max' => 30,
4965 - 'unit' => 'px',
4966 - 'value' => 5,
4967 - 'tab' => 'styles',
4968 - ],
4969 - ]
4970 - );
4971 3603 }
4972 3604 }