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