PluginProbe
ShopBuilder – WooCommerce Builder For Elementor / 2.6.0
ShopBuilder – WooCommerce Builder For Elementor v2.6.0
3.4.2 3.4.1 3.4.0 2.0.1 2.0.2 2.0.3 2.1.0 2.1.1 2.1.10 2.1.11 2.1.12 2.1.13 2.1.14 2.1.15 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 2.2.0 2.2.1 2.2.2 All 63 releases
← All changes | app/Models/ModuleList.php +2672 -72 2.1.62.6.0 View file →
@@ -1,25 +1,46 @@
1 1 <?php
2 +/**
3 + * ShopBuilder Module List.
4 + *
5 + * @package RadiusTheme\SB
6 + */
2 7
3 8 namespace RadiusTheme\SB\Models;
4 9
5 10 use RadiusTheme\SB\Helpers\Fns;
6 11 use RadiusTheme\SB\Models\Base\ListModel;
12 +use RadiusTheme\SB\Modules\Badges\Badges;
13 +use RadiusTheme\SB\Modules\CheckoutEditor\CheckoutEditorInit;
14 +use RadiusTheme\SB\Modules\CheckoutEditor\CheckoutFns;
15 +use RadiusTheme\SB\Modules\ShopifyCheckout\ShopifyCheckout;
16 +use RadiusTheme\SB\Traits\SingletonTrait;
7 17 use RadiusTheme\SB\Modules\Compare\Compare;
18 +use RadiusTheme\SB\Modules\WishList\Wishlist;
8 19 use RadiusTheme\SB\Modules\Compare\CompareFns;
9 20 use RadiusTheme\SB\Modules\QuickView\QuickView;
10 -use RadiusTheme\SB\Modules\WishList\Wishlist;
11 21 use RadiusTheme\SB\Modules\WishList\WishlistFns;
12 -use RadiusTheme\SB\Traits\SingletonTrait;
22 +use RadiusTheme\SBPRO\Helpers\FnsPro;
13 23
14 24 defined( 'ABSPATH' ) || exit;
15 25
26 +/**
27 + * ShopBuilder Module List.
28 + */
16 29 class ModuleList extends ListModel {
17 30
18 31 use SingletonTrait;
19 32
33 + /**
34 + * List ID.
35 + *
36 + * @var string
37 + */
20 38 protected $list_id = 'modules';
21 39
40 + /**
41 + * Class constructor.
42 + */
22 43 public function __construct() {
23 44 parent::__construct();
24 45 $this->title = esc_html__( 'Modules', 'shopbuilder' );
25 46 $this->description = esc_html__( 'Here you can find the list of all the modules. You can individually enable or disable the modules. Or you can do that by one click.', 'shopbuilder' );
@@ -24,11 +45,16 @@
24 45 $this->title = esc_html__( 'Modules', 'shopbuilder' );
25 46 $this->description = esc_html__( 'Here you can find the list of all the modules. You can individually enable or disable the modules. Or you can do that by one click.', 'shopbuilder' );
26 47 }
27 48
49 + /**
50 + * Module list.
51 + *
52 + * @return mixed|null
53 + */
28 54 protected function raw_list() {
29 55 $list = [
30 - 'quick_view' => apply_filters(
56 + 'quick_view' => apply_filters(
31 57 'rtsb/module/quick_view/options',
32 58 [
33 59 'id' => 'quick_view',
34 60 'title' => esc_html__( 'Quick View', 'shopbuilder' ),
@@ -39,8 +65,16 @@
39 65 'active_field' => [
40 66 'label' => esc_html__( 'Enable Quick View?', 'shopbuilder' ),
41 67 'help' => esc_html__( 'Switch on to enable quick view module.', 'shopbuilder' ),
42 68 ],
69 + 'tabs' => [
70 + 'general' => [
71 + 'title' => esc_html__( 'General', 'shopbuilder' ),
72 + ],
73 + 'style' => [
74 + 'title' => esc_html__( 'Style', 'shopbuilder' ),
75 + ],
76 + ],
43 77 'fields' => apply_filters(
44 78 'rtsb/module/quick_view/fields',
45 79 [
46 80 'loop_btn_position' => [
@@ -48,8 +82,9 @@
48 82 'type' => 'select',
49 83 'value' => 'custom',
50 84 'label' => esc_html__( 'Shop Page Button Position', 'shopbuilder' ),
51 85 'help' => esc_html__( 'You can manage quick view button position in shop page.', 'shopbuilder' ),
86 + 'tab' => 'general',
52 87 'options' => [
53 88 'before_add_to_cart' => esc_html__( 'Before Add To Cart', 'shopbuilder' ),
54 89 'after_add_to_cart' => esc_html__( 'After Add To Cart', 'shopbuilder' ),
55 90 'shortcode' => esc_html__( 'Use Shortcode', 'shopbuilder' ),
@@ -54,8 +89,9 @@
54 89 'after_add_to_cart' => esc_html__( 'After Add To Cart', 'shopbuilder' ),
55 90 'shortcode' => esc_html__( 'Use Shortcode', 'shopbuilder' ),
56 91 'custom' => esc_html__( 'Custom Position', 'shopbuilder' ),
57 92 ],
93 +
58 94 ],
59 95 'loop_btn_position_shortcode' => [
60 96 'type' => 'raw',
61 97 'label' => ' ',
@@ -63,8 +99,9 @@
63 99 /* translators: 1: The shortcode.*/
64 100 esc_html__( 'Choose where to show button in WooCommerce product\'s loop. Copy this shortcode %1$s and paste it where you want to show the button.', 'shopbuilder' ),
65 101 '<code>[rtsb_quick_view_button]</code>'
66 102 ),
103 + 'tab' => 'general',
67 104 'dependency' => [
68 105 'rules' => [
69 106 [
70 107 'item' => 'modules.quick_view.loop_btn_position',
@@ -80,10 +117,11 @@
80 117 'label' => esc_html__( 'Enter Hook Name', 'shopbuilder' ),
81 118 'help' => sprintf(
82 119 /* translators: 1: The shortcode.*/
83 120 esc_html__( 'Or Copy the php code %1$s and paste it in your product query where you want to show the button.', 'shopbuilder' ),
84 - "<code>&lt;?php do_action( 'rtsb/modules/quick_view/frontend/display' ); ?&gt;</code>"
121 + "<br /><code>&lt;?php do_action( 'rtsb/modules/quick_view/frontend/display' ); ?&gt;</code><br />"
85 122 ),
123 + 'tab' => 'general',
86 124 'dependency' => [
87 125 'rules' => [
88 126 [
89 127 'item' => 'modules.quick_view.loop_btn_position',
@@ -100,8 +138,9 @@
100 138 'size' => 'small',
101 139 'min' => 0,
102 140 'max' => 999,
103 141 'label' => esc_html__( 'Hook Priority', 'shopbuilder' ),
142 + 'tab' => 'general',
104 143 'dependency' => [
105 144 'rules' => [
106 145 [
107 146 'item' => 'modules.quick_view.loop_btn_position',
@@ -117,14 +156,69 @@
117 156 'help' => esc_html__( 'Enter your quick view button text.', 'shopbuilder' ),
118 157 'type' => 'text',
119 158 'value' => 'Quick View',
120 159 'placeholder' => 'Quick View',
160 + 'tab' => 'general',
121 161 ],
162 +
163 + // Module Style.
164 + 'modal_width' => [
165 + 'id' => 'modal_width',
166 + 'label' => esc_html__( 'Modal Width (in px)', 'shopbuilder' ),
167 + 'help' => esc_html__( 'Quick view button modal width. Example: 950', 'shopbuilder' ),
168 + 'type' => 'number',
169 + 'value' => '',
170 + 'tab' => 'style',
171 + ],
172 +
173 + 'modal_height' => [
174 + 'id' => 'modal_height',
175 + 'label' => esc_html__( 'Modal Height', 'shopbuilder' ),
176 + 'help' => esc_html__( 'Quick view button modal height. Example: 450px', 'shopbuilder' ),
177 + 'type' => 'text',
178 + 'value' => '',
179 + 'tab' => 'style',
180 + ],
181 +
182 + 'modal_wrapper_padding' => [
183 + 'id' => 'modal_wrapper_padding',
184 + 'label' => esc_html__( 'Modal Wrapper Padding', 'shopbuilder' ),
185 + 'help' => esc_html__( 'Quick view modal wrapper padding. Example 1: 20px, Example 2: 20px 20px 20px 20px', 'shopbuilder' ),
186 + 'type' => 'text',
187 + 'value' => '',
188 + 'tab' => 'style',
189 + ],
190 + 'modal_bg_color' => [
191 + 'id' => 'modal_bg_color',
192 + 'label' => esc_html__( 'Modal Backgroud Color', 'shopbuilder' ),
193 + 'help' => esc_html__( 'Quick view modal background color. Example: #fff', 'shopbuilder' ),
194 + 'type' => 'color',
195 + 'value' => '',
196 + 'tab' => 'style',
197 + ],
198 + 'modal_box_shadow_color' => [
199 + 'id' => 'modal_box_shadow_color',
200 + 'label' => esc_html__( 'Modal Box Shadow Color', 'shopbuilder' ),
201 + 'help' => esc_html__( 'Quick view modal box shadow. Example: #000', 'shopbuilder' ),
202 + 'type' => 'color',
203 + 'value' => '',
204 + 'tab' => 'style',
205 + ],
206 +
207 + 'modal_overly_color' => [
208 + 'id' => 'modal_overly_color',
209 + 'label' => esc_html__( 'Modal Overly Color', 'shopbuilder' ),
210 + 'help' => esc_html__( 'Quick view modal overly. Example: #000', 'shopbuilder' ),
211 + 'type' => 'color',
212 + 'value' => '',
213 + 'tab' => 'style',
214 + ],
215 +
122 216 ]
123 217 ),
124 218 ]
125 219 ),
126 - 'wishlist' => apply_filters(
220 + 'wishlist' => apply_filters(
127 221 'rtsb/module/wishlist/options',
128 222 [
129 223 'id' => 'wishlist',
130 224 'title' => esc_html__( 'Wishlist', 'shopbuilder' ),
@@ -229,9 +323,9 @@
229 323 'tab' => 'button',
230 324 'help' => sprintf(
231 325 /* translators: 1: The shortcode.*/
232 326 esc_html__( 'Or Copy the php code %1$s and paste it in your product query where you want to show the button.', 'shopbuilder' ),
233 - "<code>&lt;?php do_action('rtsb/modules/wishlist/frontend/display' ); ?&gt;</code>"
327 + "<br /><code>&lt;?php do_action('rtsb/modules/wishlist/frontend/display' ); ?&gt;</code><br />"
234 328 ),
235 329 'dependency' => [
236 330 'rules' => [
237 331 [
@@ -341,9 +435,9 @@
341 435 'tab' => 'button',
342 436 'help' => sprintf(
343 437 /* translators: 1: The shortcode.*/
344 438 esc_html__( 'Or Copy the php code %1$s and paste it in your product query where you want to show the button.', 'shopbuilder' ),
345 - "<code>&lt;?php do_action('rtsb/modules/wishlist/frontend/display' ); ?&gt;</code>"
439 + "<br /><code>&lt;?php do_action('rtsb/modules/wishlist/frontend/display' ); ?&gt;</code><br />"
346 440 ),
347 441 'dependency' => [
348 442 'rules' => [
349 443 [
@@ -437,9 +531,8 @@
437 531 'label' => esc_html__( 'Remove if Added to Cart', 'shopbuilder' ),
438 532 'tab' => 'page',
439 533 ),
440 534 */
441 -
442 535 'page' => [
443 536 'id' => 'page',
444 537 'type' => 'select',
445 538 'label' => esc_html__( 'Select Wishlist Page', 'shopbuilder' ),
@@ -450,9 +543,8 @@
450 543 ),
451 544 'options' => Fns::get_pages(),
452 545 'tab' => 'page',
453 546 ],
454 -
455 547 'page_show_fields' => [
456 548 'value' => WishlistFns::instance()->get_field_ids(),
457 549 'id' => 'page_show_fields',
458 550 'multiple' => true,
@@ -478,9 +570,9 @@
478 570 ],
479 571 ],
480 572 ]
481 573 ),
482 - 'compare' => apply_filters(
574 + 'compare' => apply_filters(
483 575 'rtsb/module/compare/options',
484 576 [
485 577 'id' => 'compare',
486 578 'base_class' => Compare::class,
@@ -562,9 +654,9 @@
562 654 'tab' => 'button',
563 655 'help' => sprintf(
564 656 /* translators: 1: The shortcode.*/
565 657 esc_html__( 'Or Copy the php code %1$s and paste it in your product query where you want to show the button.', 'shopbuilder' ),
566 - "<code>&lt;?php do_action('rtsb/modules/compare/frontend/display' ); ?&gt;</code>"
658 + "<br /><code>&lt;?php do_action('rtsb/modules/compare/frontend/display' ); ?&gt;</code><br />"
567 659 ),
568 660 'dependency' => [
569 661 'rules' => [
570 662 [
@@ -648,19 +740,19 @@
648 740 'label' => ' ',
649 741 'html' => sprintf(
650 742 /* translators: 1: The shortcode.*/
651 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' ),
652 - '<code>[rtsb_wishlist_button]</code> '
744 + '<code>[rtsb_compare_button]</code> '
653 745 ),
654 746 'dependency' => [
655 747 'rules' => [
656 748 [
657 - 'item' => 'modules.wishlist.show_btn_product_page',
749 + 'item' => 'modules.compare.show_btn_product_page',
658 750 'value' => 'on',
659 751 'operator' => '==',
660 752 ],
661 753 [
662 - 'item' => 'modules.wishlist.product_btn_position',
754 + 'item' => 'modules.compare.product_btn_position',
663 755 'value' => 'shortcode',
664 756 'operator' => '==',
665 757 ],
666 758 ],
@@ -674,9 +766,9 @@
674 766 'tab' => 'button',
675 767 'help' => sprintf(
676 768 /* translators: 1: The shortcode.*/
677 769 esc_html__( 'Or Copy the php code %1$s and paste it in your product query where you want to show the button.', 'shopbuilder' ),
678 - "<code>&lt;?php do_action('rtsb/modules/compare/frontend/display' ); ?&gt;</code>"
770 + "<br /><code>&lt;?php do_action('rtsb/modules/compare/frontend/display' ); ?&gt;</code><br />"
679 771 ),
680 772 'dependency' => [
681 773 'rules' => [
682 774 [
@@ -802,27 +894,27 @@
802 894
803 895 ],
804 896 ]
805 897 ),
806 - 'variation_gallery' => apply_filters(
807 - 'rtsb/module/variation_gallery/options',
898 + 'variation_swatches' => apply_filters(
899 + 'rtsb/module/variation_swatches/options',
808 900 [
809 - 'id' => 'variation_gallery',
901 + 'id' => 'variation_swatches',
810 902 'external' => true,
811 903 'category' => 'general',
812 - 'title' => esc_html__( 'Variation Gallery', 'shopbuilder' ),
813 - 'pluginSlug' => 'woo-product-variation-gallery',
814 - 'pluginIsInstalled' => Fns::check_plugin_installed( 'woo-product-variation-gallery/woo-product-variation-gallery.php' ),
815 - 'pluginIsActive' => Fns::check_plugin_active( 'woo-product-variation-gallery/woo-product-variation-gallery.php' ),
904 + 'title' => esc_html__( 'Variation Swatches', 'shopbuilder' ),
905 + 'pluginSlug' => 'woo-product-variation-swatches',
906 + 'pluginIsInstalled' => Fns::check_plugin_installed( 'woo-product-variation-swatches/woo-product-variation-swatches.php' ),
907 + 'pluginIsActive' => Fns::check_plugin_active( 'woo-product-variation-swatches/woo-product-variation-swatches.php' ),
816 908 'pluginActiveUrl' => add_query_arg(
817 909 [
818 - '_wpnonce' => wp_create_nonce( 'activate-plugin_woo-product-variation-gallery/woo-product-variation-gallery.php' ),
910 + '_wpnonce' => wp_create_nonce( 'activate-plugin_woo-product-variation-swatches/woo-product-variation-swatches.php' ),
819 911 'action' => 'activate',
820 - 'plugin' => 'woo-product-variation-gallery/woo-product-variation-gallery.php',
912 + 'plugin' => 'woo-product-variation-swatches/woo-product-variation-swatches.php',
821 913 ],
822 914 admin_url( 'plugins.php' )
823 915 ),
824 - 'help' => esc_html__( 'This module requires: Variation Images Gallery 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' ),
825 917 'package' => 'free',
826 918 'active_field' => [
827 919 'disable' => false,
828 920 ],
@@ -828,27 +920,27 @@
828 920 ],
829 921 'fields' => [],
830 922 ]
831 923 ),
832 - 'variation_swatches' => apply_filters(
833 - 'rtsb/module/variation_swatches/options',
924 + 'variation_gallery' => apply_filters(
925 + 'rtsb/module/variation_gallery/options',
834 926 [
835 - 'id' => 'variation_swatches',
927 + 'id' => 'variation_gallery',
836 928 'external' => true,
837 929 'category' => 'general',
838 - 'title' => esc_html__( 'Variation Swatches', 'shopbuilder' ),
839 - 'pluginSlug' => 'woo-product-variation-swatches',
840 - 'pluginIsInstalled' => Fns::check_plugin_installed( 'woo-product-variation-swatches/woo-product-variation-swatches.php' ),
841 - 'pluginIsActive' => Fns::check_plugin_active( 'woo-product-variation-swatches/woo-product-variation-swatches.php' ),
930 + 'title' => esc_html__( 'Variation Gallery', 'shopbuilder' ),
931 + 'pluginSlug' => 'woo-product-variation-gallery',
932 + 'pluginIsInstalled' => Fns::check_plugin_installed( 'woo-product-variation-gallery/woo-product-variation-gallery.php' ),
933 + 'pluginIsActive' => Fns::check_plugin_active( 'woo-product-variation-gallery/woo-product-variation-gallery.php' ),
842 934 'pluginActiveUrl' => add_query_arg(
843 935 [
844 - '_wpnonce' => wp_create_nonce( 'activate-plugin_woo-product-variation-swatches/woo-product-variation-swatches.php' ),
936 + '_wpnonce' => wp_create_nonce( 'activate-plugin_woo-product-variation-gallery/woo-product-variation-gallery.php' ),
845 937 'action' => 'activate',
846 - 'plugin' => 'woo-product-variation-swatches/woo-product-variation-swatches.php',
938 + 'plugin' => 'woo-product-variation-gallery/woo-product-variation-gallery.php',
847 939 ],
848 940 admin_url( 'plugins.php' )
849 941 ),
850 - 'help' => esc_html__( 'This module requires: Variation Swatches 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' ),
851 943 'package' => 'free',
852 944 'active_field' => [
853 945 'disable' => false,
854 946 ],
@@ -854,9 +946,282 @@
854 946 ],
855 947 'fields' => [],
856 948 ]
857 949 ),
858 - 'sales_notification' => apply_filters(
950 + 'mini_cart' => apply_filters(
951 + 'rtsb/module/mini_cart/options',
952 + [
953 + 'id' => 'mini_cart',
954 + 'active' => '',
955 + 'title' => esc_html__( 'Mini Cart', 'shopbuilder' ),
956 + 'package' => $this->pro_package(),
957 + 'active_field' => [
958 + 'label' => esc_html__( 'Enable Mini Cart?', 'shopbuilder' ),
959 + 'help' => esc_html__( 'Switch on to enable mini cart module.', 'shopbuilder' ),
960 + ],
961 + 'is_active' => true,
962 + 'fields' => Fns::pro_version_notice( '1.0.0' ),
963 + ]
964 + ),
965 + 'product_size_chart' => apply_filters(
966 + 'rtsb/module/product_size_chart/options',
967 + [
968 + 'id' => 'product_size_chart',
969 + 'active' => '',
970 + 'title' => esc_html__( 'Product Size Chart', 'shopbuilder' ),
971 + 'package' => $this->pro_package(),
972 + 'active_field' => [
973 + 'label' => esc_html__( 'Enable Product Size Chart?', 'shopbuilder' ),
974 + 'help' => esc_html__( 'Switch on to enable Product Size Chart module.', 'shopbuilder' ),
975 + ],
976 + 'fields' => Fns::pro_version_notice( '1.0.0' ),
977 + ]
978 + ),
979 + 'product_badges' => apply_filters(
980 + 'rtsb/module/product_badges/options',
981 + [
982 + 'id' => 'product_badges',
983 + 'active' => '',
984 + 'title' => esc_html__( 'Product Badges', 'shopbuilder' ),
985 + 'package' => 'free',
986 + 'active_field' => [
987 + 'label' => esc_html__( 'Enable Product Badges?', 'shopbuilder' ),
988 + 'help' => esc_html__( 'Switch on to enable product badges module.', 'shopbuilder' ),
989 + ],
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 + ],
1003 + ]
1004 + ),
1005 + 'customize_my_account' => apply_filters(
1006 + 'rtsb/module/customize_my_account/options',
1007 + [
1008 + 'id' => 'customize_my_account',
1009 + 'active' => '',
1010 + 'title' => esc_html__( 'Customize My Account', 'shopbuilder' ),
1011 + 'package' => $this->pro_package(),
1012 + 'active_field' => [
1013 + 'label' => esc_html__( 'Enable Customize My Account?', 'shopbuilder' ),
1014 + 'help' => esc_html__( 'Switch on to enable customize my account module.', 'shopbuilder' ),
1015 + ],
1016 + 'fields' => Fns::pro_version_notice( '1.4.0' ),
1017 + ]
1018 + ),
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 + ),
1063 + // Checkout Fields Manager.
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(
859 1224 'rtsb/module/sales_notification/options',
860 1225 [
861 1226 'id' => 'sales_notification',
862 1227 'active' => '',
@@ -865,12 +1230,12 @@
865 1230 'active_field' => [
866 1231 'label' => esc_html__( 'Enable Sales Notification?', 'shopbuilder' ),
867 1232 'help' => esc_html__( 'Switch on to enable Sales Notification module.', 'shopbuilder' ),
868 1233 ],
869 - 'fields' => [],
1234 + 'fields' => Fns::pro_version_notice( '1.0.0' ),
870 1235 ]
871 1236 ),
872 - 'flash_sale_countdown' => apply_filters(
1237 + 'flash_sale_countdown' => apply_filters(
873 1238 'rtsb/module/flash_sale_countdown/options',
874 1239 [
875 1240 'id' => 'flash_sale_countdown',
876 1241 'active' => '',
@@ -879,27 +1244,12 @@
879 1244 'active_field' => [
880 1245 'label' => esc_html__( 'Enable Flash Sale Countdown?', 'shopbuilder' ),
881 1246 'help' => esc_html__( 'Switch on to enable Flash Sale Countdown module.', 'shopbuilder' ),
882 1247 ],
883 - 'fields' => [],
1248 + 'fields' => Fns::pro_version_notice( '1.0.0' ),
884 1249 ]
885 1250 ),
886 - 'mini_cart' => apply_filters(
887 - 'rtsb/module/mini_cart/options',
888 - [
889 - 'id' => 'mini_cart',
890 - 'active' => '',
891 - 'title' => esc_html__( 'Mini Cart', 'shopbuilder' ),
892 - 'package' => $this->pro_package(),
893 - 'active_field' => [
894 - 'label' => esc_html__( 'Enable Mini Cart?', 'shopbuilder' ),
895 - 'help' => esc_html__( 'Switch on to enable mini cart module.', 'shopbuilder' ),
896 - ],
897 - 'is_active' => true,
898 - 'fields' => [],
899 - ]
900 - ),
901 - 'quick_checkout' => apply_filters(
1251 + 'quick_checkout' => apply_filters(
902 1252 'rtsb/module/quick_checkout/options',
903 1253 [
904 1254 'id' => 'quick_checkout',
905 1255 'active' => '',
@@ -908,12 +1258,12 @@
908 1258 'active_field' => [
909 1259 'label' => esc_html__( 'Enable Quick Checkout?', 'shopbuilder' ),
910 1260 'help' => esc_html__( 'Switch on to enable quick checkout module. Note: Currently, this is not suitable for variable products.', 'shopbuilder' ),
911 1261 ],
912 - 'fields' => [],
1262 + 'fields' => Fns::pro_version_notice( '1.1.0' ),
913 1263 ]
914 1264 ),
915 - 'multi_step_checkout' => apply_filters(
1265 + 'multi_step_checkout' => apply_filters(
916 1266 'rtsb/module/multi_step_checkout/options',
917 1267 [
918 1268 'id' => 'multi_step_checkout',
919 1269 'active' => '',
@@ -922,39 +1272,2289 @@
922 1272 'active_field' => [
923 1273 'label' => esc_html__( 'Enable Multi-Step Checkout?', 'shopbuilder' ),
924 1274 'help' => esc_html__( 'Switch on to enable Multi-step Checkout module.', 'shopbuilder' ),
925 1275 ],
926 - 'fields' => [],
1276 + 'fields' => Fns::pro_version_notice( '1.0.0' ),
927 1277 ]
928 1278 ),
929 - 'product_size_chart' => apply_filters(
930 - 'rtsb/module/product_size_chart/options',
1279 + 'back_order' => apply_filters(
1280 + 'rtsb/module/back_order/options',
931 1281 [
932 - 'id' => 'product_size_chart',
1282 + 'id' => 'back_order',
933 1283 'active' => '',
934 - 'title' => esc_html__( 'Product Size Chart', 'shopbuilder' ),
1284 + 'title' => esc_html__( 'Back-Order', 'shopbuilder' ),
935 1285 'package' => $this->pro_package(),
936 1286 'active_field' => [
937 - 'label' => esc_html__( 'Enable Product Size Chart?', 'shopbuilder' ),
938 - 'help' => esc_html__( 'Switch on to enable Product Size Chart module.', 'shopbuilder' ),
1287 + 'label' => esc_html__( 'Enable Back-Order?', 'shopbuilder' ),
1288 + 'help' => esc_html__( 'Switch on to enable back-order module.', 'shopbuilder' ),
939 1289 ],
940 - 'fields' => [],
1290 + 'fields' => Fns::pro_version_notice( '1.3.0' ),
941 1291 ]
942 1292 ),
943 - 'product_badges' => apply_filters(
944 - 'rtsb/module/product_badges/options',
1293 + 'sticky_add_to_cart' => apply_filters(
1294 + 'rtsb/module/sticky_add_to_cart/options',
945 1295 [
946 - 'id' => 'product_badges',
1296 + 'id' => 'sticky_add_to_cart',
947 1297 'active' => '',
948 - 'title' => esc_html__( 'Product Badges', 'shopbuilder' ),
1298 + 'title' => esc_html__( 'Sticky Add-To-Cart', 'shopbuilder' ),
949 1299 'package' => $this->pro_package(),
950 1300 'active_field' => [
951 - 'label' => esc_html__( 'Enable Product Badges?', 'shopbuilder' ),
952 - 'help' => esc_html__( 'Switch on to enable product badges module.', 'shopbuilder' ),
1301 + 'label' => esc_html__( 'Enable Sticky Add-To-Cart?', 'shopbuilder' ),
1302 + 'help' => esc_html__( 'Switch on to enable sticky add-to-cart module.', 'shopbuilder' ),
953 1303 ],
954 - 'fields' => [],
1304 + 'fields' => Fns::pro_version_notice( '1.6.0' ),
955 1305 ]
956 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 + ),
957 1335 ];
958 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 + /*
2873 + 'loop_priority_note' => [
2874 + 'type' => 'raw',
2875 + 'label' => ' ',
2876 + '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>',
2877 + 'dependency' => [
2878 + 'rules' => [
2879 + [
2880 + 'item' => 'modules.product_badges.loop_group_position',
2881 + 'value' => 'above_image',
2882 + 'operator' => '!=',
2883 + ],
2884 + ],
2885 + ],
2886 + 'tab' => 'group',
2887 + ],
2888 + */
2889 + 'group_position_hook_priority' => [
2890 + 'id' => 'group_position_hook_priority',
2891 + 'type' => 'number',
2892 + 'size' => 'small',
2893 + 'min' => 0,
2894 + 'max' => 999,
2895 + 'label' => esc_html__( 'Badge Position Priority', 'shopbuilder' ),
2896 + 'help' => esc_html__( 'It\'s depend on your theme functionality. Example: 20', 'shopbuilder' ),
2897 + 'tab' => 'group',
2898 + 'dependency' => [
2899 + 'rules' => [
2900 + [
2901 + 'item' => 'modules.product_badges.loop_group_position',
2902 + 'value' => 'custom',
2903 + 'operator' => '==',
2904 + ],
2905 + ],
2906 + ],
2907 + ],
2908 + 'group_badge_position' => [
2909 + 'id' => 'group_badge_position',
2910 + 'label' => esc_html__( 'Position Above Image', 'shopbuilder' ),
2911 + 'type' => 'text_select',
2912 + 'value' => 'top-left',
2913 + 'options' => [
2914 + 'top-left' => esc_html__( 'Top Left', 'shopbuilder' ),
2915 + 'top-right' => esc_html__( 'Top Right', 'shopbuilder' ),
2916 + 'bottom-left' => esc_html__( 'Bottom Left', 'shopbuilder' ),
2917 + 'bottom-right' => esc_html__( 'Bottom Right', 'shopbuilder' ),
2918 + ],
2919 + 'dependency' => [
2920 + 'rules' => [
2921 + [
2922 + 'item' => 'modules.product_badges.loop_group_position',
2923 + 'value' => 'above_image',
2924 + 'operator' => '==',
2925 + ],
2926 + ],
2927 + ],
2928 + 'tab' => 'group',
2929 + ],
2930 + 'product_options' => [
2931 + 'id' => 'product_options',
2932 + 'type' => 'title',
2933 + 'label' => esc_html__( 'Product Page Settings', 'shopbuilder' ),
2934 + 'tab' => 'group',
2935 + ],
2936 + 'product_page_group_position' => [
2937 + 'id' => 'product_page_group_position',
2938 + 'type' => 'select',
2939 + 'value' => 'above_image',
2940 + 'isPro' => ! rtsb()->has_pro(),
2941 + 'label' => esc_html__( 'Product Page Group Position', 'shopbuilder' ),
2942 + 'help' => esc_html__( 'Choose the group badges position in product page.', 'shopbuilder' ),
2943 + 'options' => [
2944 + 'above_image' => esc_html__( 'Floating Above Image', 'shopbuilder' ),
2945 + 'before_add_to_cart' => esc_html__( 'Before Add To Cart', 'shopbuilder' ),
2946 + 'after_add_to_cart' => esc_html__( 'After Add To Cart', 'shopbuilder' ),
2947 + 'after_summary' => esc_html__( 'After Summary', 'shopbuilder' ),
2948 + 'after_short_desc' => esc_html__( 'After Short Description', 'shopbuilder' ),
2949 + 'shortcode' => esc_html__( 'Use Shortcode', 'shopbuilder' ),
2950 + 'custom' => esc_html__( 'Custom Position', 'shopbuilder' ),
2951 + ],
2952 + 'tab' => 'group',
2953 + ],
2954 + 'product_page_badges_shortcode' => [
2955 + 'type' => 'raw',
2956 + 'label' => ' ',
2957 + 'html' => sprintf(
2958 + /* translators: 1: The shortcode.*/
2959 + 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' ),
2960 + '<code>[rtsb_badges]</code>'
2961 + ),
2962 + 'dependency' => [
2963 + 'rules' => [
2964 + [
2965 + 'item' => 'modules.product_badges.product_page_group_position',
2966 + 'value' => 'shortcode',
2967 + 'operator' => '==',
2968 + ],
2969 + ],
2970 + ],
2971 + 'tab' => 'group',
2972 + ],
2973 + 'product_page_custom_hook_name' => [
2974 + 'id' => 'product_page_custom_hook_name',
2975 + 'type' => 'text',
2976 + 'label' => esc_html__( 'Enter Hook Name', 'shopbuilder' ),
2977 + 'tab' => 'group',
2978 + 'help' => sprintf(
2979 + /* translators: 1: The shortcode.*/
2980 + __( 'Or Copy the php code <br />%1$s<br /> and paste it in your product query where you want to show the button.', 'shopbuilder' ),
2981 + "<code>&lt;?php do_action( 'rtsb/modules/product_badges/frontend/display' ); ?&gt;</code>"
2982 + ),
2983 + 'dependency' => [
2984 + 'rules' => [
2985 + [
2986 + 'item' => 'modules.product_badges.product_page_group_position',
2987 + 'value' => 'custom',
2988 + 'operator' => '==',
2989 + ],
2990 + ],
2991 + ],
2992 + ],
2993 + /*
2994 + 'product_page_priority_note' => [
2995 + 'type' => 'raw',
2996 + 'label' => ' ',
2997 + '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>',
2998 + 'dependency' => [
2999 + 'rules' => [
3000 + [
3001 + 'item' => 'modules.product_badges.product_page_group_position',
3002 + 'value' => [ 'above_image', 'shortcode' ],
3003 + 'operator' => '!in',
3004 + ],
3005 + ],
3006 + ],
3007 + 'tab' => 'group',
3008 + ],
3009 + */
3010 + 'product_page_group_hook_priority' => [
3011 + 'id' => 'product_page_group_hook_priority',
3012 + 'type' => 'number',
3013 + 'size' => 'small',
3014 + 'min' => 0,
3015 + 'max' => 999,
3016 + 'label' => esc_html__( 'Badge Position Priority', 'shopbuilder' ),
3017 + 'help' => esc_html__( 'It\'s depend on your theme functionality. Example: 20', 'shopbuilder' ),
3018 + 'tab' => 'group',
3019 + 'dependency' => [
3020 + 'rules' => [
3021 + [
3022 + 'item' => 'modules.product_badges.product_page_group_position',
3023 + 'value' => 'custom',
3024 + 'operator' => '==',
3025 + ],
3026 + ],
3027 + ],
3028 +
3029 + ],
3030 + 'product_page_group_badge_position' => [
3031 + 'id' => 'product_page_group_badge_position',
3032 + 'label' => esc_html__( 'Position Above Image', 'shopbuilder' ),
3033 + 'type' => 'text_select',
3034 + 'value' => 'top-left',
3035 + 'options' => [
3036 + 'top-left' => esc_html__( 'Top Left', 'shopbuilder' ),
3037 + 'top-right' => esc_html__( 'Top Right', 'shopbuilder' ),
3038 + 'bottom-left' => esc_html__( 'Bottom Left', 'shopbuilder' ),
3039 + 'bottom-right' => esc_html__( 'Bottom Right', 'shopbuilder' ),
3040 + ],
3041 + 'dependency' => [
3042 + 'rules' => [
3043 + [
3044 + 'item' => 'modules.product_badges.product_page_group_position',
3045 + 'value' => 'above_image',
3046 + 'operator' => '==',
3047 + ],
3048 + ],
3049 + ],
3050 + 'tab' => 'group',
3051 + ],
3052 +
3053 + 'badges_field_intro' => [
3054 + 'id' => 'badges_field_intro',
3055 + 'type' => 'description',
3056 + 'text' => esc_html__( 'To add new product badges, simply click on the \'Add New\' button below.', 'shopbuilder' ),
3057 + 'tab' => 'badges',
3058 + ],
3059 + 'badges_field' => [
3060 + 'id' => 'badges_field',
3061 + 'type' => 'repeaters',
3062 + 'label' => '',
3063 + 'tab' => 'badges',
3064 + 'repeat' => [
3065 +
3066 + 'title' => [
3067 + 'id' => 'title',
3068 + 'label' => esc_html__( 'Badge Name', 'shopbuilder' ),
3069 + 'help' => esc_html__( 'Enter badge name.', 'shopbuilder' ),
3070 + 'type' => 'text',
3071 + 'placeholder' => esc_html__( 'Badge Name', 'shopbuilder' ),
3072 + 'value' => esc_html__( 'Badge Name', 'shopbuilder' ),
3073 + ],
3074 + 'badge_condition' => [
3075 + 'id' => 'badge_condition',
3076 + 'type' => 'select',
3077 + 'value' => 'dynamic',
3078 + 'isPro' => ! rtsb()->has_pro(),
3079 + 'label' => esc_html__( 'Badge Type', 'shopbuilder' ),
3080 + 'help' => sprintf(
3081 + // translators: %s for pro message.
3082 + esc_html__( 'Select badge type. %s', 'shopbuilder' ),
3083 + ! rtsb()->has_pro()
3084 + ? sprintf(
3085 + '<a target="_blank" href="%s">%s</a> %s',
3086 + esc_url( rtsb()->pro_version_link() ),
3087 + esc_html__( 'Upgrade to PRO', 'shopbuilder' ),
3088 + esc_html__( 'unlock custom badge creation.', 'shopbuilder' )
3089 + )
3090 + : ''
3091 + ),
3092 + 'options' => [
3093 + 'dynamic' => esc_html__( 'Dynamic', 'shopbuilder' ),
3094 + 'custom' => esc_html__( 'Custom', 'shopbuilder' ),
3095 + ],
3096 + ],
3097 + 'badge_for' => [
3098 + 'id' => 'badge_for',
3099 + 'type' => 'select',
3100 + 'value' => 'on_sale',
3101 + 'label' => esc_html__( 'Dynamic Badge Condition', 'shopbuilder' ),
3102 + 'help' => esc_html__( 'Specify dynamic badge condition', 'shopbuilder' ),
3103 + 'options' => $this->dynamic_badge_list(),
3104 + 'dependency' => [
3105 + 'rules' => [
3106 + [
3107 + 'item' => 'modules.product_badges.badges_field.badge_condition',
3108 + 'value' => 'dynamic',
3109 + 'operator' => '==',
3110 + ],
3111 + ],
3112 + ],
3113 + ],
3114 + 'badge_for_pre_order' => [
3115 + 'type' => 'raw',
3116 + 'label' => ' ',
3117 + 'html' => esc_html__( 'Please ensure that Pre-Order module is activated and properly configured.', 'shopbuilder' ),
3118 + 'tab' => 'general',
3119 + 'dependency' => [
3120 + 'rules' => [
3121 + [
3122 + 'item' => 'modules.product_badges.badges_field.badge_condition',
3123 + 'value' => 'dynamic',
3124 + 'operator' => '==',
3125 + ],
3126 + [
3127 + 'item' => 'modules.product_badges.badges_field.badge_for',
3128 + 'value' => 'pre_order',
3129 + 'operator' => '==',
3130 + ],
3131 + ],
3132 + ],
3133 + ],
3134 + 'minimum_sale_count' => [
3135 + 'id' => 'minimum_sale_count',
3136 + 'type' => 'number',
3137 + 'label' => esc_html__( 'Minimum Sale Count', 'shopbuilder' ),
3138 + 'help' => esc_html__( 'Enter the number of Sale you want to designate for products to be labeled as \'Best Selling.\'', 'shopbuilder' ),
3139 + 'dependency' => [
3140 + 'rules' => [
3141 + [
3142 + 'item' => 'modules.product_badges.badges_field.badge_condition',
3143 + 'value' => 'dynamic',
3144 + 'operator' => '==',
3145 + ],
3146 + [
3147 + 'item' => 'modules.product_badges.badges_field.badge_for',
3148 + 'value' => 'best_selling',
3149 + 'operator' => '==',
3150 + ],
3151 + ],
3152 + ],
3153 + ],
3154 + 'new_arrival_days' => [
3155 + 'id' => 'new_arrival_days',
3156 + 'type' => 'number',
3157 + 'label' => esc_html__( 'Specify Number of Days', 'shopbuilder' ),
3158 + 'help' => esc_html__( 'Enter the number of days you want to designate for products to be labeled as \'New Arrivals.\'', 'shopbuilder' ),
3159 + 'dependency' => [
3160 + 'rules' => [
3161 + [
3162 + 'item' => 'modules.product_badges.badges_field.badge_for',
3163 + 'value' => 'new_arrival',
3164 + 'operator' => '==',
3165 + ],
3166 + ],
3167 + ],
3168 + ],
3169 + 'badges_type' => [
3170 + 'id' => 'badges_type',
3171 + 'type' => 'select',
3172 + 'value' => 'text',
3173 + 'isPro' => ! rtsb()->has_pro(),
3174 + 'label' => esc_html__( 'Show Badge As:', 'shopbuilder' ),
3175 + 'help' => sprintf(
3176 + // translators: %s for pro message.
3177 + esc_html__( 'Specify the badge display as Image Or Text. %s', 'shopbuilder' ),
3178 + ! rtsb()->has_pro()
3179 + ? sprintf(
3180 + '<a target="_blank" href="%s">%s</a> %s',
3181 + esc_url( rtsb()->pro_version_link() ),
3182 + esc_html__( 'Upgrade to PRO', 'shopbuilder' ),
3183 + esc_html__( 'unlock Image badge creation.', 'shopbuilder' )
3184 + )
3185 + : ''
3186 + ),
3187 + 'options' => [
3188 + 'image' => esc_html__( 'Image', 'shopbuilder' ),
3189 + 'text' => esc_html__( 'Text', 'shopbuilder' ),
3190 + ],
3191 + ],
3192 +
3193 + 'badge_preset' => [
3194 + 'id' => 'badge_preset',
3195 + 'label' => esc_html__( 'Text Badge Preset', 'shopbuilder' ),
3196 + 'help' => esc_html__( 'Choose the badge appearance', 'shopbuilder' ),
3197 + 'type' => 'image_select',
3198 + 'value' => 'preset1',
3199 + 'options' => [
3200 + 'preset1' => [
3201 + 'label' => esc_html__( 'Preset 1', 'shopbuilder' ),
3202 + 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/badge-preset-1.png' ) ),
3203 + ],
3204 +
3205 + 'preset2' => [
3206 + 'label' => esc_html__( 'Preset 2', 'shopbuilder' ),
3207 + 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/badge-preset-2.png' ) ),
3208 + ],
3209 +
3210 + 'preset3' => [
3211 + 'label' => esc_html__( 'Preset 3', 'shopbuilder' ),
3212 + 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/badge-preset-3.png' ) ),
3213 + ],
3214 +
3215 + 'preset4' => [
3216 + 'title' => esc_html__( 'Preset 4', 'shopbuilder' ),
3217 + 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/badge-preset-4.png' ) ),
3218 + ],
3219 + ],
3220 + 'dependency' => [
3221 + 'rules' => [
3222 + [
3223 + 'item' => 'modules.product_badges.badges_field.badges_type',
3224 + 'value' => 'text',
3225 + 'operator' => '==',
3226 + ],
3227 + ],
3228 + ],
3229 + ],
3230 + 'badges_text' => [
3231 + 'id' => 'badges_text',
3232 + 'label' => esc_html__( 'Enter Badge Text', 'shopbuilder' ),
3233 + 'help' => esc_html__( 'The badge text will be displayed when the dynamic percentage switch is turned off.', 'shopbuilder' ),
3234 + 'type' => 'text',
3235 + 'placeholder' => 'Badge Text',
3236 + 'value' => esc_html__( 'New', 'shopbuilder' ),
3237 + 'dependency' => [
3238 + 'rules' => [
3239 + [
3240 + 'item' => 'modules.product_badges.badges_field.badges_type',
3241 + 'value' => 'text',
3242 + 'operator' => '==',
3243 + ],
3244 + ],
3245 + ],
3246 + ],
3247 + 'show_badges_percent_text' => [
3248 + 'id' => 'show_badges_percent_text',
3249 + 'type' => 'switch',
3250 + // 'isPro' => ! rtsb()->has_pro(),
3251 + 'label' => esc_html__( 'Show Badges Percentage (%)', 'shopbuilder' ),
3252 + 'help' => esc_html__( 'Switch on to show badge as dynamic percentage instead of text.', 'shopbuilder' ),
3253 + 'dependency' => [
3254 + 'rules' => [
3255 + [
3256 + 'item' => 'modules.product_badges.badges_field.badge_for',
3257 + 'value' => 'on_sale',
3258 + 'operator' => '==',
3259 + ],
3260 + [
3261 + 'item' => 'modules.product_badges.badges_field.badges_type',
3262 + 'value' => 'text',
3263 + 'operator' => '==',
3264 + ],
3265 + [
3266 + 'item' => 'modules.product_badges.badges_field.badge_condition',
3267 + 'value' => 'dynamic',
3268 + 'operator' => '==',
3269 + ],
3270 +
3271 + ],
3272 + ],
3273 + ],
3274 +
3275 + 'upload_image' => [
3276 + 'id' => 'upload_image',
3277 + 'type' => 'fileupload',
3278 + 'label' => esc_html__( 'Upload Image', 'shopbuilder' ),
3279 + 'help' => esc_html__( 'Upload badge image.', 'shopbuilder' ),
3280 + 'tab' => 'general',
3281 + 'dependency' => [
3282 + 'rules' => [
3283 + [
3284 + 'item' => 'modules.product_badges.badges_field.badges_type',
3285 + 'value' => 'image',
3286 + 'operator' => '==',
3287 + ],
3288 + ],
3289 + ],
3290 + ],
3291 +
3292 + 'apply_for' => [
3293 + 'id' => 'apply_for',
3294 + 'type' => 'select',
3295 + 'value' => 'product',
3296 + 'isPro' => ! rtsb()->has_pro(),
3297 + 'label' => esc_html__( 'Applicable For', 'shopbuilder' ),
3298 + 'options' => [
3299 + 'product' => esc_html__( 'Products', 'shopbuilder' ),
3300 + 'product_cat' => esc_html__( 'Product Categories', 'shopbuilder' ),
3301 + ],
3302 + 'help' => esc_html__( 'Badges will apply for selected products, or categories.', 'shopbuilder' ),
3303 + ],
3304 + 'applicable_products' => [
3305 + 'id' => 'applicable_products',
3306 + 'type' => 'search_and_multi_select',
3307 + 'label' => esc_html__( 'Applicable Products', 'shopbuilder' ),
3308 + 'help' => esc_html__( 'Choose products to include. Leave blank to apply in all product.', 'shopbuilder' ),
3309 + 'placeholder' => esc_html__( 'Search Products', 'shopbuilder' ),
3310 + 'func_with_param' => [ Fns::class, 'get_post_types', [ 'post_type' => 'product' ] ],
3311 + 'options' => Fns::get_post_types( null, [ 'post_type' => 'product' ] ),
3312 + 'dependency' => [
3313 + 'rules' => [
3314 + [
3315 + 'item' => 'modules.product_badges.badges_field.apply_for',
3316 + 'value' => 'product',
3317 + 'operator' => '==',
3318 + ],
3319 + ],
3320 + ],
3321 + ],
3322 + 'applicable_categories' => [
3323 + 'id' => 'applicable_categories',
3324 + 'type' => 'search_and_multi_select',
3325 + 'label' => esc_html__( 'Applicable Categories', 'shopbuilder' ),
3326 + 'help' => esc_html__( 'Choose categories to include. Leave blank to apply in all categories.', 'shopbuilder' ),
3327 + 'placeholder' => esc_html__( 'Search Category', 'shopbuilder' ),
3328 + 'func_with_param' => [
3329 + Fns::class,
3330 + 'products_category_query',
3331 + ],
3332 + 'options' => Fns::products_category_query(),
3333 + 'dependency' => [
3334 + 'rules' => [
3335 + [
3336 + 'item' => 'modules.product_badges.badges_field.apply_for',
3337 + 'value' => 'product_cat',
3338 + 'operator' => '==',
3339 + ],
3340 + ],
3341 + ],
3342 + ],
3343 + 'exclude_product' => [
3344 + 'id' => 'exclude_product',
3345 + 'type' => 'search_and_multi_select',
3346 + 'isPro' => ! rtsb()->has_pro(),
3347 + 'label' => esc_html__( 'Exclude Products', 'shopbuilder' ),
3348 + 'help' => esc_html__( 'Choose products to exclude. Leave blank to exclude none.', 'shopbuilder' ),
3349 + 'placeholder' => esc_html__( 'Search Products', 'shopbuilder' ),
3350 + 'func_with_param' => [ Fns::class, 'get_post_types', [ 'post_type' => 'product' ] ],
3351 + 'options' => Fns::get_post_types( null, [ 'post_type' => 'product' ] ),
3352 + ],
3353 +
3354 + /**
3355 + * Style Settings
3356 + */
3357 + 'styles_settings' => [
3358 + 'id' => 'styles_settings',
3359 + 'type' => 'title',
3360 + 'label' => esc_html__( 'Style Settings', 'shopbuilder' ),
3361 + ],
3362 + 'badge_text_color' => [
3363 + 'id' => 'badge_text_color',
3364 + 'label' => esc_html__( 'Text Color', 'shopbuilder' ),
3365 + 'type' => 'color',
3366 + 'dependency' => [
3367 + 'rules' => [
3368 + [
3369 + 'item' => 'modules.product_badges.badges_field.badges_type',
3370 + 'value' => 'text',
3371 + 'operator' => '==',
3372 + ],
3373 + ],
3374 + ],
3375 + ],
3376 + 'badge_bg_color' => [
3377 + 'id' => 'badge_bg_color',
3378 + 'label' => esc_html__( 'Background Color', 'shopbuilder' ),
3379 + 'type' => 'color',
3380 + 'dependency' => [
3381 + 'rules' => [
3382 + [
3383 + 'item' => 'modules.product_badges.badges_field.badges_type',
3384 + 'value' => 'text',
3385 + 'operator' => '==',
3386 + ],
3387 + [
3388 + 'item' => 'modules.product_badges.badges_field.badges_type',
3389 + 'value' => 'text',
3390 + 'operator' => '==',
3391 + ],
3392 + [
3393 + 'item' => 'modules.product_badges.badges_field.badge_preset',
3394 + 'value' => [ 'preset1', 'preset2' ],
3395 + 'operator' => 'in',
3396 + ],
3397 + ],
3398 + ],
3399 + ],
3400 + 'badge_border_color' => [
3401 + 'id' => 'badge_border_color',
3402 + 'label' => esc_html__( 'Border Color', 'shopbuilder' ),
3403 + 'type' => 'color',
3404 + 'dependency' => [
3405 + 'rules' => [
3406 + [
3407 + 'item' => 'modules.product_badges.badges_field.badges_type',
3408 + 'value' => 'text',
3409 + 'operator' => '==',
3410 + ],
3411 + [
3412 + 'item' => 'modules.product_badges.badges_field.badges_type',
3413 + 'value' => 'text',
3414 + 'operator' => '==',
3415 + ],
3416 + [
3417 + 'item' => 'modules.product_badges.badges_field.badge_preset',
3418 + 'value' => [ 'preset3', 'preset4' ],
3419 + 'operator' => 'in',
3420 + ],
3421 + ],
3422 + ],
3423 + ],
3424 + 'badge_font_size' => [
3425 + 'id' => 'badge_font_size',
3426 + 'type' => 'text',
3427 + 'label' => esc_html__( 'Font Size', 'shopbuilder' ),
3428 + 'help' => esc_html__( 'Example: 14px', 'shopbuilder' ),
3429 + 'dependency' => [
3430 + 'rules' => [
3431 + [
3432 + 'item' => 'modules.product_badges.badges_field.badges_type',
3433 + 'value' => 'text',
3434 + 'operator' => '==',
3435 + ],
3436 + ],
3437 + ],
3438 + ],
3439 + 'badge_font_width' => [
3440 + 'id' => 'badge_font_width',
3441 + 'type' => 'select',
3442 + 'value' => '400',
3443 + 'label' => esc_html__( 'Font Weight', 'shopbuilder' ),
3444 + 'options' => [
3445 + '100' => '100',
3446 + '200' => '200',
3447 + '300' => '300',
3448 + '400' => '400',
3449 + '500' => '500',
3450 + '600' => '600',
3451 + '700' => '700',
3452 + '800' => '800',
3453 + '900' => '900',
3454 + 'normal' => 'normal',
3455 + 'bold' => 'bold',
3456 + 'bolder' => 'bolder',
3457 + 'lighter' => 'lighter',
3458 + 'initial' => 'initial',
3459 + 'inherit' => 'inherit',
3460 + ],
3461 + 'dependency' => [
3462 + 'rules' => [
3463 + [
3464 + 'item' => 'modules.product_badges.badges_field.badges_type',
3465 + 'value' => 'text',
3466 + 'operator' => '==',
3467 + ],
3468 + ],
3469 + ],
3470 + ],
3471 + 'badge_width' => [
3472 + 'id' => 'badge_width',
3473 + 'type' => 'text',
3474 + 'label' => esc_html__( 'Width', 'shopbuilder' ),
3475 + 'help' => esc_html__( 'Example: 150px', 'shopbuilder' ),
3476 + 'dependency' => [
3477 + 'rules' => [
3478 + [
3479 + 'item' => 'modules.product_badges.badges_field.badges_type',
3480 + 'value' => 'image',
3481 + 'operator' => '==',
3482 + ],
3483 + ],
3484 + ],
3485 + ],
3486 + 'badge_height' => [
3487 + 'id' => 'badge_height',
3488 + 'type' => 'text',
3489 + 'label' => esc_html__( 'Height', 'shopbuilder' ),
3490 + 'help' => esc_html__( 'Example: 50px', 'shopbuilder' ),
3491 + 'dependency' => [
3492 + 'rules' => [
3493 + [
3494 + 'item' => 'modules.product_badges.badges_field.badges_type',
3495 + 'value' => 'image',
3496 + 'operator' => '==',
3497 + ],
3498 + ],
3499 + ],
3500 + ],
3501 + 'border_radius' => [
3502 + 'id' => 'border_radius',
3503 + 'type' => 'text',
3504 + 'size' => 'small',
3505 + 'label' => esc_html__( 'Border Radius', 'shopbuilder' ),
3506 + 'help' => esc_html__( 'Example: 20px 20px 20px 20px Or 20px', 'shopbuilder' ),
3507 + 'dependency' => [
3508 + 'rules' => [
3509 + [
3510 + 'item' => 'modules.product_badges.badges_field.badges_type',
3511 + 'value' => 'text',
3512 + 'operator' => '==',
3513 + ],
3514 + ],
3515 + ],
3516 + ],
3517 + 'badge_padding' => [
3518 + 'id' => 'badge_padding',
3519 + 'type' => 'text',
3520 + 'size' => 'small',
3521 + 'label' => esc_html__( 'Padding', 'shopbuilder' ),
3522 + 'help' => esc_html__( 'Example: 10px 15px 10px 15px', 'shopbuilder' ),
3523 + 'dependency' => [
3524 + 'rules' => [
3525 + [
3526 + 'item' => 'modules.product_badges.badges_field.badges_type',
3527 + 'value' => 'text',
3528 + 'operator' => '==',
3529 + ],
3530 + ],
3531 + ],
3532 + ],
3533 + ],
3534 + ],
3535 +
3536 + ]
3537 + );
3538 + }
3539 +
3540 + /**
3541 + * Dynamic badge list.
3542 + *
3543 + * @return array
3544 + */
3545 + public function dynamic_badge_list() {
3546 + $items = [
3547 + 'on_sale' => esc_html__( 'Products On Sale', 'shopbuilder' ),
3548 + 'featured' => esc_html__( 'Featured Products', 'shopbuilder' ),
3549 + 'out_of_stock' => esc_html__( 'Out Of Stock Products', 'shopbuilder' ),
3550 + 'best_selling' => esc_html__( 'Best Selling Products', 'shopbuilder' ),
3551 + 'new_arrival' => esc_html__( 'New Arrival Products', 'shopbuilder' ),
3552 + ];
3553 +
3554 + if ( rtsb()->has_pro() && method_exists( FnsPro::class, 'is_module_active' ) && FnsPro::is_module_active( 'pre_order' ) ) {
3555 + $items['pre_order'] = esc_html__( 'Pre-Order Products', 'shopbuilder' );
3556 + }
3557 +
3558 + return $items;
959 3559 }
960 3560 }