PluginProbe
ShopBuilder – WooCommerce Builder For Elementor / 2.5.2
ShopBuilder – WooCommerce Builder For Elementor v2.5.2
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 +2471 -35 2.2.22.5.2 View file →
@@ -8,8 +8,12 @@
8 8 namespace RadiusTheme\SB\Models;
9 9
10 10 use RadiusTheme\SB\Helpers\Fns;
11 11 use RadiusTheme\SB\Models\Base\ListModel;
12 +use RadiusTheme\SB\Modules\Badges\Badges;
13 +use RadiusTheme\SB\Modules\CheckoutEditor\CheckoutEditorInit;
14 +use RadiusTheme\SB\Modules\CheckoutEditor\CheckoutFns;
15 +use RadiusTheme\SB\Modules\ShopifyCheckout\ShopifyCheckout;
12 16 use RadiusTheme\SB\Traits\SingletonTrait;
13 17 use RadiusTheme\SB\Modules\Compare\Compare;
14 18 use RadiusTheme\SB\Modules\WishList\Wishlist;
15 19 use RadiusTheme\SB\Modules\Compare\CompareFns;
@@ -14,8 +18,9 @@
14 18 use RadiusTheme\SB\Modules\WishList\Wishlist;
15 19 use RadiusTheme\SB\Modules\Compare\CompareFns;
16 20 use RadiusTheme\SB\Modules\QuickView\QuickView;
17 21 use RadiusTheme\SB\Modules\WishList\WishlistFns;
22 +use RadiusTheme\SBPRO\Helpers\FnsPro;
18 23
19 24 defined( 'ABSPATH' ) || exit;
20 25
21 26 /**
@@ -47,9 +52,9 @@
47 52 * @return mixed|null
48 53 */
49 54 protected function raw_list() {
50 55 $list = [
51 - 'quick_view' => apply_filters(
56 + 'quick_view' => apply_filters(
52 57 'rtsb/module/quick_view/options',
53 58 [
54 59 'id' => 'quick_view',
55 60 'title' => esc_html__( 'Quick View', 'shopbuilder' ),
@@ -211,9 +216,9 @@
211 216 ]
212 217 ),
213 218 ]
214 219 ),
215 - 'wishlist' => apply_filters(
220 + 'wishlist' => apply_filters(
216 221 'rtsb/module/wishlist/options',
217 222 [
218 223 'id' => 'wishlist',
219 224 'title' => esc_html__( 'Wishlist', 'shopbuilder' ),
@@ -565,9 +570,9 @@
565 570 ],
566 571 ],
567 572 ]
568 573 ),
569 - 'compare' => apply_filters(
574 + 'compare' => apply_filters(
570 575 'rtsb/module/compare/options',
571 576 [
572 577 'id' => 'compare',
573 578 'base_class' => Compare::class,
@@ -735,19 +740,19 @@
735 740 'label' => ' ',
736 741 'html' => sprintf(
737 742 /* translators: 1: The shortcode.*/
738 743 esc_html__( 'Choose where to show button on the product page. Copy this shortcode %1$s and paste it where you want to show the button.', 'shopbuilder' ),
739 - '<code>[rtsb_wishlist_button]</code> '
744 + '<code>[rtsb_compare_button]</code> '
740 745 ),
741 746 'dependency' => [
742 747 'rules' => [
743 748 [
744 - 'item' => 'modules.wishlist.show_btn_product_page',
749 + 'item' => 'modules.compare.show_btn_product_page',
745 750 'value' => 'on',
746 751 'operator' => '==',
747 752 ],
748 753 [
749 - 'item' => 'modules.wishlist.product_btn_position',
754 + 'item' => 'modules.compare.product_btn_position',
750 755 'value' => 'shortcode',
751 756 'operator' => '==',
752 757 ],
753 758 ],
@@ -889,9 +894,9 @@
889 894
890 895 ],
891 896 ]
892 897 ),
893 - 'variation_swatches' => apply_filters(
898 + 'variation_swatches' => apply_filters(
894 899 'rtsb/module/variation_swatches/options',
895 900 [
896 901 'id' => 'variation_swatches',
897 902 'external' => true,
@@ -907,9 +912,9 @@
907 912 'plugin' => 'woo-product-variation-swatches/woo-product-variation-swatches.php',
908 913 ],
909 914 admin_url( 'plugins.php' )
910 915 ),
911 - 'help' => esc_html__( 'This module requires: Variation Swatches for WooCommerce Plugin.', 'shopbuilder' ),
916 + 'help' => __( 'This module requires: <a href="https://wordpress.org/plugins/woo-product-variation-swatches/">Variation Swatches for WooCommerce</a>.', 'shopbuilder' ),
912 917 'package' => 'free',
913 918 'active_field' => [
914 919 'disable' => false,
915 920 ],
@@ -915,9 +920,9 @@
915 920 ],
916 921 'fields' => [],
917 922 ]
918 923 ),
919 - 'variation_gallery' => apply_filters(
924 + 'variation_gallery' => apply_filters(
920 925 'rtsb/module/variation_gallery/options',
921 926 [
922 927 'id' => 'variation_gallery',
923 928 'external' => true,
@@ -933,9 +938,9 @@
933 938 'plugin' => 'woo-product-variation-gallery/woo-product-variation-gallery.php',
934 939 ],
935 940 admin_url( 'plugins.php' )
936 941 ),
937 - 'help' => esc_html__( 'This module requires: Variation Images Gallery for WooCommerce Plugin', 'shopbuilder' ),
942 + 'help' => __( 'This module requires: <a href="https://wordpress.org/plugins/woo-product-variation-gallery/">Variation Images Gallery for WooCommerce</a>.', 'shopbuilder' ),
938 943 'package' => 'free',
939 944 'active_field' => [
940 945 'disable' => false,
941 946 ],
@@ -941,9 +946,9 @@
941 946 ],
942 947 'fields' => [],
943 948 ]
944 949 ),
945 - 'mini_cart' => apply_filters(
950 + 'mini_cart' => apply_filters(
946 951 'rtsb/module/mini_cart/options',
947 952 [
948 953 'id' => 'mini_cart',
949 954 'active' => '',
@@ -953,12 +958,12 @@
953 958 'label' => esc_html__( 'Enable Mini Cart?', 'shopbuilder' ),
954 959 'help' => esc_html__( 'Switch on to enable mini cart module.', 'shopbuilder' ),
955 960 ],
956 961 'is_active' => true,
957 - 'fields' => [],
962 + 'fields' => Fns::pro_version_notice( '1.0.0' ),
958 963 ]
959 964 ),
960 - 'product_size_chart' => apply_filters(
965 + 'product_size_chart' => apply_filters(
961 966 'rtsb/module/product_size_chart/options',
962 967 [
963 968 'id' => 'product_size_chart',
964 969 'active' => '',
@@ -967,26 +972,38 @@
967 972 'active_field' => [
968 973 'label' => esc_html__( 'Enable Product Size Chart?', 'shopbuilder' ),
969 974 'help' => esc_html__( 'Switch on to enable Product Size Chart module.', 'shopbuilder' ),
970 975 ],
971 - 'fields' => [],
976 + 'fields' => Fns::pro_version_notice( '1.0.0' ),
972 977 ]
973 978 ),
974 - 'product_badges' => apply_filters(
979 + 'product_badges' => apply_filters(
975 980 'rtsb/module/product_badges/options',
976 981 [
977 982 'id' => 'product_badges',
978 983 'active' => '',
979 984 'title' => esc_html__( 'Product Badges', 'shopbuilder' ),
980 - 'package' => $this->pro_package(),
985 + 'package' => 'free',
981 986 'active_field' => [
982 987 'label' => esc_html__( 'Enable Product Badges?', 'shopbuilder' ),
983 988 'help' => esc_html__( 'Switch on to enable product badges module.', 'shopbuilder' ),
984 989 ],
985 - 'fields' => [],
990 + 'base_class' => Badges::class,
991 + 'fields' => $this->product_badges_fields(),
992 + 'tabs' => [
993 + 'general' => [
994 + 'title' => esc_html__( 'General', 'shopbuilder' ),
995 + ],
996 + 'group' => [
997 + 'title' => esc_html__( 'Settings', 'shopbuilder' ),
998 + ],
999 + 'badges' => [
1000 + 'title' => esc_html__( 'Create Badges', 'shopbuilder' ),
1001 + ],
1002 + ],
986 1003 ]
987 1004 ),
988 - 'customize_my_account' => apply_filters(
1005 + 'customize_my_account' => apply_filters(
989 1006 'rtsb/module/customize_my_account/options',
990 1007 [
991 1008 'id' => 'customize_my_account',
992 1009 'active' => '',
@@ -995,12 +1012,12 @@
995 1012 'active_field' => [
996 1013 'label' => esc_html__( 'Enable Customize My Account?', 'shopbuilder' ),
997 1014 'help' => esc_html__( 'Switch on to enable customize my account module.', 'shopbuilder' ),
998 1015 ],
999 - 'fields' => [],
1016 + 'fields' => Fns::pro_version_notice( '1.4.0' ),
1000 1017 ]
1001 1018 ),
1002 - 'pre_order' => apply_filters(
1019 + 'pre_order' => apply_filters(
1003 1020 'rtsb/module/pre_order/options',
1004 1021 [
1005 1022 'id' => 'pre_order',
1006 1023 'active' => '',
@@ -1009,12 +1026,12 @@
1009 1026 'active_field' => [
1010 1027 'label' => esc_html__( 'Enable Pre-Order?', 'shopbuilder' ),
1011 1028 'help' => esc_html__( 'Switch on to enable pre-order module.', 'shopbuilder' ),
1012 1029 ],
1013 - 'fields' => [],
1030 + 'fields' => Fns::pro_version_notice( '1.5.0' ),
1014 1031 ]
1015 1032 ),
1016 - 'currency_switcher' => apply_filters(
1033 + 'currency_switcher' => apply_filters(
1017 1034 'rtsb/module/currency_switcher/options',
1018 1035 [
1019 1036 'id' => 'currency_switcher',
1020 1037 'active' => '',
@@ -1024,12 +1041,12 @@
1024 1041 'label' => esc_html__( 'Enable Currency Switcher?', 'shopbuilder' ),
1025 1042 'help' => esc_html__( 'Switch on to enable currency switcher module.', 'shopbuilder' ),
1026 1043 ],
1027 1044 'is_active' => true,
1028 - 'fields' => [],
1045 + 'fields' => Fns::pro_version_notice( '1.5.0' ),
1029 1046 ]
1030 1047 ),
1031 - 'product_add_ons' => apply_filters(
1048 + 'product_add_ons' => apply_filters(
1032 1049 'rtsb/module/product_add_ons/options',
1033 1050 [
1034 1051 'id' => 'product_add_ons',
1035 1052 'active' => '',
@@ -1039,13 +1056,172 @@
1039 1056 'label' => esc_html__( 'Enable Product Add-Ons?', 'shopbuilder' ),
1040 1057 'help' => esc_html__( 'Switch on to enable product add-ons module.', 'shopbuilder' ),
1041 1058 ],
1042 1059 'is_active' => true,
1043 - 'fields' => [],
1060 + 'fields' => Fns::pro_version_notice( '1.6.0' ),
1044 1061 ]
1045 1062 ),
1046 1063 // Checkout Fields Manager.
1047 - 'sales_notification' => apply_filters(
1064 + 'checkout_fields_editor' => apply_filters(
1065 + 'rtsb/module/checkout_fields_editor/options',
1066 + [
1067 + 'id' => 'checkout_fields_editor',
1068 + 'active' => '',
1069 + 'title' => esc_html__( 'Checkout Fields Editor', 'shopbuilder' ),
1070 + 'base_class' => CheckoutEditorInit::class,
1071 + 'active_field' => [
1072 + 'label' => esc_html__( 'Enable Checkout Fields Editor?', 'shopbuilder' ),
1073 + 'help' => esc_html__( 'Switch on to enable Checkout Fields Editor module.', 'shopbuilder' ),
1074 + ],
1075 + 'fields' => [
1076 + 'checkout_billing_intro' => [
1077 + 'id' => 'checkout_billing_intro',
1078 + 'type' => 'description',
1079 + 'text' => esc_html__( 'Billing Fields Editor allows you to customize the default billing fields on your checkout page.', 'shopbuilder' ),
1080 + 'tab' => 'billing_fields',
1081 + ],
1082 + 'modify_billing_form' => [
1083 + 'id' => 'modify_billing_form',
1084 + 'type' => 'switch',
1085 + 'label' => esc_html__( 'Customize Billing Form?', 'shopbuilder' ),
1086 + 'help' => esc_html__( 'Enable this option to edit billing Form.', 'shopbuilder' ),
1087 + 'tab' => 'billing_fields',
1088 + ],
1089 +
1090 + 'checkout_billing_fields_info' => [
1091 + 'id' => 'checkout_billing_fields_info',
1092 + 'type' => 'title',
1093 + 'label' => esc_html__( 'Billing Fields', 'shopbuilder' ),
1094 + 'tab' => 'billing_fields',
1095 + 'dependency' => [
1096 + 'rules' => [
1097 + [
1098 + 'item' => 'modules.checkout_fields_editor.modify_billing_form',
1099 + 'value' => 'on',
1100 + 'operator' => '==',
1101 + ],
1102 + ],
1103 + ],
1104 + ],
1105 + 'checkout_billing_fields' => [
1106 + 'id' => 'checkout_billing_fields',
1107 + 'type' => 'checkout_fields',
1108 + 'tab' => 'billing_fields',
1109 + 'value' => wp_json_encode( CheckoutFns::default_billing_fields() ),
1110 + 'dependency' => [
1111 + 'rules' => [
1112 + [
1113 + 'item' => 'modules.checkout_fields_editor.modify_billing_form',
1114 + 'value' => 'on',
1115 + 'operator' => '==',
1116 + ],
1117 + ],
1118 + ],
1119 + ],
1120 + 'checkout_shipping_intro' => [
1121 + 'id' => 'checkout_shipping_intro',
1122 + 'type' => 'description',
1123 + 'text' => esc_html__( 'Shipping Fields Editor allows you to customize the default shipping fields on your checkout page.', 'shopbuilder' ),
1124 + 'tab' => 'shipping_fields',
1125 + ],
1126 + 'modify_shipping_form' => [
1127 + 'id' => 'modify_billing_form',
1128 + 'type' => 'switch',
1129 + 'label' => esc_html__( 'Modify Shipping Form?', 'shopbuilder' ),
1130 + 'help' => esc_html__( 'Enable this option to edit shipping Form.', 'shopbuilder' ),
1131 + 'tab' => 'shipping_fields',
1132 + ],
1133 + 'checkout_shipping_fields_info' => [
1134 + 'id' => 'checkout_shipping_fields_info',
1135 + 'type' => 'title',
1136 + 'label' => esc_html__( 'Shipping Fields', 'shopbuilder' ),
1137 + 'tab' => 'shipping_fields',
1138 + 'dependency' => [
1139 + 'rules' => [
1140 + [
1141 + 'item' => 'modules.checkout_fields_editor.modify_shipping_form',
1142 + 'value' => 'on',
1143 + 'operator' => '==',
1144 + ],
1145 + ],
1146 + ],
1147 + ],
1148 + 'checkout_shipping_fields' => [
1149 + 'id' => 'checkout_shipping_fields',
1150 + 'type' => 'checkout_fields',
1151 + 'tab' => 'shipping_fields',
1152 + 'value' => wp_json_encode( CheckoutFns::default_shipping_fields() ),
1153 + 'dependency' => [
1154 + 'rules' => [
1155 + [
1156 + 'item' => 'modules.checkout_fields_editor.modify_shipping_form',
1157 + 'value' => 'on',
1158 + 'operator' => '==',
1159 + ],
1160 + ],
1161 + ],
1162 + ],
1163 + 'checkout_additional_intro' => [
1164 + 'id' => 'checkout_additional_intro',
1165 + 'type' => 'description',
1166 + 'text' => esc_html__( 'Additional Fields Editor allows you to customize the extra fields on your checkout page.', 'shopbuilder' ),
1167 + 'tab' => 'additional_fields',
1168 + ],
1169 + 'modify_additional_form' => [
1170 + 'id' => 'modify_additional_form',
1171 + 'type' => 'switch',
1172 + 'label' => esc_html__( 'Modify Additional Form Field?', 'shopbuilder' ),
1173 + 'help' => esc_html__( 'Enable this option to edit Additional Form.', 'shopbuilder' ),
1174 + 'tab' => 'additional_fields',
1175 + ],
1176 + 'checkout_additional_fields_info' => [
1177 + 'id' => 'checkout_additional_fields_info',
1178 + 'type' => 'title',
1179 + 'label' => esc_html__( 'Additional Fields', 'shopbuilder' ),
1180 + 'tab' => 'additional_fields',
1181 + 'dependency' => [
1182 + 'rules' => [
1183 + [
1184 + 'item' => 'modules.checkout_fields_editor.modify_additional_form',
1185 + 'value' => 'on',
1186 + 'operator' => '==',
1187 + ],
1188 + ],
1189 + ],
1190 + ],
1191 + 'checkout_additional_fields' => [
1192 + 'id' => 'checkout_additional_fields',
1193 + 'type' => 'checkout_fields',
1194 + 'tab' => 'additional_fields',
1195 + 'value' => wp_json_encode( CheckoutFns::checkout_additional_fields() ),
1196 + 'dependency' => [
1197 + 'rules' => [
1198 + [
1199 + 'item' => 'modules.checkout_fields_editor.modify_additional_form',
1200 + 'value' => 'on',
1201 + 'operator' => '==',
1202 + ],
1203 + ],
1204 + ],
1205 + ],
1206 + ],
1207 + 'tabs' => [
1208 + 'general' => [
1209 + 'title' => esc_html__( 'General', 'shopbuilder' ),
1210 + ],
1211 + 'billing_fields' => [
1212 + 'title' => esc_html__( 'Billing Fields', 'shopbuilder' ),
1213 + ],
1214 + 'shipping_fields' => [
1215 + 'title' => esc_html__( 'Shipping Fields', 'shopbuilder' ),
1216 + ],
1217 + 'additional_fields' => [
1218 + 'title' => esc_html__( 'Additional Fields', 'shopbuilder' ),
1219 + ],
1220 + ],
1221 + ]
1222 + ),
1223 + 'sales_notification' => apply_filters(
1048 1224 'rtsb/module/sales_notification/options',
1049 1225 [
1050 1226 'id' => 'sales_notification',
1051 1227 'active' => '',
@@ -1054,12 +1230,12 @@
1054 1230 'active_field' => [
1055 1231 'label' => esc_html__( 'Enable Sales Notification?', 'shopbuilder' ),
1056 1232 'help' => esc_html__( 'Switch on to enable Sales Notification module.', 'shopbuilder' ),
1057 1233 ],
1058 - 'fields' => [],
1234 + 'fields' => Fns::pro_version_notice( '1.0.0' ),
1059 1235 ]
1060 1236 ),
1061 - 'flash_sale_countdown' => apply_filters(
1237 + 'flash_sale_countdown' => apply_filters(
1062 1238 'rtsb/module/flash_sale_countdown/options',
1063 1239 [
1064 1240 'id' => 'flash_sale_countdown',
1065 1241 'active' => '',
@@ -1068,12 +1244,12 @@
1068 1244 'active_field' => [
1069 1245 'label' => esc_html__( 'Enable Flash Sale Countdown?', 'shopbuilder' ),
1070 1246 'help' => esc_html__( 'Switch on to enable Flash Sale Countdown module.', 'shopbuilder' ),
1071 1247 ],
1072 - 'fields' => [],
1248 + 'fields' => Fns::pro_version_notice( '1.0.0' ),
1073 1249 ]
1074 1250 ),
1075 - 'quick_checkout' => apply_filters(
1251 + 'quick_checkout' => apply_filters(
1076 1252 'rtsb/module/quick_checkout/options',
1077 1253 [
1078 1254 'id' => 'quick_checkout',
1079 1255 'active' => '',
@@ -1082,12 +1258,12 @@
1082 1258 'active_field' => [
1083 1259 'label' => esc_html__( 'Enable Quick Checkout?', 'shopbuilder' ),
1084 1260 'help' => esc_html__( 'Switch on to enable quick checkout module. Note: Currently, this is not suitable for variable products.', 'shopbuilder' ),
1085 1261 ],
1086 - 'fields' => [],
1262 + 'fields' => Fns::pro_version_notice( '1.1.0' ),
1087 1263 ]
1088 1264 ),
1089 - 'multi_step_checkout' => apply_filters(
1265 + 'multi_step_checkout' => apply_filters(
1090 1266 'rtsb/module/multi_step_checkout/options',
1091 1267 [
1092 1268 'id' => 'multi_step_checkout',
1093 1269 'active' => '',
@@ -1096,12 +1272,12 @@
1096 1272 'active_field' => [
1097 1273 'label' => esc_html__( 'Enable Multi-Step Checkout?', 'shopbuilder' ),
1098 1274 'help' => esc_html__( 'Switch on to enable Multi-step Checkout module.', 'shopbuilder' ),
1099 1275 ],
1100 - 'fields' => [],
1276 + 'fields' => Fns::pro_version_notice( '1.0.0' ),
1101 1277 ]
1102 1278 ),
1103 - 'back_order' => apply_filters(
1279 + 'back_order' => apply_filters(
1104 1280 'rtsb/module/back_order/options',
1105 1281 [
1106 1282 'id' => 'back_order',
1107 1283 'active' => '',
@@ -1110,11 +1286,2271 @@
1110 1286 'active_field' => [
1111 1287 'label' => esc_html__( 'Enable Back-Order?', 'shopbuilder' ),
1112 1288 'help' => esc_html__( 'Switch on to enable back-order module.', 'shopbuilder' ),
1113 1289 ],
1114 - 'fields' => [],
1290 + 'fields' => Fns::pro_version_notice( '1.3.0' ),
1115 1291 ]
1116 1292 ),
1293 + 'sticky_add_to_cart' => apply_filters(
1294 + 'rtsb/module/sticky_add_to_cart/options',
1295 + [
1296 + 'id' => 'sticky_add_to_cart',
1297 + 'active' => '',
1298 + 'title' => esc_html__( 'Sticky Add-To-Cart', 'shopbuilder' ),
1299 + 'package' => $this->pro_package(),
1300 + 'active_field' => [
1301 + 'label' => esc_html__( 'Enable Sticky Add-To-Cart?', 'shopbuilder' ),
1302 + 'help' => esc_html__( 'Switch on to enable sticky add-to-cart module.', 'shopbuilder' ),
1303 + ],
1304 + 'fields' => Fns::pro_version_notice( '1.6.0' ),
1305 + ]
1306 + ),
1307 + 'shopify_checkout' => apply_filters(
1308 + 'rtsb/module/shopify_checkout/options',
1309 + [
1310 + 'id' => 'shopify_checkout',
1311 + 'active' => '',
1312 + 'title' => esc_html__( 'Shopify Checkout', 'shopbuilder' ),
1313 + 'base_class' => ShopifyCheckout::class,
1314 + 'active_field' => [
1315 + 'label' => esc_html__( 'Enable Shopify Checkout?', 'shopbuilder' ),
1316 + 'help' => esc_html__( 'Switch on to enable Shopify Checkout module.', 'shopbuilder' ),
1317 + ],
1318 + 'fields' => $this->shopify_checkout_options(),
1319 + 'tabs' => [
1320 + 'general' => [
1321 + 'title' => esc_html__( 'General', 'shopbuilder' ),
1322 + ],
1323 + 'multi-step' => [
1324 + 'title' => esc_html__( 'Multi-Step', 'shopbuilder' ),
1325 + ],
1326 + 'styles' => [
1327 + 'title' => esc_html__( 'General Styles', 'shopbuilder' ),
1328 + ],
1329 + 'btn-styles' => [
1330 + 'title' => esc_html__( 'Button Styles', 'shopbuilder' ),
1331 + ],
1332 + ],
1333 + ]
1334 + ),
1117 1335 ];
1118 1336 return apply_filters( 'rtsb/core/modules/raw_list', $list );
1337 + }
1338 +
1339 + /**
1340 + * Get All Menu
1341 + */
1342 + public function get_all_menu() {
1343 + $manus = [
1344 + 'none' => esc_html__( 'None', 'shopbuilder' ),
1345 + ];
1346 + $nav_menus = wp_get_nav_menus();
1347 + if ( empty( $nav_menus ) ) {
1348 + return $manus;
1349 + }
1350 + foreach ( $nav_menus as $menu ) {
1351 + $manus[ $menu->slug ] = $menu->name;
1352 + }
1353 + return $manus;
1354 + }
1355 + /**
1356 + * Sticky add-to-cart module options.
1357 + *
1358 + * @return array
1359 + */
1360 + public function shopify_checkout_options() {
1361 + $notice = [];
1362 + if ( defined( 'RTSBPRO_VERSION' ) && version_compare( RTSBPRO_VERSION, '1.8.0', '<' ) ) {
1363 + $notice = Fns::pro_version_notice( '1.8.0', 'general', 'ShopBuilder Pro', false );
1364 + }
1365 + $fields = $notice + [
1366 + 'general_settings' => [
1367 + 'id' => 'general_settings',
1368 + 'type' => 'title',
1369 + 'label' => esc_html__( 'Settings', 'shopbuilder' ),
1370 + 'tab' => 'general',
1371 + ],
1372 + 'shopify_page_logo' => [
1373 + 'id' => 'shopify_page_logo',
1374 + 'type' => 'fileupload',
1375 + 'label' => esc_html__( 'Upload Checkout Page Logo', 'shopbuilder' ),
1376 + 'help' => esc_html__( 'Please upload your custom logo to display on the checkout page.', 'shopbuilder' ),
1377 + 'tab' => 'general',
1378 + ],
1379 + 'shopify_logo_height' => [
1380 + 'id' => 'shopify_logo_height',
1381 + 'label' => esc_html__( 'Logo Height (px)', 'shopbuilder' ),
1382 + 'help' => esc_html__( 'Specify the height of the checkout page logo in px.', 'shopbuilder' ),
1383 + 'type' => 'slider',
1384 + 'min' => 10,
1385 + 'max' => 200,
1386 + 'unit' => 'px',
1387 + 'value' => 40,
1388 + 'tab' => 'general',
1389 + ],
1390 + 'cart_icon_source' => [
1391 + 'id' => 'cart_icon_source',
1392 + 'label' => esc_html__( 'Cart Icon', 'shopbuilder' ),
1393 + 'help' => sprintf(
1394 + // translators: %s for pro message.
1395 + __( 'Choose a cart icon to display in your checkout\'s header. <br />%s', 'shopbuilder' ),
1396 + ! rtsb()->has_pro()
1397 + ? sprintf(
1398 + '<a target="_blank" href="%s">%s </a> %s ',
1399 + esc_url( rtsb()->pro_version_link() ),
1400 + esc_html__( 'Upgrade to PRO', 'shopbuilder' ),
1401 + esc_html__( 'to unlock custom image icon.', 'shopbuilder' )
1402 + )
1403 + : ''
1404 + ),
1405 + 'type' => 'select',
1406 + 'value' => 'none',
1407 + 'isPro' => ! rtsb()->has_pro(),
1408 + 'options' => [
1409 + 'none' => esc_html__( 'None', 'shopbuilder' ),
1410 + 'select_icon' => esc_html__( 'Select Icon', 'shopbuilder' ),
1411 + 'upload_icon' => esc_html__( 'Upload Icon', 'shopbuilder' ),
1412 + ],
1413 + 'tab' => 'general',
1414 + ],
1415 + 'cart_icon' => [
1416 + 'id' => 'cart_icon',
1417 + 'label' => esc_html__( 'Select Cart Icon', 'shopbuilder' ),
1418 + 'help' => esc_html__( 'Please choose the icon.', 'shopbuilder' ),
1419 + 'type' => 'icon_select',
1420 + 'searchable' => true,
1421 + 'options' => Fns::get_icons(),
1422 + 'value' => 'cart-2',
1423 + 'tab' => 'general',
1424 + 'dependency' => [
1425 + 'rules' => [
1426 + [
1427 + 'item' => 'modules.shopify_checkout.cart_icon_source',
1428 + 'value' => 'select_icon',
1429 + 'operator' => '==',
1430 + ],
1431 + ],
1432 + ],
1433 + ],
1434 +
1435 + 'cart_image_icon' => [
1436 + 'id' => 'cart_image_icon',
1437 + 'type' => 'fileupload',
1438 + 'label' => esc_html__( 'Upload Custom Icon', 'shopbuilder' ),
1439 + 'help' => esc_html__( 'Please upload your custom image icon.', 'shopbuilder' ),
1440 + 'tab' => 'general',
1441 + 'dependency' => [
1442 + 'rules' => [
1443 + [
1444 + 'item' => 'modules.shopify_checkout.cart_icon_source',
1445 + 'value' => 'upload_icon',
1446 + 'operator' => '==',
1447 + ],
1448 + ],
1449 + ],
1450 + ],
1451 +
1452 + 'email_field_title' => [
1453 + 'id' => 'email_field_title',
1454 + 'type' => 'text',
1455 + 'label' => esc_html__( 'Email Field Section Title', 'shopbuilder' ),
1456 + 'help' => esc_html__( 'Enter the custom title to be displayed above the email field section.', 'shopbuilder' ),
1457 + 'value' => esc_html__( 'Contact', 'shopbuilder' ),
1458 + 'tab' => 'general',
1459 + ],
1460 +
1461 + 'billing_address_field_title' => [
1462 + 'id' => 'billing_address_field_title',
1463 + 'type' => 'text',
1464 + 'label' => esc_html__( 'Billing Fields Section Title', 'shopbuilder' ),
1465 + 'help' => esc_html__( 'Enter the custom title to be displayed above the billing fields section', 'shopbuilder' ),
1466 + 'value' => esc_html__( 'Billing address', 'shopbuilder' ),
1467 + 'tab' => 'general',
1468 + ],
1469 +
1470 + 'enable_multi_step' => [
1471 + 'id' => 'enable_multi_step',
1472 + 'type' => 'switch',
1473 + 'isPro' => ! rtsb()->has_pro(),
1474 + 'label' => esc_html__( 'Multi-Step Checkout', 'shopbuilder' ),
1475 + 'help' => esc_html__( 'Enable multi-step checkout to simplify the purchasing process.', 'shopbuilder' ),
1476 + 'tab' => 'multi-step',
1477 + ],
1478 + 'step_menu_settings' => [
1479 + 'id' => 'step_menu_settings',
1480 + 'type' => 'title',
1481 + 'label' => esc_html__( 'Step Settings ', 'shopbuilder' ),
1482 + 'tab' => 'multi-step',
1483 + 'dependency' => [
1484 + 'rules' => [
1485 + [
1486 + 'item' => 'modules.shopify_checkout.enable_multi_step',
1487 + 'value' => 'on',
1488 + 'operator' => '==',
1489 + ],
1490 + ],
1491 + ],
1492 + ],
1493 +
1494 + 'show_step_menu' => [
1495 + 'id' => 'show_step_menu',
1496 + 'type' => 'switch',
1497 + 'isPro' => ! rtsb()->has_pro(),
1498 + 'label' => esc_html__( 'Show Step Menu', 'shopbuilder' ),
1499 + 'help' => esc_html__( 'Enable to display the step navigation menu during checkout.', 'shopbuilder' ),
1500 + 'tab' => 'multi-step',
1501 + 'value' => 'on',
1502 + 'dependency' => [
1503 + 'rules' => [
1504 + [
1505 + 'item' => 'modules.shopify_checkout.enable_multi_step',
1506 + 'value' => 'on',
1507 + 'operator' => '==',
1508 + ],
1509 + ],
1510 + ],
1511 + ],
1512 + 'show_cart_menu' => [
1513 + 'id' => 'show_cart_menu',
1514 + 'type' => 'switch',
1515 + 'isPro' => ! rtsb()->has_pro(),
1516 + 'label' => esc_html__( 'Show Cart Menu', 'shopbuilder' ),
1517 + 'help' => esc_html__( 'Enable this option to display the cart item in the step menu.', 'shopbuilder' ),
1518 + 'tab' => 'multi-step',
1519 + 'dependency' => [
1520 + 'rules' => [
1521 + [
1522 + 'item' => 'modules.shopify_checkout.enable_multi_step',
1523 + 'value' => 'on',
1524 + 'operator' => '==',
1525 + ],
1526 + [
1527 + 'item' => 'modules.shopify_checkout.show_step_menu',
1528 + 'value' => 'on',
1529 + 'operator' => '==',
1530 + ],
1531 + ],
1532 + ],
1533 + ],
1534 + 'cart_text' => [
1535 + 'id' => 'cart_text',
1536 + 'type' => 'text',
1537 + 'isPro' => ! rtsb()->has_pro(),
1538 + 'label' => esc_html__( 'Cart Step Title', 'shopbuilder' ),
1539 + 'help' => esc_html__( 'Enter the cart step menu title.', 'shopbuilder' ),
1540 + 'value' => esc_html__( 'Cart', 'shopbuilder' ),
1541 + 'tab' => 'multi-step',
1542 + 'dependency' => [
1543 + 'rules' => [
1544 + [
1545 + 'item' => 'modules.shopify_checkout.show_step_menu',
1546 + 'value' => 'on',
1547 + 'operator' => '==',
1548 + ],
1549 + [
1550 + 'item' => 'modules.shopify_checkout.show_cart_menu',
1551 + 'value' => 'on',
1552 + 'operator' => '==',
1553 + ],
1554 + ],
1555 + ],
1556 + ],
1557 +
1558 + 'billing_text' => [
1559 + 'id' => 'billing_text',
1560 + 'type' => 'text',
1561 + 'isPro' => ! rtsb()->has_pro(),
1562 + 'label' => esc_html__( 'Billing Step Title', 'shopbuilder' ),
1563 + 'help' => esc_html__( 'Enter the billing step menu title.', 'shopbuilder' ),
1564 + 'value' => esc_html__( 'Billing', 'shopbuilder' ),
1565 + 'tab' => 'multi-step',
1566 + 'dependency' => [
1567 + 'rules' => [
1568 + [
1569 + 'item' => 'modules.shopify_checkout.enable_multi_step',
1570 + 'value' => 'on',
1571 + 'operator' => '==',
1572 + ],
1573 + [
1574 + 'item' => 'modules.shopify_checkout.show_step_menu',
1575 + 'value' => 'on',
1576 + 'operator' => '==',
1577 + ],
1578 + ],
1579 + ],
1580 + ],
1581 +
1582 + 'shipping_text' => [
1583 + 'id' => 'shipping_text',
1584 + 'type' => 'text',
1585 + 'isPro' => ! rtsb()->has_pro(),
1586 + 'label' => esc_html__( 'Shipping Step Title', 'shopbuilder' ),
1587 + 'help' => esc_html__( 'Enter the shipping step menu title.', 'shopbuilder' ),
1588 + 'value' => esc_html__( 'Shipping', 'shopbuilder' ),
1589 + 'tab' => 'multi-step',
1590 + 'dependency' => [
1591 + 'rules' => [
1592 + [
1593 + 'item' => 'modules.shopify_checkout.enable_multi_step',
1594 + 'value' => 'on',
1595 + 'operator' => '==',
1596 + ],
1597 + [
1598 + 'item' => 'modules.shopify_checkout.show_step_menu',
1599 + 'value' => 'on',
1600 + 'operator' => '==',
1601 + ],
1602 + ],
1603 + ],
1604 + ],
1605 +
1606 + 'shipping_method_text' => [
1607 + 'id' => 'shipping_method_text',
1608 + 'type' => 'text',
1609 + 'isPro' => ! rtsb()->has_pro(),
1610 + 'label' => esc_html__( 'Shipping Method Step Title', 'shopbuilder' ),
1611 + 'help' => esc_html__( 'Enter the shipping method step menu title.', 'shopbuilder' ),
1612 + 'value' => esc_html__( 'Shipping Method ', 'shopbuilder' ),
1613 + 'tab' => 'multi-step',
1614 + 'dependency' => [
1615 + 'rules' => [
1616 + [
1617 + 'item' => 'modules.shopify_checkout.enable_multi_step',
1618 + 'value' => 'on',
1619 + 'operator' => '==',
1620 + ],
1621 + [
1622 + 'item' => 'modules.shopify_checkout.show_step_menu',
1623 + 'value' => 'on',
1624 + 'operator' => '==',
1625 + ],
1626 + ],
1627 + ],
1628 + ],
1629 +
1630 + 'payment_text' => [
1631 + 'id' => 'payment_text',
1632 + 'type' => 'text',
1633 + 'isPro' => ! rtsb()->has_pro(),
1634 + 'label' => esc_html__( 'Payment Method Step Title', 'shopbuilder' ),
1635 + 'help' => esc_html__( 'Enter the payment method step menu title.', 'shopbuilder' ),
1636 + 'value' => esc_html__( 'Payment', 'shopbuilder' ),
1637 + 'tab' => 'multi-step',
1638 + 'dependency' => [
1639 + 'rules' => [
1640 + [
1641 + 'item' => 'modules.shopify_checkout.enable_multi_step',
1642 + 'value' => 'on',
1643 + 'operator' => '==',
1644 + ],
1645 + [
1646 + 'item' => 'modules.shopify_checkout.show_step_menu',
1647 + 'value' => 'on',
1648 + 'operator' => '==',
1649 + ],
1650 + ],
1651 + ],
1652 + ],
1653 +
1654 + 'next_button_settings' => [
1655 + 'id' => 'next_button_settings',
1656 + 'type' => 'title',
1657 + 'label' => esc_html__( 'Button Settings', 'shopbuilder' ),
1658 + 'tab' => 'multi-step',
1659 + 'dependency' => [
1660 + 'rules' => [
1661 + [
1662 + 'item' => 'modules.shopify_checkout.enable_multi_step',
1663 + 'value' => 'on',
1664 + 'operator' => '==',
1665 + ],
1666 + ],
1667 + ],
1668 + ],
1669 +
1670 + 'shop_continue_btn' => [
1671 + 'id' => 'shop_continue_btn',
1672 + 'type' => 'switch',
1673 + 'isPro' => ! rtsb()->has_pro(),
1674 + 'label' => esc_html__( 'Show Next Button', 'shopbuilder' ),
1675 + 'help' => esc_html__( 'Enable this option to display the \'Next\' button.', 'shopbuilder' ),
1676 + 'tab' => 'multi-step',
1677 + 'value' => 'on',
1678 + 'dependency' => [
1679 + 'rules' => [
1680 + [
1681 + 'item' => 'modules.shopify_checkout.enable_multi_step',
1682 + 'value' => 'on',
1683 + 'operator' => '==',
1684 + ],
1685 + ],
1686 + ],
1687 + ],
1688 + 'continue_btn_text_for_shipping' => [
1689 + 'id' => 'continue_btn_text_for_shipping',
1690 + 'type' => 'text',
1691 + 'isPro' => ! rtsb()->has_pro(),
1692 + 'label' => esc_html__( 'Next Button Label for Shipping', 'shopbuilder' ),
1693 + 'value' => esc_html__( 'Next', 'shopbuilder' ),
1694 + 'tab' => 'multi-step',
1695 + 'dependency' => [
1696 + 'rules' => [
1697 + [
1698 + 'item' => 'modules.shopify_checkout.enable_multi_step',
1699 + 'value' => 'on',
1700 + 'operator' => '==',
1701 + ],
1702 + [
1703 + 'item' => 'modules.shopify_checkout.shop_continue_btn',
1704 + 'value' => 'on',
1705 + 'operator' => '==',
1706 + ],
1707 + ],
1708 + ],
1709 + ],
1710 + 'continue_btn_text_for_shipping_method' => [
1711 + 'id' => 'continue_btn_text_for_shipping_method',
1712 + 'type' => 'text',
1713 + 'isPro' => ! rtsb()->has_pro(),
1714 + 'label' => esc_html__( 'Next Button Label for Shipping Method', 'shopbuilder' ),
1715 + 'value' => esc_html__( 'Next', 'shopbuilder' ),
1716 + 'tab' => 'multi-step',
1717 + 'dependency' => [
1718 + 'rules' => [
1719 + [
1720 + 'item' => 'modules.shopify_checkout.enable_multi_step',
1721 + 'value' => 'on',
1722 + 'operator' => '==',
1723 + ],
1724 + [
1725 + 'item' => 'modules.shopify_checkout.shop_continue_btn',
1726 + 'value' => 'on',
1727 + 'operator' => '==',
1728 + ],
1729 + ],
1730 + ],
1731 + ],
1732 + 'continue_btn_text_for_payment' => [
1733 + 'id' => 'continue_btn_text_for_payment',
1734 + 'type' => 'text',
1735 + 'label' => esc_html__( 'Next Button Label for Payment', 'shopbuilder' ),
1736 + 'value' => esc_html__( 'Next', 'shopbuilder' ),
1737 + 'tab' => 'multi-step',
1738 + 'dependency' => [
1739 + 'rules' => [
1740 + [
1741 + 'item' => 'modules.shopify_checkout.enable_multi_step',
1742 + 'value' => 'on',
1743 + 'operator' => '==',
1744 + ],
1745 + [
1746 + 'item' => 'modules.shopify_checkout.shop_continue_btn',
1747 + 'value' => 'on',
1748 + 'operator' => '==',
1749 + ],
1750 + ],
1751 + ],
1752 + ],
1753 + 'shop_return_btn' => [
1754 + 'id' => 'shop_return_btn',
1755 + 'type' => 'switch',
1756 + 'isPro' => ! rtsb()->has_pro(),
1757 + 'label' => esc_html__( 'Show Back Button', 'shopbuilder' ),
1758 + 'help' => esc_html__( 'Enable this option to display the \'Back\' button.', 'shopbuilder' ),
1759 + 'tab' => 'multi-step',
1760 + 'value' => 'on',
1761 + 'dependency' => [
1762 + 'rules' => [
1763 + [
1764 + 'item' => 'modules.shopify_checkout.enable_multi_step',
1765 + 'value' => 'on',
1766 + 'operator' => '==',
1767 + ],
1768 + ],
1769 + ],
1770 + ],
1771 + 'return_btn_text_for_billing' => [
1772 + 'id' => 'return_btn_text_for_billing',
1773 + 'type' => 'text',
1774 + 'isPro' => ! rtsb()->has_pro(),
1775 + 'label' => esc_html__( 'Back Button Label for Billing', 'shopbuilder' ),
1776 + 'value' => esc_html__( 'Prev', 'shopbuilder' ),
1777 + 'tab' => 'multi-step',
1778 + 'dependency' => [
1779 + 'rules' => [
1780 + [
1781 + 'item' => 'modules.shopify_checkout.enable_multi_step',
1782 + 'value' => 'on',
1783 + 'operator' => '==',
1784 + ],
1785 + [
1786 + 'item' => 'modules.shopify_checkout.shop_return_btn',
1787 + 'value' => 'on',
1788 + 'operator' => '==',
1789 + ],
1790 + ],
1791 + ],
1792 + ],
1793 +
1794 + 'return_btn_text_for_shipping' => [
1795 + 'id' => 'return_btn_text_for_shipping',
1796 + 'type' => 'text',
1797 + 'isPro' => ! rtsb()->has_pro(),
1798 + 'label' => esc_html__( 'Back Button Label for Shipping', 'shopbuilder' ),
1799 + 'value' => esc_html__( 'Prev', 'shopbuilder' ),
1800 + 'tab' => 'multi-step',
1801 + 'dependency' => [
1802 + 'rules' => [
1803 + [
1804 + 'item' => 'modules.shopify_checkout.enable_multi_step',
1805 + 'value' => 'on',
1806 + 'operator' => '==',
1807 + ],
1808 + [
1809 + 'item' => 'modules.shopify_checkout.shop_return_btn',
1810 + 'value' => 'on',
1811 + 'operator' => '==',
1812 + ],
1813 + ],
1814 + ],
1815 + ],
1816 +
1817 + 'return_btn_text_for_shipping_method' => [
1818 + 'id' => 'return_btn_text_for_shipping_method',
1819 + 'type' => 'text',
1820 + 'isPro' => ! rtsb()->has_pro(),
1821 + 'label' => esc_html__( 'Back Button Label for Shipping Method', 'shopbuilder' ),
1822 + 'value' => esc_html__( 'Prev', 'shopbuilder' ),
1823 + 'tab' => 'multi-step',
1824 + 'dependency' => [
1825 + 'rules' => [
1826 + [
1827 + 'item' => 'modules.shopify_checkout.enable_multi_step',
1828 + 'value' => 'on',
1829 + 'operator' => '==',
1830 + ],
1831 + [
1832 + 'item' => 'modules.shopify_checkout.shop_return_btn',
1833 + 'value' => 'on',
1834 + 'operator' => '==',
1835 + ],
1836 + ],
1837 + ],
1838 + ],
1839 +
1840 + 'order_review_settings' => [
1841 + 'id' => 'order_review_settings',
1842 + 'type' => 'title',
1843 + 'label' => esc_html__( 'Order Reviews', 'shopbuilder' ),
1844 + 'tab' => 'general',
1845 + ],
1846 + 'order_review_item_link' => [
1847 + 'id' => 'order_review_item_link',
1848 + 'type' => 'switch',
1849 + 'label' => esc_html__( 'Link Product Titles', 'shopbuilder' ),
1850 + 'help' => esc_html__( 'Enable to make product titles clickable, linking to their product pages.', 'shopbuilder' ),
1851 + 'value' => '',
1852 + 'tab' => 'general',
1853 + ],
1854 + 'extra_content' => [
1855 + 'id' => 'extra_content',
1856 + 'label' => esc_html__( 'Display Additional Data', 'shopbuilder' ),
1857 + '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' ),
1858 + 'type' => 'text_editor',
1859 + 'isPro' => ! rtsb()->has_pro(),
1860 + 'sanitize_fn' => 'pass_all',
1861 + 'tab' => 'general',
1862 + ],
1863 +
1864 + 'footer_settings' => [
1865 + 'id' => 'footer_settings',
1866 + 'type' => 'title',
1867 + 'label' => esc_html__( 'Footer', 'shopbuilder' ),
1868 + 'tab' => 'general',
1869 + ],
1870 +
1871 + 'footer_menu' => [
1872 + 'id' => 'footer_menu',
1873 + 'label' => esc_html__( 'Footer Menu', 'shopbuilder' ),
1874 + 'help' => esc_html__( 'Select a menu to display in the footer section of your checkout page.', 'shopbuilder' ),
1875 + 'type' => 'select',
1876 + 'value' => 'none',
1877 + 'options' => $this->get_all_menu(),
1878 + 'tab' => 'general',
1879 + ],
1880 +
1881 + 'footer_text' => [
1882 + 'id' => 'footer_text',
1883 + 'type' => 'text',
1884 + 'label' => esc_html__( 'Footer Text', 'shopbuilder' ),
1885 + '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' ),
1886 + 'value' => esc_html__( 'Copyright @{year} | All rights reserved', 'shopbuilder' ),
1887 + 'tab' => 'general',
1888 + ],
1889 +
1890 + // Place Order.
1891 + 'login_button_styles_settings' => [
1892 + 'id' => 'login_button_styles_settings',
1893 + 'type' => 'title',
1894 + 'tab' => 'btn-styles',
1895 + 'label' => esc_html__( 'Login Button Style', 'shopbuilder' ),
1896 + ],
1897 + 'login_button_height' => [
1898 + 'id' => 'login_button_height',
1899 + 'label' => esc_html__( 'Height (px)', 'shopbuilder' ),
1900 + 'type' => 'slider',
1901 + 'min' => 10,
1902 + 'max' => 100,
1903 + 'unit' => 'px',
1904 + 'value' => 50,
1905 + 'tab' => 'btn-styles',
1906 + ],
1907 + 'login_button_width' => [
1908 + 'id' => 'login_button_width',
1909 + 'label' => esc_html__( 'Width (px)', 'shopbuilder' ),
1910 + 'type' => 'slider',
1911 + 'min' => 10,
1912 + 'max' => 1000,
1913 + 'unit' => 'px',
1914 + 'tab' => 'btn-styles',
1915 + ],
1916 + 'login_button_font_size' => [
1917 + 'id' => 'login_button_font_size',
1918 + 'label' => esc_html__( 'Font Size (px)', 'shopbuilder' ),
1919 + 'type' => 'slider',
1920 + 'min' => 10,
1921 + 'max' => 50,
1922 + 'unit' => 'px',
1923 + 'value' => 15,
1924 + 'tab' => 'btn-styles',
1925 + ],
1926 + 'login_button_bg_color' => [
1927 + 'id' => 'login_button_bg_color',
1928 + 'label' => esc_html__( 'Background Color', 'shopbuilder' ),
1929 + 'tab' => 'btn-styles',
1930 + 'type' => 'color',
1931 + ],
1932 + 'login_button_hover_bg_color' => [
1933 + 'id' => 'login_button_hover_bg_color',
1934 + 'label' => esc_html__( 'Hover Background Color', 'shopbuilder' ),
1935 + 'tab' => 'btn-styles',
1936 + 'type' => 'color',
1937 + ],
1938 + 'login_button_color' => [
1939 + 'id' => 'login_button_color',
1940 + 'label' => esc_html__( 'Color', 'shopbuilder' ),
1941 + 'tab' => 'btn-styles',
1942 + 'type' => 'color',
1943 + ],
1944 + 'login_button_hover_color' => [
1945 + 'id' => 'login_button_hover_color',
1946 + 'label' => esc_html__( 'Hover Color', 'shopbuilder' ),
1947 + 'tab' => 'btn-styles',
1948 + 'type' => 'color',
1949 + ],
1950 + 'login_button_border_color' => [
1951 + 'id' => 'login_button_border_color',
1952 + 'label' => esc_html__( 'Border Color', 'shopbuilder' ),
1953 + 'tab' => 'btn-styles',
1954 + 'type' => 'color',
1955 + ],
1956 + 'login_button_hover_border_color' => [
1957 + 'id' => 'login_button_hover_border_color',
1958 + 'label' => esc_html__( 'Hover Border Color', 'shopbuilder' ),
1959 + 'tab' => 'btn-styles',
1960 + 'type' => 'color',
1961 + ],
1962 +
1963 + // Place Order.
1964 + 'place_order_button_styles_settings' => [
1965 + 'id' => 'place_order_button_styles_settings',
1966 + 'type' => 'title',
1967 + 'tab' => 'btn-styles',
1968 + 'label' => esc_html__( 'Place Order Button Style', 'shopbuilder' ),
1969 + ],
1970 + 'place_order_button_height' => [
1971 + 'id' => 'place_order_button_height',
1972 + 'label' => esc_html__( 'Height (px)', 'shopbuilder' ),
1973 + 'type' => 'slider',
1974 + 'min' => 10,
1975 + 'max' => 100,
1976 + 'unit' => 'px',
1977 + 'value' => 50,
1978 + 'tab' => 'btn-styles',
1979 + ],
1980 + 'place_order_button_width' => [
1981 + 'id' => 'place_order_button_width',
1982 + 'label' => esc_html__( 'Width (px)', 'shopbuilder' ),
1983 + 'type' => 'slider',
1984 + 'min' => 10,
1985 + 'max' => 1000,
1986 + 'unit' => 'px',
1987 + 'tab' => 'btn-styles',
1988 + ],
1989 + 'place_order_button_font_size' => [
1990 + 'id' => 'place_order_button_font_size',
1991 + 'label' => esc_html__( 'Font Size (px)', 'shopbuilder' ),
1992 + 'type' => 'slider',
1993 + 'min' => 10,
1994 + 'max' => 50,
1995 + 'unit' => 'px',
1996 + 'value' => 15,
1997 + 'tab' => 'btn-styles',
1998 + ],
1999 + 'place_order_button_bg_color' => [
2000 + 'id' => 'place_order_button_bg_color',
2001 + 'label' => esc_html__( 'Background Color', 'shopbuilder' ),
2002 + 'tab' => 'btn-styles',
2003 + 'type' => 'color',
2004 + ],
2005 + 'place_order_button_hover_bg_color' => [
2006 + 'id' => 'place_order_button_hover_bg_color',
2007 + 'label' => esc_html__( 'Hover Background Color', 'shopbuilder' ),
2008 + 'tab' => 'btn-styles',
2009 + 'type' => 'color',
2010 + ],
2011 + 'place_order_button_color' => [
2012 + 'id' => 'place_order_button_color',
2013 + 'label' => esc_html__( 'Color', 'shopbuilder' ),
2014 + 'tab' => 'btn-styles',
2015 + 'type' => 'color',
2016 + ],
2017 + 'place_order_button_hover_color' => [
2018 + 'id' => 'place_order_button_hover_color',
2019 + 'label' => esc_html__( 'Hover Color', 'shopbuilder' ),
2020 + 'tab' => 'btn-styles',
2021 + 'type' => 'color',
2022 + ],
2023 + 'place_order_button_border_color' => [
2024 + 'id' => 'place_order_button_border_color',
2025 + 'label' => esc_html__( 'Border Color', 'shopbuilder' ),
2026 + 'tab' => 'btn-styles',
2027 + 'type' => 'color',
2028 + ],
2029 + 'place_order_button_hover_border_color' => [
2030 + 'id' => 'place_order_button_hover_border_color',
2031 + 'label' => esc_html__( 'Hover Border Color', 'shopbuilder' ),
2032 + 'tab' => 'btn-styles',
2033 + 'type' => 'color',
2034 + ],
2035 +
2036 + // Next Button.
2037 + 'next_button_styles_settings' => [
2038 + 'id' => 'next_button_styles_settings',
2039 + 'type' => 'title',
2040 + 'tab' => 'btn-styles',
2041 + 'label' => esc_html__( 'Next Button Style', 'shopbuilder' ),
2042 + 'dependency' => [
2043 + 'rules' => [
2044 + [
2045 + 'item' => 'modules.shopify_checkout.enable_multi_step',
2046 + 'value' => 'on',
2047 + 'operator' => '==',
2048 + ],
2049 + [
2050 + 'item' => 'modules.shopify_checkout.shop_continue_btn',
2051 + 'value' => 'on',
2052 + 'operator' => '==',
2053 + ],
2054 + ],
2055 + ],
2056 + ],
2057 + 'next_button_height' => [
2058 + 'id' => 'next_button_height',
2059 + 'isPro' => ! rtsb()->has_pro(),
2060 + 'label' => esc_html__( 'Height (px)', 'shopbuilder' ),
2061 + 'type' => 'slider',
2062 + 'min' => 10,
2063 + 'max' => 100,
2064 + 'unit' => 'px',
2065 + 'value' => 50,
2066 + 'tab' => 'btn-styles',
2067 + 'dependency' => [
2068 + 'rules' => [
2069 + [
2070 + 'item' => 'modules.shopify_checkout.enable_multi_step',
2071 + 'value' => 'on',
2072 + 'operator' => '==',
2073 + ],
2074 + [
2075 + 'item' => 'modules.shopify_checkout.shop_continue_btn',
2076 + 'value' => 'on',
2077 + 'operator' => '==',
2078 + ],
2079 + ],
2080 + ],
2081 + ],
2082 + 'next_button_width' => [
2083 + 'id' => 'next_button_width',
2084 + 'label' => esc_html__( 'Width (px)', 'shopbuilder' ),
2085 + 'type' => 'slider',
2086 + 'min' => 10,
2087 + 'max' => 1000,
2088 + 'unit' => 'px',
2089 + 'tab' => 'btn-styles',
2090 + 'dependency' => [
2091 + 'rules' => [
2092 + [
2093 + 'item' => 'modules.shopify_checkout.enable_multi_step',
2094 + 'value' => 'on',
2095 + 'operator' => '==',
2096 + ],
2097 + [
2098 + 'item' => 'modules.shopify_checkout.shop_continue_btn',
2099 + 'value' => 'on',
2100 + 'operator' => '==',
2101 + ],
2102 + ],
2103 + ],
2104 + ],
2105 + 'next_button_font_size' => [
2106 + 'id' => 'next_button_font_size',
2107 + 'isPro' => ! rtsb()->has_pro(),
2108 + 'label' => esc_html__( 'Font Size (px)', 'shopbuilder' ),
2109 + 'type' => 'slider',
2110 + 'min' => 10,
2111 + 'max' => 50,
2112 + 'unit' => 'px',
2113 + 'value' => 15,
2114 + 'tab' => 'btn-styles',
2115 + 'dependency' => [
2116 + 'rules' => [
2117 + [
2118 + 'item' => 'modules.shopify_checkout.enable_multi_step',
2119 + 'value' => 'on',
2120 + 'operator' => '==',
2121 + ],
2122 + [
2123 + 'item' => 'modules.shopify_checkout.shop_continue_btn',
2124 + 'value' => 'on',
2125 + 'operator' => '==',
2126 + ],
2127 + ],
2128 + ],
2129 + ],
2130 + 'next_button_bg_color' => [
2131 + 'id' => 'next_button_bg_color',
2132 + 'isPro' => ! rtsb()->has_pro(),
2133 + 'label' => esc_html__( 'Background Color', 'shopbuilder' ),
2134 + 'tab' => 'btn-styles',
2135 + 'type' => 'color',
2136 + 'dependency' => [
2137 + 'rules' => [
2138 + [
2139 + 'item' => 'modules.shopify_checkout.enable_multi_step',
2140 + 'value' => 'on',
2141 + 'operator' => '==',
2142 + ],
2143 + [
2144 + 'item' => 'modules.shopify_checkout.shop_continue_btn',
2145 + 'value' => 'on',
2146 + 'operator' => '==',
2147 + ],
2148 + ],
2149 + ],
2150 + ],
2151 + 'next_button_hover_bg_color' => [
2152 + 'id' => 'next_button_hover_bg_color',
2153 + 'isPro' => ! rtsb()->has_pro(),
2154 + 'label' => esc_html__( 'Hover Background Color', 'shopbuilder' ),
2155 + 'tab' => 'btn-styles',
2156 + 'type' => 'color',
2157 + 'dependency' => [
2158 + 'rules' => [
2159 + [
2160 + 'item' => 'modules.shopify_checkout.enable_multi_step',
2161 + 'value' => 'on',
2162 + 'operator' => '==',
2163 + ],
2164 + [
2165 + 'item' => 'modules.shopify_checkout.shop_continue_btn',
2166 + 'value' => 'on',
2167 + 'operator' => '==',
2168 + ],
2169 + ],
2170 + ],
2171 + ],
2172 + 'next_button_color' => [
2173 + 'id' => 'next_button_color',
2174 + 'isPro' => ! rtsb()->has_pro(),
2175 + 'label' => esc_html__( 'Color', 'shopbuilder' ),
2176 + 'tab' => 'btn-styles',
2177 + 'type' => 'color',
2178 + 'dependency' => [
2179 + 'rules' => [
2180 + [
2181 + 'item' => 'modules.shopify_checkout.enable_multi_step',
2182 + 'value' => 'on',
2183 + 'operator' => '==',
2184 + ],
2185 + [
2186 + 'item' => 'modules.shopify_checkout.shop_continue_btn',
2187 + 'value' => 'on',
2188 + 'operator' => '==',
2189 + ],
2190 + ],
2191 + ],
2192 + ],
2193 + 'next_button_hover_color' => [
2194 + 'id' => 'next_button_hover_color',
2195 + 'isPro' => ! rtsb()->has_pro(),
2196 + 'label' => esc_html__( 'Hover Color', 'shopbuilder' ),
2197 + 'tab' => 'btn-styles',
2198 + 'type' => 'color',
2199 + 'dependency' => [
2200 + 'rules' => [
2201 + [
2202 + 'item' => 'modules.shopify_checkout.enable_multi_step',
2203 + 'value' => 'on',
2204 + 'operator' => '==',
2205 + ],
2206 + [
2207 + 'item' => 'modules.shopify_checkout.shop_continue_btn',
2208 + 'value' => 'on',
2209 + 'operator' => '==',
2210 + ],
2211 + ],
2212 + ],
2213 + ],
2214 + 'next_button_border_color' => [
2215 + 'id' => 'next_button_border_color',
2216 + 'isPro' => ! rtsb()->has_pro(),
2217 + 'label' => esc_html__( 'Border Color', 'shopbuilder' ),
2218 + 'tab' => 'btn-styles',
2219 + 'type' => 'color',
2220 + 'dependency' => [
2221 + 'rules' => [
2222 + [
2223 + 'item' => 'modules.shopify_checkout.enable_multi_step',
2224 + 'value' => 'on',
2225 + 'operator' => '==',
2226 + ],
2227 + [
2228 + 'item' => 'modules.shopify_checkout.shop_continue_btn',
2229 + 'value' => 'on',
2230 + 'operator' => '==',
2231 + ],
2232 + ],
2233 + ],
2234 + ],
2235 + 'next_button_hover_border_color' => [
2236 + 'id' => 'next_button_hover_border_color',
2237 + 'isPro' => ! rtsb()->has_pro(),
2238 + 'label' => esc_html__( 'Hover Border Color', 'shopbuilder' ),
2239 + 'tab' => 'btn-styles',
2240 + 'type' => 'color',
2241 + 'dependency' => [
2242 + 'rules' => [
2243 + [
2244 + 'item' => 'modules.shopify_checkout.enable_multi_step',
2245 + 'value' => 'on',
2246 + 'operator' => '==',
2247 + ],
2248 + [
2249 + 'item' => 'modules.shopify_checkout.shop_continue_btn',
2250 + 'value' => 'on',
2251 + 'operator' => '==',
2252 + ],
2253 + ],
2254 + ],
2255 + ],
2256 + 'prev_button_styles_settings' => [
2257 + 'id' => 'prev_button_styles_settings',
2258 + 'type' => 'title',
2259 + 'tab' => 'btn-styles',
2260 + 'label' => esc_html__( 'Prev Button Style', 'shopbuilder' ),
2261 + 'dependency' => [
2262 + 'rules' => [
2263 + [
2264 + 'item' => 'modules.shopify_checkout.enable_multi_step',
2265 + 'value' => 'on',
2266 + 'operator' => '==',
2267 + ],
2268 + [
2269 + 'item' => 'modules.shopify_checkout.shop_return_btn',
2270 + 'value' => 'on',
2271 + 'operator' => '==',
2272 + ],
2273 + ],
2274 + ],
2275 +
2276 + ],
2277 + 'prev_button_height' => [
2278 + 'id' => 'prev_button_height',
2279 + 'isPro' => ! rtsb()->has_pro(),
2280 + 'label' => esc_html__( 'Height (px)', 'shopbuilder' ),
2281 + 'type' => 'slider',
2282 + 'min' => 10,
2283 + 'max' => 100,
2284 + 'unit' => 'px',
2285 + 'value' => 50,
2286 + 'tab' => 'btn-styles',
2287 + 'dependency' => [
2288 + 'rules' => [
2289 + [
2290 + 'item' => 'modules.shopify_checkout.enable_multi_step',
2291 + 'value' => 'on',
2292 + 'operator' => '==',
2293 + ],
2294 + [
2295 + 'item' => 'modules.shopify_checkout.shop_return_btn',
2296 + 'value' => 'on',
2297 + 'operator' => '==',
2298 + ],
2299 + ],
2300 + ],
2301 + ],
2302 + 'prev_button_width' => [
2303 + 'id' => 'prev_button_width',
2304 + 'label' => esc_html__( 'Width (px)', 'shopbuilder' ),
2305 + 'type' => 'slider',
2306 + 'min' => 10,
2307 + 'max' => 1000,
2308 + 'unit' => 'px',
2309 + 'tab' => 'btn-styles',
2310 + 'dependency' => [
2311 + 'rules' => [
2312 + [
2313 + 'item' => 'modules.shopify_checkout.enable_multi_step',
2314 + 'value' => 'on',
2315 + 'operator' => '==',
2316 + ],
2317 + [
2318 + 'item' => 'modules.shopify_checkout.shop_return_btn',
2319 + 'value' => 'on',
2320 + 'operator' => '==',
2321 + ],
2322 + ],
2323 + ],
2324 + ],
2325 + 'prev_button_font_size' => [
2326 + 'id' => 'prev_button_font_size',
2327 + 'isPro' => ! rtsb()->has_pro(),
2328 + 'label' => esc_html__( 'Font Size (px)', 'shopbuilder' ),
2329 + 'type' => 'slider',
2330 + 'min' => 10,
2331 + 'max' => 50,
2332 + 'unit' => 'px',
2333 + 'value' => 15,
2334 + 'tab' => 'btn-styles',
2335 + 'dependency' => [
2336 + 'rules' => [
2337 + [
2338 + 'item' => 'modules.shopify_checkout.enable_multi_step',
2339 + 'value' => 'on',
2340 + 'operator' => '==',
2341 + ],
2342 + [
2343 + 'item' => 'modules.shopify_checkout.shop_return_btn',
2344 + 'value' => 'on',
2345 + 'operator' => '==',
2346 + ],
2347 + ],
2348 + ],
2349 + ],
2350 + 'prev_button_bg_color' => [
2351 + 'id' => 'prev_button_bg_color',
2352 + 'isPro' => ! rtsb()->has_pro(),
2353 + 'label' => esc_html__( 'Background Color', 'shopbuilder' ),
2354 + 'tab' => 'btn-styles',
2355 + 'type' => 'color',
2356 + 'dependency' => [
2357 + 'rules' => [
2358 + [
2359 + 'item' => 'modules.shopify_checkout.enable_multi_step',
2360 + 'value' => 'on',
2361 + 'operator' => '==',
2362 + ],
2363 + [
2364 + 'item' => 'modules.shopify_checkout.shop_return_btn',
2365 + 'value' => 'on',
2366 + 'operator' => '==',
2367 + ],
2368 + ],
2369 + ],
2370 + ],
2371 + 'prev_button_hover_bg_color' => [
2372 + 'id' => 'prev_button_hover_bg_color',
2373 + 'label' => esc_html__( 'Hover Background Color', 'shopbuilder' ),
2374 + 'isPro' => ! rtsb()->has_pro(),
2375 + 'tab' => 'btn-styles',
2376 + 'type' => 'color',
2377 + 'dependency' => [
2378 + 'rules' => [
2379 + [
2380 + 'item' => 'modules.shopify_checkout.enable_multi_step',
2381 + 'value' => 'on',
2382 + 'operator' => '==',
2383 + ],
2384 + [
2385 + 'item' => 'modules.shopify_checkout.shop_return_btn',
2386 + 'value' => 'on',
2387 + 'operator' => '==',
2388 + ],
2389 + ],
2390 + ],
2391 + ],
2392 + 'prev_button_color' => [
2393 + 'id' => 'prev_button_color',
2394 + 'label' => esc_html__( 'Color', 'shopbuilder' ),
2395 + 'isPro' => ! rtsb()->has_pro(),
2396 + 'tab' => 'btn-styles',
2397 + 'type' => 'color',
2398 + 'dependency' => [
2399 + 'rules' => [
2400 + [
2401 + 'item' => 'modules.shopify_checkout.enable_multi_step',
2402 + 'value' => 'on',
2403 + 'operator' => '==',
2404 + ],
2405 + [
2406 + 'item' => 'modules.shopify_checkout.shop_return_btn',
2407 + 'value' => 'on',
2408 + 'operator' => '==',
2409 + ],
2410 + ],
2411 + ],
2412 + ],
2413 + 'prev_button_hover_color' => [
2414 + 'id' => 'prev_button_hover_color',
2415 + 'label' => esc_html__( 'Hover Color', 'shopbuilder' ),
2416 + 'isPro' => ! rtsb()->has_pro(),
2417 + 'tab' => 'btn-styles',
2418 + 'type' => 'color',
2419 + 'dependency' => [
2420 + 'rules' => [
2421 + [
2422 + 'item' => 'modules.shopify_checkout.enable_multi_step',
2423 + 'value' => 'on',
2424 + 'operator' => '==',
2425 + ],
2426 + [
2427 + 'item' => 'modules.shopify_checkout.shop_return_btn',
2428 + 'value' => 'on',
2429 + 'operator' => '==',
2430 + ],
2431 + ],
2432 + ],
2433 + ],
2434 + 'prev_button_border_color' => [
2435 + 'id' => 'prev_button_border_color',
2436 + 'label' => esc_html__( 'Border Color', 'shopbuilder' ),
2437 + 'isPro' => ! rtsb()->has_pro(),
2438 + 'tab' => 'btn-styles',
2439 + 'type' => 'color',
2440 + 'dependency' => [
2441 + 'rules' => [
2442 + [
2443 + 'item' => 'modules.shopify_checkout.enable_multi_step',
2444 + 'value' => 'on',
2445 + 'operator' => '==',
2446 + ],
2447 + [
2448 + 'item' => 'modules.shopify_checkout.shop_return_btn',
2449 + 'value' => 'on',
2450 + 'operator' => '==',
2451 + ],
2452 + ],
2453 + ],
2454 + ],
2455 + 'prev_button_hover_border_color' => [
2456 + 'id' => 'prev_button_hover_border_color',
2457 + 'label' => esc_html__( 'Hover Border Color', 'shopbuilder' ),
2458 + 'isPro' => ! rtsb()->has_pro(),
2459 + 'tab' => 'btn-styles',
2460 + 'type' => 'color',
2461 + 'dependency' => [
2462 + 'rules' => [
2463 + [
2464 + 'item' => 'modules.shopify_checkout.enable_multi_step',
2465 + 'value' => 'on',
2466 + 'operator' => '==',
2467 + ],
2468 + [
2469 + 'item' => 'modules.shopify_checkout.shop_return_btn',
2470 + 'value' => 'on',
2471 + 'operator' => '==',
2472 + ],
2473 + ],
2474 + ],
2475 + ],
2476 + 'coupon_button_styles_settings' => [
2477 + 'id' => 'coupon_button_styles_settings',
2478 + 'type' => 'title',
2479 + 'tab' => 'btn-styles',
2480 + 'label' => esc_html__( 'Apply Coupon Button Style', 'shopbuilder' ),
2481 + ],
2482 + 'coupon_height' => [
2483 + 'id' => 'coupon_height',
2484 + 'label' => esc_html__( 'Coupon Field And Button Height (px)', 'shopbuilder' ),
2485 + 'type' => 'slider',
2486 + 'min' => 10,
2487 + 'max' => 100,
2488 + 'unit' => 'px',
2489 + 'value' => 50,
2490 + 'tab' => 'btn-styles',
2491 + ],
2492 + 'coupon_button_font_size' => [
2493 + 'id' => 'coupon_button_font_size',
2494 + 'label' => esc_html__( 'Font Size (px)', 'shopbuilder' ),
2495 + 'type' => 'slider',
2496 + 'min' => 10,
2497 + 'max' => 50,
2498 + 'unit' => 'px',
2499 + 'value' => 15,
2500 + 'tab' => 'btn-styles',
2501 + ],
2502 + 'coupon_button_bg_color' => [
2503 + 'id' => 'coupon_button_bg_color',
2504 + 'label' => esc_html__( 'Background Color', 'shopbuilder' ),
2505 + 'tab' => 'btn-styles',
2506 + 'type' => 'color',
2507 + ],
2508 + 'coupon_button_hover_bg_color' => [
2509 + 'id' => 'coupon_button_hover_bg_color',
2510 + 'label' => esc_html__( 'Hover Background Color', 'shopbuilder' ),
2511 + 'tab' => 'btn-styles',
2512 + 'type' => 'color',
2513 + ],
2514 + 'coupon_button_color' => [
2515 + 'id' => 'coupon_button_color',
2516 + 'label' => esc_html__( 'Color', 'shopbuilder' ),
2517 + 'tab' => 'btn-styles',
2518 + 'type' => 'color',
2519 + ],
2520 + 'coupon_button_hover_color' => [
2521 + 'id' => 'coupon_button_hover_color',
2522 + 'label' => esc_html__( 'Hover Color', 'shopbuilder' ),
2523 + 'tab' => 'btn-styles',
2524 + 'type' => 'color',
2525 + ],
2526 + 'coupon_button_border_color' => [
2527 + 'id' => 'coupon_button_border_color',
2528 + 'label' => esc_html__( 'Border Color', 'shopbuilder' ),
2529 + 'tab' => 'btn-styles',
2530 + 'type' => 'color',
2531 + ],
2532 + 'coupon_button_hover_border_color' => [
2533 + 'id' => 'coupon_button_hover_border_color',
2534 + 'label' => esc_html__( 'Hover Border Color', 'shopbuilder' ),
2535 + 'tab' => 'btn-styles',
2536 + 'type' => 'color',
2537 + ],
2538 +
2539 + 'header_cart_icon_styles' => [
2540 + 'id' => 'header_cart_icon_styles',
2541 + 'type' => 'title',
2542 + 'tab' => 'styles',
2543 + 'label' => esc_html__( 'Header Cart Icon Style', 'shopbuilder' ),
2544 + 'dependency' => [
2545 + 'rules' => [
2546 + [
2547 + 'item' => 'modules.shopify_checkout.cart_icon_source',
2548 + 'value' => 'none',
2549 + 'operator' => '!=',
2550 + ],
2551 + ],
2552 + ],
2553 + ],
2554 +
2555 + 'shopify_cart_icon_height' => [
2556 + 'id' => 'shopify_cart_icon_height',
2557 + 'label' => esc_html__( 'Cart Icon Height (px)', 'shopbuilder' ),
2558 + 'type' => 'slider',
2559 + 'min' => 10,
2560 + 'max' => 200,
2561 + 'unit' => 'px',
2562 + 'value' => 40,
2563 + 'tab' => 'styles',
2564 + 'dependency' => [
2565 + 'rules' => [
2566 + [
2567 + 'item' => 'modules.shopify_checkout.cart_icon_source',
2568 + 'value' => 'upload_icon',
2569 + 'operator' => '==',
2570 + ],
2571 + ],
2572 + ],
2573 + ],
2574 +
2575 + 'header_cart_icon_color' => [
2576 + 'id' => 'step_menu_color',
2577 + 'label' => esc_html__( 'Color', 'shopbuilder' ),
2578 + 'tab' => 'styles',
2579 + 'type' => 'color',
2580 + 'dependency' => [
2581 + 'rules' => [
2582 + [
2583 + 'item' => 'modules.shopify_checkout.cart_icon_source',
2584 + 'value' => 'select_icon',
2585 + 'operator' => '==',
2586 + ],
2587 + ],
2588 + ],
2589 + ],
2590 + 'header_cart_icon_hover_color' => [
2591 + 'id' => 'header_cart_icon_hover_color',
2592 + 'label' => esc_html__( 'Hover Color', 'shopbuilder' ),
2593 + 'tab' => 'styles',
2594 + 'type' => 'color',
2595 + 'dependency' => [
2596 + 'rules' => [
2597 + [
2598 + 'item' => 'modules.shopify_checkout.cart_icon_source',
2599 + 'value' => 'select_icon',
2600 + 'operator' => '==',
2601 + ],
2602 + ],
2603 + ],
2604 + ],
2605 + 'header_cart_icon_font_size' => [
2606 + 'id' => 'header_cart_icon_font_size',
2607 + 'label' => esc_html__( 'Font Size (px)', 'shopbuilder' ),
2608 + 'type' => 'slider',
2609 + 'min' => 10,
2610 + 'max' => 50,
2611 + 'unit' => 'px',
2612 + 'value' => 15,
2613 + 'tab' => 'styles',
2614 + 'dependency' => [
2615 + 'rules' => [
2616 + [
2617 + 'item' => 'modules.shopify_checkout.cart_icon_source',
2618 + 'value' => 'select_icon',
2619 + 'operator' => '==',
2620 + ],
2621 + ],
2622 + ],
2623 + ],
2624 + 'footer_menu_styles_settings' => [
2625 + 'id' => 'footer_menu_styles_settings',
2626 + 'type' => 'title',
2627 + 'tab' => 'styles',
2628 + 'label' => esc_html__( 'Footer Style', 'shopbuilder' ),
2629 + ],
2630 + 'footer_menu_color' => [
2631 + 'id' => 'footer_menu_color',
2632 + 'label' => esc_html__( 'Menu Color', 'shopbuilder' ),
2633 + 'tab' => 'styles',
2634 + 'type' => 'color',
2635 + ],
2636 + 'footer_menu_hover_color' => [
2637 + 'id' => 'footer_menu_hover_color',
2638 + 'label' => esc_html__( 'Menu Hover Color', 'shopbuilder' ),
2639 + 'tab' => 'styles',
2640 + 'type' => 'color',
2641 + ],
2642 + 'footer_menu_font_size' => [
2643 + 'id' => 'footer_menu_font_size',
2644 + 'label' => esc_html__( 'Menu Font Size (px)', 'shopbuilder' ),
2645 + 'type' => 'slider',
2646 + 'min' => 10,
2647 + 'max' => 50,
2648 + 'unit' => 'px',
2649 + 'value' => 15,
2650 + 'tab' => 'styles',
2651 + ],
2652 + 'footer_text_size' => [
2653 + 'id' => 'footer_text_size',
2654 + 'label' => esc_html__( 'Footer Text Font Size (px)', 'shopbuilder' ),
2655 + 'type' => 'slider',
2656 + 'min' => 10,
2657 + 'max' => 50,
2658 + 'unit' => 'px',
2659 + 'value' => 15,
2660 + 'tab' => 'styles',
2661 + ],
2662 + 'footer_text_color' => [
2663 + 'id' => 'footer_text_color',
2664 + 'label' => esc_html__( 'Footer Text Color', 'shopbuilder' ),
2665 + 'tab' => 'styles',
2666 + 'type' => 'color',
2667 + ],
2668 + 'step_menu_styles_settings' => [
2669 + 'id' => 'step_menu_styles_settings',
2670 + 'type' => 'title',
2671 + 'tab' => 'styles',
2672 + 'label' => esc_html__( 'Step Menu Style', 'shopbuilder' ),
2673 + 'dependency' => [
2674 + 'rules' => [
2675 + [
2676 + 'item' => 'modules.shopify_checkout.enable_multi_step',
2677 + 'value' => 'on',
2678 + 'operator' => '==',
2679 + ],
2680 + [
2681 + 'item' => 'modules.shopify_checkout.show_step_menu',
2682 + 'value' => 'on',
2683 + 'operator' => '==',
2684 + ],
2685 + ],
2686 + ],
2687 + ],
2688 + 'step_menu_color' => [
2689 + 'id' => 'step_menu_color',
2690 + 'label' => esc_html__( 'Color', 'shopbuilder' ),
2691 + 'isPro' => ! rtsb()->has_pro(),
2692 + 'tab' => 'styles',
2693 + 'type' => 'color',
2694 + 'dependency' => [
2695 + 'rules' => [
2696 + [
2697 + 'item' => 'modules.shopify_checkout.enable_multi_step',
2698 + 'value' => 'on',
2699 + 'operator' => '==',
2700 + ],
2701 + [
2702 + 'item' => 'modules.shopify_checkout.show_step_menu',
2703 + 'value' => 'on',
2704 + 'operator' => '==',
2705 + ],
2706 + ],
2707 + ],
2708 + ],
2709 + 'step_menu_hover_color' => [
2710 + 'id' => 'step_menu_hover_color',
2711 + 'label' => esc_html__( 'Hover Color', 'shopbuilder' ),
2712 + 'isPro' => ! rtsb()->has_pro(),
2713 + 'tab' => 'styles',
2714 + 'type' => 'color',
2715 + 'dependency' => [
2716 + 'rules' => [
2717 + [
2718 + 'item' => 'modules.shopify_checkout.enable_multi_step',
2719 + 'value' => 'on',
2720 + 'operator' => '==',
2721 + ],
2722 + [
2723 + 'item' => 'modules.shopify_checkout.show_step_menu',
2724 + 'value' => 'on',
2725 + 'operator' => '==',
2726 + ],
2727 + ],
2728 + ],
2729 + ],
2730 + 'step_menu_font_size' => [
2731 + 'id' => 'step_menu_font_size',
2732 + 'label' => esc_html__( 'Font Size (px)', 'shopbuilder' ),
2733 + 'isPro' => ! rtsb()->has_pro(),
2734 + 'type' => 'slider',
2735 + 'min' => 10,
2736 + 'max' => 50,
2737 + 'unit' => 'px',
2738 + 'value' => 15,
2739 + 'tab' => 'styles',
2740 + 'dependency' => [
2741 + 'rules' => [
2742 + [
2743 + 'item' => 'modules.shopify_checkout.enable_multi_step',
2744 + 'value' => 'on',
2745 + 'operator' => '==',
2746 + ],
2747 + [
2748 + 'item' => 'modules.shopify_checkout.show_step_menu',
2749 + 'value' => 'on',
2750 + 'operator' => '==',
2751 + ],
2752 + ],
2753 + ],
2754 + ],
2755 + ];
2756 + return $fields;
2757 + }
2758 + /**
2759 + * @return array
2760 + */
2761 + public function product_badges_fields() {
2762 + return apply_filters(
2763 + 'rtsb/module/product_badges/fields',
2764 + [
2765 + 'hide_woocommerce_badge' => [
2766 + 'id' => 'hide_woocommerce_badge',
2767 + 'value' => '',
2768 + 'type' => 'switch',
2769 + 'label' => esc_html__( 'Hide Theme Badges', 'shopbuilder' ),
2770 + 'help' => esc_html__( 'Switch on to hide theme default badges.', 'shopbuilder' ),
2771 + 'tab' => 'general',
2772 + ],
2773 + // Hide "On sale".
2774 + 'hide_on_sale' => [
2775 + 'id' => 'hide_on_sale',
2776 + 'type' => 'select',
2777 + 'value' => 'all_products',
2778 + 'isPro' => ! rtsb()->has_pro(),
2779 + 'label' => esc_html__( 'Applicable Products', 'shopbuilder' ),
2780 + 'options' => [
2781 + 'all_products' => esc_html__( 'All products', 'shopbuilder' ),
2782 + 'where_custom_badge_applied' => esc_html__( 'Only for products which have custom badge enabled', 'shopbuilder' ),
2783 + ],
2784 + 'help' => esc_html__( 'Choose where to hide the default badges.', 'shopbuilder' ),
2785 + 'tab' => 'general',
2786 + 'dependency' => [
2787 + 'rules' => [
2788 + [
2789 + 'item' => 'modules.product_badges.hide_woocommerce_badge',
2790 + 'value' => 'on',
2791 + 'operator' => '==',
2792 + ],
2793 + ],
2794 + ],
2795 + ],
2796 +
2797 + 'group_badge_display_as' => [
2798 + 'id' => 'group_badge_display_as',
2799 + 'type' => 'select',
2800 + 'value' => 'horizontal',
2801 + 'isPro' => ! rtsb()->has_pro(),
2802 + 'label' => esc_html__( 'Group Badge Display Type', 'shopbuilder' ),
2803 + 'help' => sprintf(
2804 + // translators: %s for pro message.
2805 + esc_html__( 'Please choose the group display type. %s', 'shopbuilder' ),
2806 + ! rtsb()->has_pro()
2807 + ? sprintf(
2808 + '<a target="_blank" href="%s">%s </a> %s ',
2809 + esc_url( rtsb()->pro_version_link() ),
2810 + esc_html__( 'Upgrade to PRO', 'shopbuilder' ),
2811 + esc_html__( 'for vertical layout.', 'shopbuilder' )
2812 + )
2813 + : ''
2814 + ),
2815 + 'options' => [
2816 + 'horizontal' => esc_html__( 'Horizontal', 'shopbuilder' ),
2817 + 'vertical' => esc_html__( 'Vertical', 'shopbuilder' ),
2818 + ],
2819 + 'tab' => 'group',
2820 + ],
2821 + 'group_badge_gap' => [
2822 + 'id' => 'group_badge_gap',
2823 + 'type' => 'text',
2824 + 'value' => '10px',
2825 + 'label' => esc_html__( 'Group Badge Gap/Spacing', 'shopbuilder' ),
2826 + 'help' => esc_html__( 'Example: 10px', 'shopbuilder' ),
2827 + 'tab' => 'group',
2828 + ],
2829 + 'general_options' => [
2830 + 'id' => 'general_options',
2831 + 'type' => 'title',
2832 + 'label' => esc_html__( 'Shop Page Settings', 'shopbuilder' ),
2833 + 'tab' => 'group',
2834 + ],
2835 + 'loop_group_position' => [
2836 + 'id' => 'loop_group_position',
2837 + 'type' => 'select',
2838 + 'value' => 'above_image',
2839 + 'isPro' => ! rtsb()->has_pro(),
2840 + 'label' => esc_html__( 'Shop Page Group Position', 'shopbuilder' ),
2841 + 'help' => esc_html__( 'Choose the group badges position in Shop page.', 'shopbuilder' ),
2842 + 'options' => [
2843 + 'above_image' => esc_html__( 'Floating Above Image', 'shopbuilder' ),
2844 + 'before_product_title' => esc_html__( 'Before Product Title', 'shopbuilder' ),
2845 + 'after_product_title' => esc_html__( 'After Product Title', 'shopbuilder' ),
2846 + 'before_add_to_cart' => esc_html__( 'Before Add To Cart', 'shopbuilder' ),
2847 + 'after_add_to_cart' => esc_html__( 'After Add To Cart', 'shopbuilder' ),
2848 + 'custom' => esc_html__( 'Custom Position', 'shopbuilder' ),
2849 + ],
2850 + 'tab' => 'group',
2851 + ],
2852 + 'loop_custom_hook_name' => [
2853 + 'id' => 'loop_custom_hook_name',
2854 + 'type' => 'text',
2855 + 'label' => esc_html__( 'Enter Hook Name', 'shopbuilder' ),
2856 + 'tab' => 'group',
2857 + 'help' => sprintf(
2858 + /* translators: 1: The shortcode.*/
2859 + __( 'Or Copy the php code <br />%1$s<br /> and paste it in your product query where you want to show the button.', 'shopbuilder' ),
2860 + "<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>"
2861 + ),
2862 + 'dependency' => [
2863 + 'rules' => [
2864 + [
2865 + 'item' => 'modules.product_badges.loop_group_position',
2866 + 'value' => 'custom',
2867 + 'operator' => '==',
2868 + ],
2869 + ],
2870 + ],
2871 + ],
2872 + 'loop_priority_note' => [
2873 + 'type' => 'raw',
2874 + 'label' => ' ',
2875 + 'html' => '<span style="color:red">' . esc_html__( 'If the badge position is incorrect or not displayed, please adjust the priority of hooks accordingly by increasing or decreasing them as necessary.', 'shopbuilder' ) . '</span>',
2876 + 'dependency' => [
2877 + 'rules' => [
2878 + [
2879 + 'item' => 'modules.product_badges.loop_group_position',
2880 + 'value' => 'above_image',
2881 + 'operator' => '!=',
2882 + ],
2883 + ],
2884 + ],
2885 + 'tab' => 'group',
2886 + ],
2887 + 'group_position_hook_priority' => [
2888 + 'id' => 'group_position_hook_priority',
2889 + 'type' => 'number',
2890 + 'size' => 'small',
2891 + 'min' => 0,
2892 + 'max' => 999,
2893 + 'label' => esc_html__( 'Badge Position Priority', 'shopbuilder' ),
2894 + 'help' => esc_html__( 'It\'s depend on your theme functionality. Example: 20', 'shopbuilder' ),
2895 + 'tab' => 'group',
2896 + 'dependency' => [
2897 + 'rules' => [
2898 + [
2899 + 'item' => 'modules.product_badges.loop_group_position',
2900 + 'value' => 'above_image',
2901 + 'operator' => '!=',
2902 + ],
2903 + ],
2904 + ],
2905 + ],
2906 + 'group_badge_position' => [
2907 + 'id' => 'group_badge_position',
2908 + 'label' => esc_html__( 'Position Above Image', 'shopbuilder' ),
2909 + 'type' => 'text_select',
2910 + 'value' => 'top-left',
2911 + 'options' => [
2912 + 'top-left' => esc_html__( 'Top Left', 'shopbuilder' ),
2913 + 'top-right' => esc_html__( 'Top Right', 'shopbuilder' ),
2914 + 'bottom-left' => esc_html__( 'Bottom Left', 'shopbuilder' ),
2915 + 'bottom-right' => esc_html__( 'Bottom Right', 'shopbuilder' ),
2916 + ],
2917 + 'dependency' => [
2918 + 'rules' => [
2919 + [
2920 + 'item' => 'modules.product_badges.loop_group_position',
2921 + 'value' => 'above_image',
2922 + 'operator' => '==',
2923 + ],
2924 + ],
2925 + ],
2926 + 'tab' => 'group',
2927 + ],
2928 + 'product_options' => [
2929 + 'id' => 'product_options',
2930 + 'type' => 'title',
2931 + 'label' => esc_html__( 'Product Page Settings', 'shopbuilder' ),
2932 + 'tab' => 'group',
2933 + ],
2934 + 'product_page_group_position' => [
2935 + 'id' => 'product_page_group_position',
2936 + 'type' => 'select',
2937 + 'value' => 'above_image',
2938 + 'isPro' => ! rtsb()->has_pro(),
2939 + 'label' => esc_html__( 'Product Page Group Position', 'shopbuilder' ),
2940 + 'help' => esc_html__( 'Choose the group badges position in product page.', 'shopbuilder' ),
2941 + 'options' => [
2942 + 'above_image' => esc_html__( 'Floating Above Image', 'shopbuilder' ),
2943 + 'before_add_to_cart' => esc_html__( 'Before Add To Cart', 'shopbuilder' ),
2944 + 'after_add_to_cart' => esc_html__( 'After Add To Cart', 'shopbuilder' ),
2945 + 'after_summary' => esc_html__( 'After Summary', 'shopbuilder' ),
2946 + 'after_short_desc' => esc_html__( 'After Short Description', 'shopbuilder' ),
2947 + 'shortcode' => esc_html__( 'Use Shortcode', 'shopbuilder' ),
2948 + 'custom' => esc_html__( 'Custom Position', 'shopbuilder' ),
2949 + ],
2950 + 'tab' => 'group',
2951 + ],
2952 + 'product_page_badges_shortcode' => [
2953 + 'type' => 'raw',
2954 + 'label' => ' ',
2955 + 'html' => sprintf(
2956 + /* translators: 1: The shortcode.*/
2957 + 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' ),
2958 + '<code>[rtsb_badges]</code>'
2959 + ),
2960 + 'dependency' => [
2961 + 'rules' => [
2962 + [
2963 + 'item' => 'modules.product_badges.product_page_group_position',
2964 + 'value' => 'shortcode',
2965 + 'operator' => '==',
2966 + ],
2967 + ],
2968 + ],
2969 + 'tab' => 'group',
2970 + ],
2971 + 'product_page_custom_hook_name' => [
2972 + 'id' => 'product_page_custom_hook_name',
2973 + 'type' => 'text',
2974 + 'label' => esc_html__( 'Enter Hook Name', 'shopbuilder' ),
2975 + 'tab' => 'group',
2976 + 'help' => sprintf(
2977 + /* translators: 1: The shortcode.*/
2978 + __( 'Or Copy the php code <br />%1$s<br /> and paste it in your product query where you want to show the button.', 'shopbuilder' ),
2979 + "<code>&lt;?php do_action( 'rtsb/modules/product_badges/frontend/display' ); ?&gt;</code>"
2980 + ),
2981 + 'dependency' => [
2982 + 'rules' => [
2983 + [
2984 + 'item' => 'modules.product_badges.product_page_group_position',
2985 + 'value' => 'custom',
2986 + 'operator' => '==',
2987 + ],
2988 + ],
2989 + ],
2990 + ],
2991 + 'product_page_priority_note' => [
2992 + 'type' => 'raw',
2993 + 'label' => ' ',
2994 + 'html' => '<span style="color:red">' . esc_html__( 'If the badge position is incorrect or not displayed, please adjust the priority of hooks accordingly by increasing or decreasing them as necessary.', 'shopbuilder' ) . '</span>',
2995 + 'dependency' => [
2996 + 'rules' => [
2997 + [
2998 + 'item' => 'modules.product_badges.product_page_group_position',
2999 + 'value' => [ 'above_image', 'shortcode' ],
3000 + 'operator' => '!in',
3001 + ],
3002 + ],
3003 + ],
3004 + 'tab' => 'group',
3005 + ],
3006 + 'product_page_group_hook_priority' => [
3007 + 'id' => 'product_page_group_hook_priority',
3008 + 'type' => 'number',
3009 + 'size' => 'small',
3010 + 'min' => 0,
3011 + 'max' => 999,
3012 + 'label' => esc_html__( 'Badge Position Priority', 'shopbuilder' ),
3013 + 'help' => esc_html__( 'It\'s depend on your theme functionality. Example: 20', 'shopbuilder' ),
3014 + 'tab' => 'group',
3015 + 'dependency' => [
3016 + 'rules' => [
3017 + [
3018 + 'item' => 'modules.product_badges.product_page_group_position',
3019 + 'value' => [ 'shortcode', 'above_image' ],
3020 + 'operator' => '!in',
3021 + ],
3022 + ],
3023 + ],
3024 +
3025 + ],
3026 + 'product_page_group_badge_position' => [
3027 + 'id' => 'product_page_group_badge_position',
3028 + 'label' => esc_html__( 'Position Above Image', 'shopbuilder' ),
3029 + 'type' => 'text_select',
3030 + 'value' => 'top-left',
3031 + 'options' => [
3032 + 'top-left' => esc_html__( 'Top Left', 'shopbuilder' ),
3033 + 'top-right' => esc_html__( 'Top Right', 'shopbuilder' ),
3034 + 'bottom-left' => esc_html__( 'Bottom Left', 'shopbuilder' ),
3035 + 'bottom-right' => esc_html__( 'Bottom Right', 'shopbuilder' ),
3036 + ],
3037 + 'dependency' => [
3038 + 'rules' => [
3039 + [
3040 + 'item' => 'modules.product_badges.product_page_group_position',
3041 + 'value' => 'above_image',
3042 + 'operator' => '==',
3043 + ],
3044 + ],
3045 + ],
3046 + 'tab' => 'group',
3047 + ],
3048 +
3049 + 'badges_field_intro' => [
3050 + 'id' => 'badges_field_intro',
3051 + 'type' => 'description',
3052 + 'text' => esc_html__( 'To add new product badges, simply click on the \'Add New\' button below.', 'shopbuilder' ),
3053 + 'tab' => 'badges',
3054 + ],
3055 + 'badges_field' => [
3056 + 'id' => 'badges_field',
3057 + 'type' => 'repeaters',
3058 + 'label' => '',
3059 + 'tab' => 'badges',
3060 + 'repeat' => [
3061 +
3062 + 'title' => [
3063 + 'id' => 'title',
3064 + 'label' => esc_html__( 'Badge Name', 'shopbuilder' ),
3065 + 'help' => esc_html__( 'Enter badge name.', 'shopbuilder' ),
3066 + 'type' => 'text',
3067 + 'placeholder' => esc_html__( 'Badge Name', 'shopbuilder' ),
3068 + 'value' => esc_html__( 'Badge Name', 'shopbuilder' ),
3069 + ],
3070 + 'badge_condition' => [
3071 + 'id' => 'badge_condition',
3072 + 'type' => 'select',
3073 + 'value' => 'dynamic',
3074 + 'isPro' => ! rtsb()->has_pro(),
3075 + 'label' => esc_html__( 'Badge Type', 'shopbuilder' ),
3076 + 'help' => sprintf(
3077 + // translators: %s for pro message.
3078 + esc_html__( 'Select badge type. %s', 'shopbuilder' ),
3079 + ! rtsb()->has_pro()
3080 + ? sprintf(
3081 + '<a target="_blank" href="%s">%s</a> %s',
3082 + esc_url( rtsb()->pro_version_link() ),
3083 + esc_html__( 'Upgrade to PRO', 'shopbuilder' ),
3084 + esc_html__( 'unlock custom badge creation.', 'shopbuilder' )
3085 + )
3086 + : ''
3087 + ),
3088 + 'options' => [
3089 + 'dynamic' => esc_html__( 'Dynamic', 'shopbuilder' ),
3090 + 'custom' => esc_html__( 'Custom', 'shopbuilder' ),
3091 + ],
3092 + ],
3093 + 'badge_for' => [
3094 + 'id' => 'badge_for',
3095 + 'type' => 'select',
3096 + 'value' => 'on_sale',
3097 + 'label' => esc_html__( 'Dynamic Badge Condition', 'shopbuilder' ),
3098 + 'help' => esc_html__( 'Specify dynamic badge condition', 'shopbuilder' ),
3099 + 'options' => $this->dynamic_badge_list(),
3100 + 'dependency' => [
3101 + 'rules' => [
3102 + [
3103 + 'item' => 'modules.product_badges.badges_field.badge_condition',
3104 + 'value' => 'dynamic',
3105 + 'operator' => '==',
3106 + ],
3107 + ],
3108 + ],
3109 + ],
3110 + 'badge_for_pre_order' => [
3111 + 'type' => 'raw',
3112 + 'label' => ' ',
3113 + 'html' => esc_html__( 'Please ensure that Pre-Order module is activated and properly configured.', 'shopbuilder' ),
3114 + 'tab' => 'general',
3115 + 'dependency' => [
3116 + 'rules' => [
3117 + [
3118 + 'item' => 'modules.product_badges.badges_field.badge_condition',
3119 + 'value' => 'dynamic',
3120 + 'operator' => '==',
3121 + ],
3122 + [
3123 + 'item' => 'modules.product_badges.badges_field.badge_for',
3124 + 'value' => 'pre_order',
3125 + 'operator' => '==',
3126 + ],
3127 + ],
3128 + ],
3129 + ],
3130 + 'minimum_sale_count' => [
3131 + 'id' => 'minimum_sale_count',
3132 + 'type' => 'number',
3133 + 'label' => esc_html__( 'Minimum Sale Count', 'shopbuilder' ),
3134 + 'help' => esc_html__( 'Enter the number of Sale you want to designate for products to be labeled as \'Best Selling.\'', 'shopbuilder' ),
3135 + 'dependency' => [
3136 + 'rules' => [
3137 + [
3138 + 'item' => 'modules.product_badges.badges_field.badge_condition',
3139 + 'value' => 'dynamic',
3140 + 'operator' => '==',
3141 + ],
3142 + [
3143 + 'item' => 'modules.product_badges.badges_field.badge_for',
3144 + 'value' => 'best_selling',
3145 + 'operator' => '==',
3146 + ],
3147 + ],
3148 + ],
3149 + ],
3150 + 'new_arrival_days' => [
3151 + 'id' => 'new_arrival_days',
3152 + 'type' => 'number',
3153 + 'label' => esc_html__( 'Specify Number of Days', 'shopbuilder' ),
3154 + 'help' => esc_html__( 'Enter the number of days you want to designate for products to be labeled as \'New Arrivals.\'', 'shopbuilder' ),
3155 + 'dependency' => [
3156 + 'rules' => [
3157 + [
3158 + 'item' => 'modules.product_badges.badges_field.badge_for',
3159 + 'value' => 'new_arrival',
3160 + 'operator' => '==',
3161 + ],
3162 + ],
3163 + ],
3164 + ],
3165 + 'badges_type' => [
3166 + 'id' => 'badges_type',
3167 + 'type' => 'select',
3168 + 'value' => 'text',
3169 + 'isPro' => ! rtsb()->has_pro(),
3170 + 'label' => esc_html__( 'Show Badge As:', 'shopbuilder' ),
3171 + 'help' => sprintf(
3172 + // translators: %s for pro message.
3173 + esc_html__( 'Specify the badge display as Image Or Text. %s', 'shopbuilder' ),
3174 + ! rtsb()->has_pro()
3175 + ? sprintf(
3176 + '<a target="_blank" href="%s">%s</a> %s',
3177 + esc_url( rtsb()->pro_version_link() ),
3178 + esc_html__( 'Upgrade to PRO', 'shopbuilder' ),
3179 + esc_html__( 'unlock Image badge creation.', 'shopbuilder' )
3180 + )
3181 + : ''
3182 + ),
3183 + 'options' => [
3184 + 'image' => esc_html__( 'Image', 'shopbuilder' ),
3185 + 'text' => esc_html__( 'Text', 'shopbuilder' ),
3186 + ],
3187 + ],
3188 +
3189 + 'badge_preset' => [
3190 + 'id' => 'badge_preset',
3191 + 'label' => esc_html__( 'Text Badge Preset', 'shopbuilder' ),
3192 + 'help' => esc_html__( 'Choose the badge appearance', 'shopbuilder' ),
3193 + 'type' => 'image_select',
3194 + 'value' => 'preset1',
3195 + 'options' => [
3196 + 'preset1' => [
3197 + 'label' => esc_html__( 'Preset 1', 'shopbuilder' ),
3198 + 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/badge-preset-1.png' ) ),
3199 + ],
3200 +
3201 + 'preset2' => [
3202 + 'label' => esc_html__( 'Preset 2', 'shopbuilder' ),
3203 + 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/badge-preset-2.png' ) ),
3204 + ],
3205 +
3206 + 'preset3' => [
3207 + 'label' => esc_html__( 'Preset 3', 'shopbuilder' ),
3208 + 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/badge-preset-3.png' ) ),
3209 + ],
3210 +
3211 + 'preset4' => [
3212 + 'title' => esc_html__( 'Preset 4', 'shopbuilder' ),
3213 + 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/badge-preset-4.png' ) ),
3214 + ],
3215 + ],
3216 + 'dependency' => [
3217 + 'rules' => [
3218 + [
3219 + 'item' => 'modules.product_badges.badges_field.badges_type',
3220 + 'value' => 'text',
3221 + 'operator' => '==',
3222 + ],
3223 + ],
3224 + ],
3225 + ],
3226 + 'badges_text' => [
3227 + 'id' => 'badges_text',
3228 + 'label' => esc_html__( 'Enter Badge Text', 'shopbuilder' ),
3229 + 'help' => esc_html__( 'The badge text will be displayed when the dynamic percentage switch is turned off.', 'shopbuilder' ),
3230 + 'type' => 'text',
3231 + 'placeholder' => 'Badge Text',
3232 + 'value' => esc_html__( 'New', 'shopbuilder' ),
3233 + 'dependency' => [
3234 + 'rules' => [
3235 + [
3236 + 'item' => 'modules.product_badges.badges_field.badges_type',
3237 + 'value' => 'text',
3238 + 'operator' => '==',
3239 + ],
3240 + ],
3241 + ],
3242 + ],
3243 + 'show_badges_percent_text' => [
3244 + 'id' => 'show_badges_percent_text',
3245 + 'type' => 'switch',
3246 + // 'isPro' => ! rtsb()->has_pro(),
3247 + 'label' => esc_html__( 'Show Badges Percentage (%)', 'shopbuilder' ),
3248 + 'help' => esc_html__( 'Switch on to show badge as dynamic percentage instead of text.', 'shopbuilder' ),
3249 + 'dependency' => [
3250 + 'rules' => [
3251 + [
3252 + 'item' => 'modules.product_badges.badges_field.badge_for',
3253 + 'value' => 'on_sale',
3254 + 'operator' => '==',
3255 + ],
3256 + [
3257 + 'item' => 'modules.product_badges.badges_field.badges_type',
3258 + 'value' => 'text',
3259 + 'operator' => '==',
3260 + ],
3261 + [
3262 + 'item' => 'modules.product_badges.badges_field.badge_condition',
3263 + 'value' => 'dynamic',
3264 + 'operator' => '==',
3265 + ],
3266 +
3267 + ],
3268 + ],
3269 + ],
3270 +
3271 + 'upload_image' => [
3272 + 'id' => 'upload_image',
3273 + 'type' => 'fileupload',
3274 + 'label' => esc_html__( 'Upload Image', 'shopbuilder' ),
3275 + 'help' => esc_html__( 'Upload badge image.', 'shopbuilder' ),
3276 + 'tab' => 'general',
3277 + 'dependency' => [
3278 + 'rules' => [
3279 + [
3280 + 'item' => 'modules.product_badges.badges_field.badges_type',
3281 + 'value' => 'image',
3282 + 'operator' => '==',
3283 + ],
3284 + ],
3285 + ],
3286 + ],
3287 +
3288 + 'apply_for' => [
3289 + 'id' => 'apply_for',
3290 + 'type' => 'select',
3291 + 'value' => 'product',
3292 + 'isPro' => ! rtsb()->has_pro(),
3293 + 'label' => esc_html__( 'Applicable For', 'shopbuilder' ),
3294 + 'options' => [
3295 + 'product' => esc_html__( 'Products', 'shopbuilder' ),
3296 + 'product_cat' => esc_html__( 'Product Categories', 'shopbuilder' ),
3297 + ],
3298 + 'help' => esc_html__( 'Badges will apply for selected products, or categories.', 'shopbuilder' ),
3299 + ],
3300 + 'applicable_products' => [
3301 + 'id' => 'applicable_products',
3302 + 'type' => 'search_and_multi_select',
3303 + 'label' => esc_html__( 'Applicable Products', 'shopbuilder' ),
3304 + 'help' => esc_html__( 'Choose products to include. Leave blank to apply in all product.', 'shopbuilder' ),
3305 + 'placeholder' => esc_html__( 'Search Products', 'shopbuilder' ),
3306 + 'func_with_param' => [ Fns::class, 'get_post_types', [ 'post_type' => 'product' ] ],
3307 + 'options' => Fns::get_post_types( null, [ 'post_type' => 'product' ] ),
3308 + 'dependency' => [
3309 + 'rules' => [
3310 + [
3311 + 'item' => 'modules.product_badges.badges_field.apply_for',
3312 + 'value' => 'product',
3313 + 'operator' => '==',
3314 + ],
3315 + ],
3316 + ],
3317 + ],
3318 + 'applicable_categories' => [
3319 + 'id' => 'applicable_categories',
3320 + 'type' => 'search_and_multi_select',
3321 + 'label' => esc_html__( 'Applicable Categories', 'shopbuilder' ),
3322 + 'help' => esc_html__( 'Choose categories to include. Leave blank to apply in all categories.', 'shopbuilder' ),
3323 + 'placeholder' => esc_html__( 'Search Category', 'shopbuilder' ),
3324 + 'func_with_param' => [
3325 + Fns::class,
3326 + 'products_category_query',
3327 + ],
3328 + 'options' => Fns::products_category_query(),
3329 + 'dependency' => [
3330 + 'rules' => [
3331 + [
3332 + 'item' => 'modules.product_badges.badges_field.apply_for',
3333 + 'value' => 'product_cat',
3334 + 'operator' => '==',
3335 + ],
3336 + ],
3337 + ],
3338 + ],
3339 + 'exclude_product' => [
3340 + 'id' => 'exclude_product',
3341 + 'type' => 'search_and_multi_select',
3342 + 'isPro' => ! rtsb()->has_pro(),
3343 + 'label' => esc_html__( 'Exclude Products', 'shopbuilder' ),
3344 + 'help' => esc_html__( 'Choose products to exclude. Leave blank to exclude none.', 'shopbuilder' ),
3345 + 'placeholder' => esc_html__( 'Search Products', 'shopbuilder' ),
3346 + 'func_with_param' => [ Fns::class, 'get_post_types', [ 'post_type' => 'product' ] ],
3347 + 'options' => Fns::get_post_types( null, [ 'post_type' => 'product' ] ),
3348 + ],
3349 +
3350 + /**
3351 + * Style Settings
3352 + */
3353 + 'styles_settings' => [
3354 + 'id' => 'styles_settings',
3355 + 'type' => 'title',
3356 + 'label' => esc_html__( 'Style Settings', 'shopbuilder' ),
3357 + ],
3358 + 'badge_text_color' => [
3359 + 'id' => 'badge_text_color',
3360 + 'label' => esc_html__( 'Text Color', 'shopbuilder' ),
3361 + 'type' => 'color',
3362 + 'dependency' => [
3363 + 'rules' => [
3364 + [
3365 + 'item' => 'modules.product_badges.badges_field.badges_type',
3366 + 'value' => 'text',
3367 + 'operator' => '==',
3368 + ],
3369 + ],
3370 + ],
3371 + ],
3372 + 'badge_bg_color' => [
3373 + 'id' => 'badge_bg_color',
3374 + 'label' => esc_html__( 'Background Color', 'shopbuilder' ),
3375 + 'type' => 'color',
3376 + 'dependency' => [
3377 + 'rules' => [
3378 + [
3379 + 'item' => 'modules.product_badges.badges_field.badges_type',
3380 + 'value' => 'text',
3381 + 'operator' => '==',
3382 + ],
3383 + [
3384 + 'item' => 'modules.product_badges.badges_field.badges_type',
3385 + 'value' => 'text',
3386 + 'operator' => '==',
3387 + ],
3388 + [
3389 + 'item' => 'modules.product_badges.badges_field.badge_preset',
3390 + 'value' => [ 'preset1', 'preset2' ],
3391 + 'operator' => 'in',
3392 + ],
3393 + ],
3394 + ],
3395 + ],
3396 + 'badge_border_color' => [
3397 + 'id' => 'badge_border_color',
3398 + 'label' => esc_html__( 'Border Color', 'shopbuilder' ),
3399 + 'type' => 'color',
3400 + 'dependency' => [
3401 + 'rules' => [
3402 + [
3403 + 'item' => 'modules.product_badges.badges_field.badges_type',
3404 + 'value' => 'text',
3405 + 'operator' => '==',
3406 + ],
3407 + [
3408 + 'item' => 'modules.product_badges.badges_field.badges_type',
3409 + 'value' => 'text',
3410 + 'operator' => '==',
3411 + ],
3412 + [
3413 + 'item' => 'modules.product_badges.badges_field.badge_preset',
3414 + 'value' => [ 'preset3', 'preset4' ],
3415 + 'operator' => 'in',
3416 + ],
3417 + ],
3418 + ],
3419 + ],
3420 + 'badge_font_size' => [
3421 + 'id' => 'badge_font_size',
3422 + 'type' => 'text',
3423 + 'label' => esc_html__( 'Font Size', 'shopbuilder' ),
3424 + 'help' => esc_html__( 'Example: 14px', 'shopbuilder' ),
3425 + 'dependency' => [
3426 + 'rules' => [
3427 + [
3428 + 'item' => 'modules.product_badges.badges_field.badges_type',
3429 + 'value' => 'text',
3430 + 'operator' => '==',
3431 + ],
3432 + ],
3433 + ],
3434 + ],
3435 + 'badge_font_width' => [
3436 + 'id' => 'badge_font_width',
3437 + 'type' => 'select',
3438 + 'value' => '400',
3439 + 'label' => esc_html__( 'Font Weight', 'shopbuilder' ),
3440 + 'options' => [
3441 + '100' => '100',
3442 + '200' => '200',
3443 + '300' => '300',
3444 + '400' => '400',
3445 + '500' => '500',
3446 + '600' => '600',
3447 + '700' => '700',
3448 + '800' => '800',
3449 + '900' => '900',
3450 + 'normal' => 'normal',
3451 + 'bold' => 'bold',
3452 + 'bolder' => 'bolder',
3453 + 'lighter' => 'lighter',
3454 + 'initial' => 'initial',
3455 + 'inherit' => 'inherit',
3456 + ],
3457 + 'dependency' => [
3458 + 'rules' => [
3459 + [
3460 + 'item' => 'modules.product_badges.badges_field.badges_type',
3461 + 'value' => 'text',
3462 + 'operator' => '==',
3463 + ],
3464 + ],
3465 + ],
3466 + ],
3467 + 'badge_width' => [
3468 + 'id' => 'badge_width',
3469 + 'type' => 'text',
3470 + 'label' => esc_html__( 'Width', 'shopbuilder' ),
3471 + 'help' => esc_html__( 'Example: 150px', 'shopbuilder' ),
3472 + 'dependency' => [
3473 + 'rules' => [
3474 + [
3475 + 'item' => 'modules.product_badges.badges_field.badges_type',
3476 + 'value' => 'image',
3477 + 'operator' => '==',
3478 + ],
3479 + ],
3480 + ],
3481 + ],
3482 + 'badge_height' => [
3483 + 'id' => 'badge_height',
3484 + 'type' => 'text',
3485 + 'label' => esc_html__( 'Height', 'shopbuilder' ),
3486 + 'help' => esc_html__( 'Example: 50px', 'shopbuilder' ),
3487 + 'dependency' => [
3488 + 'rules' => [
3489 + [
3490 + 'item' => 'modules.product_badges.badges_field.badges_type',
3491 + 'value' => 'image',
3492 + 'operator' => '==',
3493 + ],
3494 + ],
3495 + ],
3496 + ],
3497 + 'border_radius' => [
3498 + 'id' => 'border_radius',
3499 + 'type' => 'text',
3500 + 'size' => 'small',
3501 + 'label' => esc_html__( 'Border Radius', 'shopbuilder' ),
3502 + 'help' => esc_html__( 'Example: 20px 20px 20px 20px Or 20px', 'shopbuilder' ),
3503 + 'dependency' => [
3504 + 'rules' => [
3505 + [
3506 + 'item' => 'modules.product_badges.badges_field.badges_type',
3507 + 'value' => 'text',
3508 + 'operator' => '==',
3509 + ],
3510 + ],
3511 + ],
3512 + ],
3513 + 'badge_padding' => [
3514 + 'id' => 'badge_padding',
3515 + 'type' => 'text',
3516 + 'size' => 'small',
3517 + 'label' => esc_html__( 'Padding', 'shopbuilder' ),
3518 + 'help' => esc_html__( 'Example: 10px 15px 10px 15px', 'shopbuilder' ),
3519 + 'dependency' => [
3520 + 'rules' => [
3521 + [
3522 + 'item' => 'modules.product_badges.badges_field.badges_type',
3523 + 'value' => 'text',
3524 + 'operator' => '==',
3525 + ],
3526 + ],
3527 + ],
3528 + ],
3529 + ],
3530 + ],
3531 +
3532 + ]
3533 + );
3534 + }
3535 +
3536 + /**
3537 + * Dynamic badge list.
3538 + *
3539 + * @return array
3540 + */
3541 + public function dynamic_badge_list() {
3542 + $items = [
3543 + 'on_sale' => esc_html__( 'Products On Sale', 'shopbuilder' ),
3544 + 'featured' => esc_html__( 'Featured Products', 'shopbuilder' ),
3545 + 'out_of_stock' => esc_html__( 'Out Of Stock Products', 'shopbuilder' ),
3546 + 'best_selling' => esc_html__( 'Best Selling Products', 'shopbuilder' ),
3547 + 'new_arrival' => esc_html__( 'New Arrival Products', 'shopbuilder' ),
3548 + ];
3549 +
3550 + if ( rtsb()->has_pro() && method_exists( FnsPro::class, 'is_module_active' ) && FnsPro::is_module_active( 'pre_order' ) ) {
3551 + $items['pre_order'] = esc_html__( 'Pre-Order Products', 'shopbuilder' );
3552 + }
3553 +
3554 + return $items;
1119 3555 }
1120 3556 }