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