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