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