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