PluginProbe
ShopBuilder – WooCommerce Builder For Elementor / 1.1.1
ShopBuilder – WooCommerce Builder For Elementor v1.1.1
3.4.2 3.4.1 3.4.0 2.0.1 2.0.2 2.0.3 2.1.0 2.1.1 2.1.10 2.1.11 2.1.12 2.1.13 2.1.14 2.1.15 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 2.2.0 2.2.1 2.2.2 All 63 releases
← All changes | app/Models/ModuleList.php +835 -4968 3.4.01.1.1 View file →
@@ -1,4968 +1,835 @@
1 -<?php
2 -/**
3 - * ShopBuilder Module List.
4 - *
5 - * @package RadiusTheme\SB
6 - */
7 -
8 -namespace RadiusTheme\SB\Models;
9 -
10 -use RadiusTheme\SB\Helpers\Fns;
11 -use RadiusTheme\SB\Helpers\SvgIcons;
12 -use RadiusTheme\SB\Models\Base\ListModel;
13 -use RadiusTheme\SB\Modules\Badges\Badges;
14 -use RadiusTheme\SB\Modules\CheckoutEditor\CheckoutFns;
15 -use RadiusTheme\SB\Modules\VariationSwatches\SwatchesFns;
16 -use RadiusTheme\SB\Modules\ShopifyCheckout\ShopifyCheckout;
17 -use RadiusTheme\SB\Modules\CheckoutEditor\CheckoutEditorInit;
18 -use RadiusTheme\SB\Modules\AbandonedCartRecovery\CartRecoveryInit;
19 -use RadiusTheme\SB\Modules\VariationSwatches\VariationSwatches;
20 -use RadiusTheme\SB\Modules\VariationGallery\VariationGalleryInit;
21 -use RadiusTheme\SB\Modules\AbandonedCartRecovery\CartRecoveryOptions;
22 -use RadiusTheme\SB\Traits\SingletonTrait;
23 -use RadiusTheme\SB\Modules\Compare\Compare;
24 -use RadiusTheme\SB\Modules\WishList\Wishlist;
25 -use RadiusTheme\SB\Modules\Compare\CompareFns;
26 -use RadiusTheme\SB\Modules\QuickView\QuickView;
27 -use RadiusTheme\SB\Modules\WishList\WishlistFns;
28 -use RadiusTheme\SBPRO\Helpers\FnsPro;
29 -
30 -defined( 'ABSPATH' ) || exit;
31 -
32 -/**
33 - * ShopBuilder Module List.
34 - */
35 -class ModuleList extends ListModel {
36 -
37 - use SingletonTrait;
38 -
39 - /**
40 - * List ID.
41 - *
42 - * @var string
43 - */
44 - protected $list_id = 'modules';
45 -
46 - /**
47 - * Class constructor.
48 - */
49 - public function __construct() {
50 - parent::__construct();
51 - $this->title = esc_html__( 'Modules', 'shopbuilder' );
52 - $this->description = esc_html__( 'Here you can find the list of all the modules. You can individually enable or disable the modules. Or you can do that by one click.', 'shopbuilder' );
53 - }
54 -
55 - /**
56 - * Module list.
57 - *
58 - * @return mixed|null
59 - */
60 - protected function raw_list() {
61 - $isSwatchActive = false;
62 - $isGalleryActive = false;
63 - $variationSwatch = apply_filters(
64 - 'rtsb/module/variation_swatches/options',
65 - [
66 - 'id' => 'variation_swatches',
67 - 'title' => esc_html__( 'Variation Swatches', 'shopbuilder' ),
68 - 'badge' => 'new',
69 - 'package' => 'free',
70 - 'active' => 'on',
71 - 'base_class' => VariationSwatches::class,
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 - 'title' => esc_html__( 'Variation Swatches', 'shopbuilder' ),
100 - 'pluginSlug' => 'woo-product-variation-swatches',
101 - 'pluginIsInstalled' => Fns::check_plugin_installed( 'woo-product-variation-swatches/woo-product-variation-swatches.php' ),
102 - 'pluginIsActive' => Fns::check_plugin_active( 'woo-product-variation-swatches/woo-product-variation-swatches.php' ),
103 - 'pluginActiveUrl' => add_query_arg(
104 - [
105 - '_wpnonce' => wp_create_nonce( 'activate-plugin_woo-product-variation-swatches/woo-product-variation-swatches.php' ),
106 - 'action' => 'activate',
107 - 'plugin' => 'woo-product-variation-swatches/woo-product-variation-swatches.php',
108 - ],
109 - admin_url( 'plugins.php' )
110 - ),
111 - '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' ),
112 - 'package' => 'free',
113 - 'active_field' => [
114 - 'disable' => false,
115 - ],
116 - 'fields' => [],
117 - ],
118 - $isSwatchActive
119 - );
120 - }
121 - $variationGallery = apply_filters(
122 - 'rtsb/module/variation_gallery/options',
123 - [
124 - 'id' => 'variation_gallery',
125 - 'title' => esc_html__( 'Variation Gallery', 'shopbuilder' ),
126 - 'badge' => 'new',
127 - 'package' => 'free',
128 - 'active' => 'on',
129 - 'base_class' => VariationGalleryInit::class,
130 - 'active_field' => [
131 - 'label' => esc_html__( 'Enable Variation Gallery Module?', 'shopbuilder' ),
132 - 'help' => esc_html__( 'Switch on to enable variation gallery module.', 'shopbuilder' ),
133 - ],
134 - 'tabs' => [
135 - 'general' => [
136 - 'title' => esc_html__( 'General', 'shopbuilder' ),
137 - ],
138 - 'styles' => [
139 - 'title' => esc_html__( 'Styles', 'shopbuilder' ),
140 - ],
141 - ],
142 - 'fields' => $this->get_variation_gallery_fields(),
143 - ],
144 - $isGalleryActive
145 - );
146 - if ( Fns::check_plugin_active( 'woo-product-variation-gallery/woo-product-variation-gallery.php' ) ) {
147 - $isGalleryActive = true;
148 - $variationGallery = apply_filters(
149 - 'rtsb/module/variation_gallery/options',
150 - [
151 - 'id' => 'variation_gallery',
152 - 'external' => true,
153 - 'title' => esc_html__( 'Variation Gallery', 'shopbuilder' ),
154 - 'pluginSlug' => 'woo-product-variation-gallery',
155 - 'pluginIsInstalled' => Fns::check_plugin_installed( 'woo-product-variation-gallery/woo-product-variation-gallery.php' ),
156 - 'pluginIsActive' => Fns::check_plugin_active( 'woo-product-variation-gallery/woo-product-variation-gallery.php' ),
157 - 'pluginActiveUrl' => add_query_arg(
158 - [
159 - '_wpnonce' => wp_create_nonce( 'activate-plugin_woo-product-variation-gallery/woo-product-variation-gallery.php' ),
160 - 'action' => 'activate',
161 - 'plugin' => 'woo-product-variation-gallery/woo-product-variation-gallery.php',
162 - ],
163 - admin_url( 'plugins.php' )
164 - ),
165 - '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' ),
166 - 'package' => 'free',
167 - 'active_field' => [
168 - 'disable' => false,
169 - ],
170 - 'fields' => [],
171 - ],
172 - $isGalleryActive
173 - );
174 - }
175 - $list = [
176 - 'quick_view' => apply_filters(
177 - 'rtsb/module/quick_view/options',
178 - [
179 - 'id' => 'quick_view',
180 - 'title' => esc_html__( 'Quick View', 'shopbuilder' ),
181 - 'base_class' => QuickView::class,
182 - 'active' => 'on',
183 - 'package' => 'free',
184 - 'active_field' => [
185 - 'label' => esc_html__( 'Enable Quick View?', 'shopbuilder' ),
186 - 'help' => esc_html__( 'Switch on to enable quick view module.', 'shopbuilder' ),
187 - ],
188 - 'tabs' => [
189 - 'general' => [
190 - 'title' => esc_html__( 'General', 'shopbuilder' ),
191 - ],
192 - 'style' => [
193 - 'title' => esc_html__( 'Style', 'shopbuilder' ),
194 - ],
195 - ],
196 - 'fields' => apply_filters(
197 - 'rtsb/module/quick_view/fields',
198 - [
199 - 'loop_btn_position' => [
200 - 'id' => 'loop_btn_position',
201 - 'type' => 'select',
202 - 'value' => 'custom',
203 - 'label' => esc_html__( 'Showcase Button Position', 'shopbuilder' ),
204 - 'help' => esc_html__( 'Manage quick view button position in product showcases (Shop, Related, Upsells, Cross-sells, etc.).', 'shopbuilder' ),
205 - 'tab' => 'general',
206 - 'options' => [
207 - 'before_add_to_cart' => esc_html__( 'Above Add To Cart', 'shopbuilder' ),
208 - 'after_add_to_cart' => esc_html__( 'Below Add To Cart', 'shopbuilder' ),
209 - 'shortcode' => esc_html__( 'Use Shortcode', 'shopbuilder' ),
210 - 'custom' => esc_html__( 'Custom Position', 'shopbuilder' ),
211 - ],
212 -
213 - ],
214 - 'loop_btn_position_shortcode' => [
215 - 'type' => 'raw',
216 - 'label' => ' ',
217 - 'html' => sprintf(
218 - /* translators: 1: The shortcode.*/
219 - esc_html__( 'Choose where to show button in WooCommerce product\'s loop. Copy this shortcode %1$s and paste it where you want to show the button.', 'shopbuilder' ),
220 - '<code>[rtsb_quick_view_button]</code>'
221 - ),
222 - 'tab' => 'general',
223 - 'dependency' => [
224 - 'rules' => [
225 - [
226 - 'item' => 'modules.quick_view.loop_btn_position',
227 - 'value' => 'shortcode',
228 - 'operator' => '==',
229 - ],
230 - ],
231 - ],
232 - ],
233 - 'loop_custom_hook_name' => [
234 - 'id' => 'loop_custom_hook_name',
235 - 'type' => 'text',
236 - 'label' => esc_html__( 'Enter Hook Name', 'shopbuilder' ),
237 - 'help' => sprintf(
238 - /* translators: 1: The shortcode.*/
239 - esc_html__( 'Or Copy the php code %1$s and paste it in your product query where you want to show the button.', 'shopbuilder' ),
240 - "<br /><code>&lt;?php do_action( 'rtsb/modules/quick_view/frontend/display' ); ?&gt;</code><br />"
241 - ),
242 - 'tab' => 'general',
243 - 'dependency' => [
244 - 'rules' => [
245 - [
246 - 'item' => 'modules.quick_view.loop_btn_position',
247 - 'value' => 'custom',
248 - 'operator' => '==',
249 - ],
250 - ],
251 - ],
252 - ],
253 - 'loop_custom_hook_priority' => [
254 - 'id' => 'loop_custom_hook_priority',
255 - 'type' => 'number',
256 - 'value' => 10,
257 - 'size' => 'small',
258 - 'min' => 0,
259 - 'max' => 999,
260 - 'label' => esc_html__( 'Hook Priority', 'shopbuilder' ),
261 - 'tab' => 'general',
262 - 'dependency' => [
263 - 'rules' => [
264 - [
265 - 'item' => 'modules.quick_view.loop_btn_position',
266 - 'value' => 'custom',
267 - 'operator' => '==',
268 - ],
269 - ],
270 - ],
271 - ],
272 - 'button_text' => [
273 - 'id' => 'button_text',
274 - 'label' => esc_html__( 'Quick View Text', 'shopbuilder' ),
275 - 'help' => esc_html__( 'Enter your quick view button text.', 'shopbuilder' ),
276 - 'type' => 'text',
277 - 'value' => 'Quick View',
278 - 'placeholder' => 'Quick View',
279 - 'tab' => 'general',
280 - ],
281 -
282 - // Module Style.
283 - 'modal_width' => [
284 - 'id' => 'modal_width',
285 - 'label' => esc_html__( 'Modal Width (in px)', 'shopbuilder' ),
286 - 'help' => esc_html__( 'Quick view button modal width. Example: 950', 'shopbuilder' ),
287 - 'type' => 'number',
288 - 'value' => '',
289 - 'tab' => 'style',
290 - ],
291 -
292 - 'modal_height' => [
293 - 'id' => 'modal_height',
294 - 'label' => esc_html__( 'Modal Height (in px)', 'shopbuilder' ),
295 - 'help' => esc_html__( 'Quick view button modal height. Example: 450', 'shopbuilder' ),
296 - 'type' => 'number',
297 - 'value' => '',
298 - 'tab' => 'style',
299 - ],
300 -
301 - 'modal_wrapper_padding' => [
302 - 'id' => 'modal_wrapper_padding',
303 - 'label' => esc_html__( 'Modal Wrapper Padding', 'shopbuilder' ),
304 - 'help' => esc_html__( 'Quick view modal wrapper padding. Example 1: 20px, Example 2: 20px 20px 20px 20px', 'shopbuilder' ),
305 - 'type' => 'text',
306 - 'value' => '',
307 - 'tab' => 'style',
308 - ],
309 - 'modal_bg_color' => [
310 - 'id' => 'modal_bg_color',
311 - 'label' => esc_html__( 'Modal Backgroud Color', 'shopbuilder' ),
312 - 'help' => esc_html__( 'Quick view modal background color. Example: #fff', 'shopbuilder' ),
313 - 'type' => 'color',
314 - 'value' => '',
315 - 'tab' => 'style',
316 - ],
317 - 'modal_box_shadow_color' => [
318 - 'id' => 'modal_box_shadow_color',
319 - 'label' => esc_html__( 'Modal Box Shadow Color', 'shopbuilder' ),
320 - 'help' => esc_html__( 'Quick view modal box shadow. Example: #000', 'shopbuilder' ),
321 - 'type' => 'color',
322 - 'value' => '',
323 - 'tab' => 'style',
324 - ],
325 -
326 - 'modal_overly_color' => [
327 - 'id' => 'modal_overly_color',
328 - 'label' => esc_html__( 'Modal Overly Color', 'shopbuilder' ),
329 - 'help' => esc_html__( 'Quick view modal overly. Example: #000', 'shopbuilder' ),
330 - 'type' => 'color',
331 - 'value' => '',
332 - 'tab' => 'style',
333 - ],
334 -
335 - ]
336 - ),
337 - ]
338 - ),
339 - 'wishlist' => apply_filters(
340 - 'rtsb/module/wishlist/options',
341 - [
342 - 'id' => 'wishlist',
343 - 'title' => esc_html__( 'Wishlist', 'shopbuilder' ),
344 - 'package' => 'free',
345 - 'active' => 'on',
346 - 'base_class' => Wishlist::class,
347 - 'active_field' => [
348 - 'label' => esc_html__( 'Enable Wishlist?', 'shopbuilder' ),
349 - 'help' => esc_html__( 'Switch on to enable wishlist module.', 'shopbuilder' ),
350 - ],
351 - 'fields' => apply_filters(
352 - 'rtsb/module/wishlist/fields',
353 - [
354 - 'enable_login_limit' => [
355 - 'id' => 'enable_login_limit',
356 - 'type' => 'switch',
357 - 'label' => esc_html__( 'Limit Wishlist Use', 'shopbuilder' ),
358 - 'help' => esc_html__( 'Enable this option to allow only the logged-in users to use the Wishlist feature.', 'shopbuilder' ),
359 - 'tab' => 'general',
360 - ],
361 - 'hide_wishlist_non_logged_in' => [
362 - 'id' => 'hide_wishlist_non_logged_in',
363 - 'type' => 'switch',
364 - 'label' => esc_html__( 'Hide Wishlist Button', 'shopbuilder' ),
365 - 'help' => esc_html__( 'Hide Wishlist Button For non logged-in users (guest users).', 'shopbuilder' ),
366 - 'dependency' => [
367 - 'rules' => [
368 - [
369 - 'item' => 'modules.wishlist.enable_login_limit',
370 - 'value' => 'on',
371 - 'operator' => '==',
372 - ],
373 - ],
374 - ],
375 - 'tab' => 'general',
376 - ],
377 - 'wishlist_shop_wrapper_heading' => [
378 - 'id' => 'wishlist_shop_wrapper_heading',
379 - 'type' => 'title',
380 - 'label' => esc_html__( 'Product Showcase Settings', 'shopbuilder' ),
381 - 'tab' => 'button',
382 - ],
383 - 'show_btn_on_loop' => [
384 - 'id' => 'show_btn_on_loop',
385 - 'value' => 'on',
386 - 'type' => 'switch',
387 - 'label' => esc_html__( 'Show in Product Showcase', 'shopbuilder' ),
388 - 'tab' => 'button',
389 - ],
390 - 'loop_btn_position' => [
391 - 'id' => 'loop_btn_position',
392 - 'type' => 'select',
393 - 'value' => 'custom',
394 - 'label' => esc_html__( 'Showcase Button Position', 'shopbuilder' ),
395 - 'help' => esc_html__( 'Manage wishlist button position in product showcases (Shop, Related, Upsells, Cross-sells, etc.).', 'shopbuilder' ),
396 - 'options' => [
397 - 'before_add_to_cart' => esc_html__( 'Above Add To Cart', 'shopbuilder' ),
398 - 'after_add_to_cart' => esc_html__( 'Below Add To Cart', 'shopbuilder' ),
399 - 'shortcode' => esc_html__( 'Use Shortcode', 'shopbuilder' ),
400 - 'custom' => esc_html__( 'Custom Position', 'shopbuilder' ),
401 - ],
402 - 'dependency' => [
403 - 'rules' => [
404 - [
405 - 'item' => 'modules.wishlist.show_btn_on_loop',
406 - 'value' => 'on',
407 - 'operator' => '==',
408 - ],
409 - ],
410 - ],
411 - 'tab' => 'button',
412 - ],
413 - 'loop_btn_position_shortcode' => [
414 - 'type' => 'raw',
415 - 'label' => ' ',
416 - 'html' => sprintf(
417 - /* translators: 1: The shortcode.*/
418 - esc_html__( 'Choose where to show button in WooCommerce product\'s loop. Copy this shortcode %1$s and paste it where you want to show the button.', 'shopbuilder' ),
419 - '<code>[rtsb_wishlist_button]</code>'
420 - ),
421 - 'dependency' => [
422 - 'rules' => [
423 - [
424 - 'item' => 'modules.wishlist.show_btn_on_loop',
425 - 'value' => 'on',
426 - 'operator' => '==',
427 - ],
428 - [
429 - 'item' => 'modules.wishlist.loop_btn_position',
430 - 'value' => 'shortcode',
431 - 'operator' => '==',
432 - ],
433 - ],
434 - ],
435 - 'tab' => 'button',
436 - ],
437 - 'loop_custom_hook_name' => [
438 - 'id' => 'loop_custom_hook_name',
439 - 'type' => 'text',
440 - 'label' => esc_html__( 'Enter Hook Name', 'shopbuilder' ),
441 - 'tab' => 'button',
442 - 'help' => sprintf(
443 - /* translators: 1: The shortcode.*/
444 - esc_html__( 'Or Copy the php code %1$s and paste it in your product query where you want to show the button.', 'shopbuilder' ),
445 - "<br /><code>&lt;?php do_action('rtsb/modules/wishlist/frontend/display' ); ?&gt;</code><br />"
446 - ),
447 - 'dependency' => [
448 - 'rules' => [
449 - [
450 - 'item' => 'modules.wishlist.show_btn_on_loop',
451 - 'value' => 'on',
452 - 'operator' => '==',
453 - ],
454 - [
455 - 'item' => 'modules.wishlist.loop_btn_position',
456 - 'value' => 'custom',
457 - 'operator' => '==',
458 - ],
459 - ],
460 - ],
461 - ],
462 - 'loop_custom_hook_priority' => [
463 - 'id' => 'loop_custom_hook_priority',
464 - 'type' => 'number',
465 - 'value' => 10,
466 - 'size' => 'small',
467 - 'min' => 0,
468 - 'max' => 999,
469 - 'label' => esc_html__( 'Hook Priority', 'shopbuilder' ),
470 - 'tab' => 'button',
471 - 'dependency' => [
472 - 'rules' => [
473 - [
474 - 'item' => 'modules.wishlist.show_btn_on_loop',
475 - 'value' => 'on',
476 - 'operator' => '==',
477 - ],
478 - [
479 - 'item' => 'modules.wishlist.loop_btn_position',
480 - 'value' => 'custom',
481 - 'operator' => '==',
482 - ],
483 - ],
484 - 'relation' => 'and',
485 - ],
486 - ],
487 - 'wishlist_single_wrapper_heading' => [
488 - 'id' => 'wishlist_single_wrapper_heading',
489 - 'type' => 'title',
490 - 'label' => esc_html__( 'Product Page Settings', 'shopbuilder' ),
491 - 'tab' => 'button',
492 - ],
493 - 'show_btn_product_page' => [
494 - 'id' => 'show_btn_product_page',
495 - 'value' => 'on',
496 - 'type' => 'switch',
497 - 'label' => esc_html__( 'Show in Product Page', 'shopbuilder' ),
498 - 'tab' => 'button',
499 - ],
500 - 'product_btn_position' => [
501 - 'id' => 'product_btn_position',
502 - 'label' => esc_html__( 'Product Page Button Position', 'shopbuilder' ),
503 - 'help' => esc_html__( 'You can manage compare button position in single product page.', 'shopbuilder' ),
504 - 'type' => 'select',
505 - 'value' => 'custom',
506 - 'options' => [
507 - 'before_add_to_cart' => esc_html__( 'Above Add To Cart', 'shopbuilder' ),
508 - 'after_add_to_cart' => esc_html__( 'Below Add To Cart', 'shopbuilder' ),
509 - 'after_thumbnail' => esc_html__( 'After Image', 'shopbuilder' ),
510 - 'after_summary' => esc_html__( 'After Summary', 'shopbuilder' ),
511 - 'shortcode' => esc_html__( 'Use Shortcode', 'shopbuilder' ),
512 - 'custom' => esc_html__( 'Custom Position', 'shopbuilder' ),
513 - ],
514 - 'dependency' => [
515 - 'rules' => [
516 - [
517 - 'item' => 'modules.wishlist.show_btn_product_page',
518 - 'value' => 'on',
519 - 'operator' => '==',
520 - ],
521 - ],
522 - ],
523 - 'tab' => 'button',
524 - ],
525 - 'product_btn_position_shortcode' => [
526 - 'type' => 'raw',
527 - 'label' => ' ',
528 - 'html' => sprintf(
529 - /* translators: 1: The shortcode.*/
530 - 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' ),
531 - '<code>[rtsb_wishlist_button]</code>'
532 - ),
533 - 'dependency' => [
534 - 'rules' => [
535 - [
536 - 'item' => 'modules.wishlist.show_btn_product_page',
537 - 'value' => 'on',
538 - 'operator' => '==',
539 - ],
540 - [
541 - 'item' => 'modules.wishlist.product_btn_position',
542 - 'value' => 'shortcode',
543 - 'operator' => '==',
544 - ],
545 - ],
546 - ],
547 - 'tab' => 'button',
548 - ],
549 - 'product_custom_hook_name' => [
550 - 'id' => 'product_custom_hook_name',
551 - 'type' => 'text',
552 - 'label' => esc_html__( 'Product Hook Name', 'shopbuilder' ),
553 - 'tab' => 'button',
554 - 'help' => sprintf(
555 - /* translators: 1: The shortcode.*/
556 - esc_html__( 'Or Copy the php code %1$s and paste it in your product query where you want to show the button.', 'shopbuilder' ),
557 - "<br /><code>&lt;?php do_action('rtsb/modules/wishlist/frontend/display' ); ?&gt;</code><br />"
558 - ),
559 - 'dependency' => [
560 - 'rules' => [
561 - [
562 - 'item' => 'modules.wishlist.show_btn_product_page',
563 - 'value' => 'on',
564 - 'operator' => '==',
565 - ],
566 - [
567 - 'item' => 'modules.wishlist.product_btn_position',
568 - 'value' => 'custom',
569 - 'operator' => '==',
570 - ],
571 - ],
572 - ],
573 - ],
574 - 'product_custom_hook_priority' => [
575 - 'id' => 'product_custom_hook_priority',
576 - 'type' => 'number',
577 - 'value' => 10,
578 - 'size' => 'small',
579 - 'min' => 0,
580 - 'max' => 999,
581 - 'label' => esc_html__( 'Product Hook Priority', 'shopbuilder' ),
582 - 'tab' => 'button',
583 - 'dependency' => [
584 - 'rules' => [
585 - [
586 - 'item' => 'modules.wishlist.show_btn_product_page',
587 - 'value' => 'on',
588 - 'operator' => '==',
589 - ],
590 - [
591 - 'item' => 'modules.wishlist.product_btn_position',
592 - 'value' => 'custom',
593 - 'operator' => '==',
594 - ],
595 - ],
596 - 'relation' => 'and',
597 - ],
598 - ],
599 - 'button_text' => [
600 - 'id' => 'button_text',
601 - 'label' => esc_html__( 'Wishlist Text', 'shopbuilder' ),
602 - 'help' => esc_html__( 'Enter your wishlist button text.', 'shopbuilder' ),
603 - 'type' => 'text',
604 - 'value' => 'Add to Wishlist',
605 - 'placeholder' => 'Add to Wishlist',
606 - 'tab' => 'button',
607 - ],
608 - 'notice_added_text' => [
609 - 'id' => 'notice_added_text',
610 - 'label' => esc_html__( 'Product Added Text', 'shopbuilder' ),
611 - 'help' => esc_html__( 'Enter the product added text.', 'shopbuilder' ),
612 - 'type' => 'text',
613 - 'value' => esc_html__( 'Product added!', 'shopbuilder' ),
614 - 'placeholder' => esc_html__( 'Product added!', 'shopbuilder' ),
615 - 'tab' => 'general',
616 - ],
617 - 'notice_removed_text' => [
618 - 'id' => 'notice_removed_text',
619 - 'label' => esc_html__( 'Product Removed Text', 'shopbuilder' ),
620 - 'help' => esc_html__( 'Enter the product removed text.', 'shopbuilder' ),
621 - 'type' => 'text',
622 - 'value' => esc_html__( 'Product removed!', 'shopbuilder' ),
623 - 'placeholder' => esc_html__( 'Product removed!', 'shopbuilder' ),
624 - 'tab' => 'general',
625 - ],
626 - 'browse_list_text' => [
627 - 'id' => 'browse_list_text',
628 - 'label' => esc_html__( 'Browse Wishlist Text', 'shopbuilder' ),
629 - 'help' => esc_html__( 'Enter a text for the "Browse wishlist" link on the product page', 'shopbuilder' ),
630 - 'type' => 'text',
631 - 'value' => esc_html__( 'Browse Wishlist', 'shopbuilder' ),
632 - 'placeholder' => esc_html__( 'Browse Wishlist', 'shopbuilder' ),
633 - 'tab' => 'general',
634 - ],
635 - 'page' => [
636 - 'id' => 'page',
637 - 'type' => 'select',
638 - 'label' => esc_html__( 'Select Wishlist Page', 'shopbuilder' ),
639 - 'help' => sprintf(
640 - /* translators: 1: The shortcode.*/
641 - esc_html__( 'Select a page for wishlist page and make sure you add the shortcode %1$s into the page content', 'shopbuilder' ),
642 - '<code>[rtsb_wishlist]</code>'
643 - ),
644 - 'options' => Fns::get_pages(),
645 - 'tab' => 'page',
646 - ],
647 - 'page_show_fields' => [
648 - 'value' => WishlistFns::instance()->get_field_ids(),
649 - 'id' => 'page_show_fields',
650 - 'multiple' => true,
651 - 'checkbox' => true,
652 - 'sanitize_fn' => 'sanitize_text_field',
653 - 'type' => 'sortable',
654 - 'options' => WishlistFns::instance()->get_default_fields(),
655 - 'label' => esc_html__( 'Wishlist Table Fields Visibility', 'shopbuilder' ),
656 - 'tab' => 'page',
657 - ],
658 -
659 - 'shortcode_list_heading' => [
660 - 'id' => 'shortcode_list_heading',
661 - 'type' => 'title',
662 - 'label' => esc_html__( 'Available Shortcodes', 'shopbuilder' ),
663 - 'tab' => 'shortcodes',
664 - ],
665 - 'shortcode_wishlist_table' => [
666 - 'type' => 'raw',
667 - 'label' => esc_html__( 'Wishlist Table', 'shopbuilder' ),
668 - 'html' => '<code>[rtsb_wishlist]</code><p class="description">'
669 - . esc_html__( 'Displays the wishlist table with all added products. Use this shortcode on the wishlist page.', 'shopbuilder' )
670 - . '</p>',
671 - 'tab' => 'shortcodes',
672 - ],
673 - 'shortcode_wishlist_button' => [
674 - 'type' => 'raw',
675 - 'label' => esc_html__( 'Wishlist Button', 'shopbuilder' ),
676 - 'html' => '<code>[rtsb_wishlist_button]</code><p class="description">'
677 - . esc_html__( 'Displays the "Add to Wishlist" button. Use inside a product loop or on a single product page.', 'shopbuilder' )
678 - . '</p>',
679 - 'tab' => 'shortcodes',
680 - ],
681 - 'shortcode_wishlist_counter' => [
682 - 'type' => 'raw',
683 - 'label' => esc_html__( 'Wishlist Counter', 'shopbuilder' ),
684 - 'html' => '<code>[rtsb_wishlist_counter]</code><p class="description">'
685 - . esc_html__( 'Displays the wishlist item count. Place it in the header or menu to show total wishlist items.', 'shopbuilder' )
686 - . '</p>',
687 - 'tab' => 'shortcodes',
688 - ],
689 -
690 - ]
691 - ),
692 - 'tabs' => [
693 - 'general' => [
694 - 'title' => esc_html__( 'General', 'shopbuilder' ),
695 - ],
696 - 'button' => [
697 - 'title' => esc_html__( 'Button', 'shopbuilder' ),
698 - ],
699 - 'page' => [
700 - 'title' => esc_html__( 'Page', 'shopbuilder' ),
701 - ],
702 - 'shortcodes' => [
703 - 'title' => esc_html__( 'Shortcodes', 'shopbuilder' ),
704 - ],
705 - ],
706 - ]
707 - ),
708 - 'compare' => apply_filters(
709 - 'rtsb/module/compare/options',
710 - [
711 - 'id' => 'compare',
712 - 'base_class' => Compare::class,
713 - 'title' => esc_html__( 'Product Compare', 'shopbuilder' ),
714 - 'package' => 'free',
715 - 'active' => 'on',
716 - 'active_field' => [
717 - 'label' => esc_html__( 'Enable Product Comparison?', 'shopbuilder' ),
718 - 'help' => esc_html__( 'Switch on to enable product comparison module.', 'shopbuilder' ),
719 - ],
720 - 'fields' => apply_filters(
721 - 'rtsb/module/compare/fields',
722 - [
723 - 'compare_shop_wrapper_heading' => [
724 - 'id' => 'compare_shop_wrapper_heading',
725 - 'type' => 'title',
726 - 'label' => esc_html__( 'Product Showcase Settings', 'shopbuilder' ),
727 - 'tab' => 'button',
728 - ],
729 - 'show_btn_on_loop' => [
730 - 'id' => 'show_btn_on_loop',
731 - 'value' => 'on',
732 - 'type' => 'switch',
733 - 'label' => esc_html__( 'Show in Product Showcase', 'shopbuilder' ),
734 - 'tab' => 'button',
735 - ],
736 - 'loop_btn_position' => [
737 - 'id' => 'loop_btn_position',
738 - 'type' => 'select',
739 - 'value' => 'custom',
740 - 'label' => esc_html__( 'Showcase Button Position', 'shopbuilder' ),
741 - 'help' => esc_html__( 'Manage compare button position in product showcases (Shop, Related, Upsells, Cross-sells, etc.).', 'shopbuilder' ),
742 - 'options' => [
743 - 'before_add_to_cart' => esc_html__( 'Above Add To Cart', 'shopbuilder' ),
744 - 'after_add_to_cart' => esc_html__( 'Below Add To Cart', 'shopbuilder' ),
745 - 'shortcode' => esc_html__( 'Use Shortcode', 'shopbuilder' ),
746 - 'custom' => esc_html__( 'Custom Position', 'shopbuilder' ),
747 - ],
748 - 'dependency' => [
749 - 'rules' => [
750 - [
751 - 'item' => 'modules.compare.show_btn_on_loop',
752 - 'value' => 'on',
753 - 'operator' => '==',
754 - ],
755 - ],
756 - ],
757 - 'tab' => 'button',
758 - ],
759 - 'loop_btn_position_shortcode' => [
760 - 'type' => 'raw',
761 - 'label' => ' ',
762 - 'html' => sprintf(
763 - /* translators: 1: The shortcode.*/
764 - esc_html__( 'Choose where to show button in WooCommerce product\'s loop. Copy this shortcode %1$s and paste it where you want to show the button.', 'shopbuilder' ),
765 - '<code>[rtsb_compare_button]</code>'
766 - ),
767 - 'dependency' => [
768 - 'rules' => [
769 - [
770 - 'item' => 'modules.compare.show_btn_on_loop',
771 - 'value' => 'on',
772 - 'operator' => '==',
773 - ],
774 - [
775 - 'item' => 'modules.compare.loop_btn_position',
776 - 'value' => 'shortcode',
777 - 'operator' => '==',
778 - ],
779 - ],
780 - ],
781 - 'tab' => 'button',
782 - ],
783 - 'loop_custom_hook_name' => [
784 - 'id' => 'product_custom_hook_name',
785 - 'type' => 'text',
786 - 'label' => esc_html__( 'Enter Hook Name', 'shopbuilder' ),
787 - 'tab' => 'button',
788 - 'help' => sprintf(
789 - /* translators: 1: The shortcode.*/
790 - esc_html__( 'Or Copy the php code %1$s and paste it in your product query where you want to show the button.', 'shopbuilder' ),
791 - "<br /><code>&lt;?php do_action('rtsb/modules/compare/frontend/display' ); ?&gt;</code><br />"
792 - ),
793 - 'dependency' => [
794 - 'rules' => [
795 - [
796 - 'item' => 'modules.compare.show_btn_on_loop',
797 - 'value' => 'on',
798 - 'operator' => '==',
799 - ],
800 - [
801 - 'item' => 'modules.compare.loop_btn_position',
802 - 'value' => 'custom',
803 - 'operator' => '==',
804 - ],
805 - ],
806 - ],
807 - ],
808 - 'loop_custom_hook_priority' => [
809 - 'id' => 'product_custom_hook_priority',
810 - 'type' => 'number',
811 - 'value' => 10,
812 - 'size' => 'small',
813 - 'min' => 0,
814 - 'max' => 999,
815 - 'label' => esc_html__( 'Hook Priority', 'shopbuilder' ),
816 - 'tab' => 'button',
817 - 'dependency' => [
818 - 'rules' => [
819 - [
820 - 'item' => 'modules.compare.show_btn_on_loop',
821 - 'value' => 'on',
822 - 'operator' => '==',
823 - ],
824 - [
825 - 'item' => 'modules.compare.loop_btn_position',
826 - 'value' => 'custom',
827 - 'operator' => '==',
828 - ],
829 - ],
830 - 'relation' => 'and',
831 - ],
832 - ],
833 - 'compare_single_wrapper_heading' => [
834 - 'id' => 'compare_single_wrapper_heading',
835 - 'type' => 'title',
836 - 'label' => esc_html__( 'Product Page Settings', 'shopbuilder' ),
837 - 'tab' => 'button',
838 - ],
839 - 'show_btn_product_page' => [
840 - 'id' => 'show_btn_product_page',
841 - 'type' => 'switch',
842 - 'value' => 'on',
843 - 'label' => esc_html__( 'Show Button in Product Page', 'shopbuilder' ),
844 - 'tab' => 'button',
845 - ],
846 - 'product_btn_position' => [
847 - 'id' => 'product_btn_position',
848 - 'label' => esc_html__( 'Product Page Button Position', 'shopbuilder' ),
849 - 'help' => esc_html__( 'You can manage compare button position in single product page.', 'shopbuilder' ),
850 - 'type' => 'select',
851 - 'value' => 'custom',
852 - 'options' => [
853 - 'before_add_to_cart' => esc_html__( 'Above Add To Cart', 'shopbuilder' ),
854 - 'after_add_to_cart' => esc_html__( 'Below Add To Cart', 'shopbuilder' ),
855 - 'after_thumbnail' => esc_html__( 'After Image', 'shopbuilder' ),
856 - 'after_summary' => esc_html__( 'After Summary', 'shopbuilder' ),
857 - 'shortcode' => esc_html__( 'Use Shortcode', 'shopbuilder' ),
858 - 'custom' => esc_html__( 'Custom Position', 'shopbuilder' ),
859 - ],
860 - 'dependency' => [
861 - 'rules' => [
862 - [
863 - 'item' => 'modules.compare.show_btn_product_page',
864 - 'value' => 'on',
865 - 'operator' => '==',
866 - ],
867 - ],
868 - ],
869 - 'tab' => 'button',
870 - ],
871 - 'product_btn_position_shortcode' => [
872 - 'type' => 'raw',
873 - 'label' => ' ',
874 - 'html' => sprintf(
875 - /* translators: 1: The shortcode.*/
876 - 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' ),
877 - '<code>[rtsb_compare_button]</code> '
878 - ),
879 - 'dependency' => [
880 - 'rules' => [
881 - [
882 - 'item' => 'modules.compare.show_btn_product_page',
883 - 'value' => 'on',
884 - 'operator' => '==',
885 - ],
886 - [
887 - 'item' => 'modules.compare.product_btn_position',
888 - 'value' => 'shortcode',
889 - 'operator' => '==',
890 - ],
891 - ],
892 - ],
893 - 'tab' => 'button',
894 - ],
895 - 'product_custom_hook_name' => [
896 - 'id' => 'product_custom_hook_name',
897 - 'type' => 'text',
898 - 'label' => esc_html__( 'Product Hook Name', 'shopbuilder' ),
899 - 'tab' => 'button',
900 - 'help' => sprintf(
901 - /* translators: 1: The shortcode.*/
902 - esc_html__( 'Or Copy the php code %1$s and paste it in your product query where you want to show the button.', 'shopbuilder' ),
903 - "<br /><code>&lt;?php do_action('rtsb/modules/compare/frontend/display' ); ?&gt;</code><br />"
904 - ),
905 - 'dependency' => [
906 - 'rules' => [
907 - [
908 - 'item' => 'modules.compare.show_btn_product_page',
909 - 'value' => 'on',
910 - 'operator' => '==',
911 - ],
912 - [
913 - 'item' => 'modules.compare.product_btn_position',
914 - 'value' => 'custom',
915 - 'operator' => '==',
916 - ],
917 - ],
918 - ],
919 - ],
920 - 'product_custom_hook_priority' => [
921 - 'id' => 'product_custom_hook_priority',
922 - 'type' => 'number',
923 - 'value' => 10,
924 - 'size' => 'small',
925 - 'min' => 0,
926 - 'max' => 999,
927 - 'label' => esc_html__( 'Product Hook Priority', 'shopbuilder' ),
928 - 'tab' => 'button',
929 - 'dependency' => [
930 - 'rules' => [
931 - [
932 - 'item' => 'modules.compare.show_btn_product_page',
933 - 'value' => 'on',
934 - 'operator' => '==',
935 - ],
936 - [
937 - 'item' => 'modules.compare.product_btn_position',
938 - 'value' => 'custom',
939 - 'operator' => '==',
940 - ],
941 - ],
942 - 'relation' => 'and',
943 - ],
944 - ],
945 - 'button_text' => [
946 - 'id' => 'button_text',
947 - 'label' => esc_html__( 'Compare Button Text', 'shopbuilder' ),
948 - 'help' => esc_html__( 'Enter your compare button text.', 'shopbuilder' ),
949 - 'type' => 'text',
950 - 'value' => esc_html__( 'Compare', 'shopbuilder' ),
951 - 'placeholder' => esc_html__( 'Compare', 'shopbuilder' ),
952 - 'tab' => 'button',
953 - ],
954 - 'notice_added_text' => [
955 - 'id' => 'notice_added_text',
956 - 'label' => esc_html__( 'Product Added Text', 'shopbuilder' ),
957 - 'help' => esc_html__( 'Enter the product added text.', 'shopbuilder' ),
958 - 'type' => 'text',
959 - 'value' => esc_html__( 'Product added!', 'shopbuilder' ),
960 - 'placeholder' => esc_html__( 'Product added!', 'shopbuilder' ),
961 - 'tab' => 'general',
962 - ],
963 - 'notice_removed_text' => [
964 - 'id' => 'notice_removed_text',
965 - 'label' => esc_html__( 'Product Removed Text', 'shopbuilder' ),
966 - 'help' => esc_html__( 'Enter the product removed text.', 'shopbuilder' ),
967 - 'type' => 'text',
968 - 'value' => esc_html__( 'Product removed!', 'shopbuilder' ),
969 - 'placeholder' => esc_html__( 'Product removed!', 'shopbuilder' ),
970 - 'tab' => 'general',
971 - ],
972 - 'browse_list_text' => [
973 - 'id' => 'browse_list_text',
974 - 'label' => esc_html__( 'Browse Compare Text', 'shopbuilder' ),
975 - 'help' => esc_html__( 'Enter a text for the "Browse compare" link on the compare page', 'shopbuilder' ),
976 - 'type' => 'text',
977 - 'value' => esc_html__( 'Browse Compare', 'shopbuilder' ),
978 - 'placeholder' => esc_html__( 'Browse Compare', 'shopbuilder' ),
979 - 'tab' => 'general',
980 - ],
981 - 'page' => [
982 - 'id' => 'page',
983 - 'type' => 'select',
984 - 'help' => sprintf(
985 - /* translators: 1: The shortcode.*/
986 - esc_html__( 'Select a page for compare page and make sure you add the shortcode %1$s into the page content', 'shopbuilder' ),
987 - '<code>[rtsb_compare_list]</code>'
988 - ),
989 - 'label' => esc_html__( 'Select Compare Page', 'shopbuilder' ),
990 - 'options' => Fns::get_pages(),
991 - 'empty' => esc_html__( 'Select a page', 'shopbuilder' ),
992 - 'searchable' => true,
993 - 'tab' => 'page',
994 - ],
995 - 'max_limit' => [
996 - 'id' => 'page',
997 - 'type' => 'number',
998 - 'sanitize_fn' => 'absint',
999 - 'value' => 10,
1000 - 'help' => esc_html__( 'You can manage your maximum compare quantity from here.', 'shopbuilder' ),
1001 - 'label' => esc_html__( 'Maximum Compare Limit', 'shopbuilder' ),
1002 - 'tab' => 'page',
1003 - ],
1004 - 'page_show_fields' => [
1005 - 'value' => CompareFns::get_list_field_ids(),
1006 - 'id' => 'page_show_fields',
1007 - 'multiple' => true,
1008 - 'checkbox' => true,
1009 - 'type' => 'sortable',
1010 - 'options' => CompareFns::get_available_list_fields(),
1011 - 'label' => esc_html__( 'Compare Table Fields Visibility', 'shopbuilder' ),
1012 - 'tab' => 'page',
1013 - ],
1014 -
1015 - ]
1016 - ),
1017 - 'tabs' => [
1018 - 'general' => [
1019 - 'title' => esc_html__( 'General', 'shopbuilder' ),
1020 - ],
1021 - 'button' => [
1022 - 'title' => esc_html__( 'Button', 'shopbuilder' ),
1023 - ],
1024 - 'page' => [
1025 - 'title' => esc_html__( 'Page', 'shopbuilder' ),
1026 - ],
1027 -
1028 - ],
1029 - ]
1030 - ),
1031 - 'variation_swatches' => $variationSwatch,
1032 - 'variation_gallery' => $variationGallery,
1033 - 'product_badges' => apply_filters(
1034 - 'rtsb/module/product_badges/options',
1035 - [
1036 - 'id' => 'product_badges',
1037 - 'active' => '',
1038 - 'title' => esc_html__( 'Product Badges', 'shopbuilder' ),
1039 - 'package' => 'free',
1040 - 'active_field' => [
1041 - 'label' => esc_html__( 'Enable Product Badges?', 'shopbuilder' ),
1042 - 'help' => esc_html__( 'Switch on to enable product badges module.', 'shopbuilder' ),
1043 - ],
1044 - 'base_class' => Badges::class,
1045 - 'fields' => $this->product_badges_fields(),
1046 - 'tabs' => [
1047 - 'general' => [
1048 - 'title' => esc_html__( 'General', 'shopbuilder' ),
1049 - ],
1050 - 'group' => [
1051 - 'title' => esc_html__( 'Settings', 'shopbuilder' ),
1052 - ],
1053 - 'badges' => [
1054 - 'title' => esc_html__( 'Create Badges', 'shopbuilder' ),
1055 - ],
1056 - ],
1057 - ]
1058 - ),
1059 - 'checkout_fields_editor' => apply_filters(
1060 - 'rtsb/module/checkout_fields_editor/options',
1061 - [
1062 - 'id' => 'checkout_fields_editor',
1063 - 'active' => '',
1064 - 'title' => esc_html__( 'Checkout Fields Editor', 'shopbuilder' ),
1065 - 'base_class' => CheckoutEditorInit::class,
1066 - 'active_field' => [
1067 - 'label' => esc_html__( 'Enable Checkout Fields Editor?', 'shopbuilder' ),
1068 - 'help' => esc_html__( 'Switch on to enable Checkout Fields Editor module.', 'shopbuilder' ),
1069 - ],
1070 - 'fields' => [
1071 - 'checkout_billing_intro' => [
1072 - 'id' => 'checkout_billing_intro',
1073 - 'type' => 'description',
1074 - 'text' => esc_html__( 'Billing Fields Editor allows you to customize the default billing fields on your checkout page.', 'shopbuilder' ),
1075 - 'tab' => 'billing_fields',
1076 - ],
1077 - 'modify_billing_form' => [
1078 - 'id' => 'modify_billing_form',
1079 - 'type' => 'switch',
1080 - 'label' => esc_html__( 'Customize Billing Form?', 'shopbuilder' ),
1081 - 'help' => esc_html__( 'Enable this option to edit billing Form.', 'shopbuilder' ),
1082 - 'tab' => 'billing_fields',
1083 - ],
1084 -
1085 - 'checkout_billing_fields_info' => [
1086 - 'id' => 'checkout_billing_fields_info',
1087 - 'type' => 'title',
1088 - 'label' => esc_html__( 'Billing Fields', 'shopbuilder' ),
1089 - 'tab' => 'billing_fields',
1090 - 'dependency' => [
1091 - 'rules' => [
1092 - [
1093 - 'item' => 'modules.checkout_fields_editor.modify_billing_form',
1094 - 'value' => 'on',
1095 - 'operator' => '==',
1096 - ],
1097 - ],
1098 - ],
1099 - ],
1100 - 'checkout_billing_fields' => [
1101 - 'id' => 'checkout_billing_fields',
1102 - 'type' => 'checkout_fields',
1103 - 'tab' => 'billing_fields',
1104 - 'value' => wp_json_encode( CheckoutFns::default_billing_fields() ),
1105 - 'dependency' => [
1106 - 'rules' => [
1107 - [
1108 - 'item' => 'modules.checkout_fields_editor.modify_billing_form',
1109 - 'value' => 'on',
1110 - 'operator' => '==',
1111 - ],
1112 - ],
1113 - ],
1114 - ],
1115 - 'checkout_shipping_intro' => [
1116 - 'id' => 'checkout_shipping_intro',
1117 - 'type' => 'description',
1118 - 'text' => esc_html__( 'Shipping Fields Editor allows you to customize the default shipping fields on your checkout page.', 'shopbuilder' ),
1119 - 'tab' => 'shipping_fields',
1120 - ],
1121 - 'modify_shipping_form' => [
1122 - 'id' => 'modify_billing_form',
1123 - 'type' => 'switch',
1124 - 'label' => esc_html__( 'Modify Shipping Form?', 'shopbuilder' ),
1125 - 'help' => esc_html__( 'Enable this option to edit shipping Form.', 'shopbuilder' ),
1126 - 'tab' => 'shipping_fields',
1127 - ],
1128 - 'checkout_shipping_fields_info' => [
1129 - 'id' => 'checkout_shipping_fields_info',
1130 - 'type' => 'title',
1131 - 'label' => esc_html__( 'Shipping Fields', 'shopbuilder' ),
1132 - 'tab' => 'shipping_fields',
1133 - 'dependency' => [
1134 - 'rules' => [
1135 - [
1136 - 'item' => 'modules.checkout_fields_editor.modify_shipping_form',
1137 - 'value' => 'on',
1138 - 'operator' => '==',
1139 - ],
1140 - ],
1141 - ],
1142 - ],
1143 - 'checkout_shipping_fields' => [
1144 - 'id' => 'checkout_shipping_fields',
1145 - 'type' => 'checkout_fields',
1146 - 'tab' => 'shipping_fields',
1147 - 'value' => wp_json_encode( CheckoutFns::default_shipping_fields() ),
1148 - 'dependency' => [
1149 - 'rules' => [
1150 - [
1151 - 'item' => 'modules.checkout_fields_editor.modify_shipping_form',
1152 - 'value' => 'on',
1153 - 'operator' => '==',
1154 - ],
1155 - ],
1156 - ],
1157 - ],
1158 - 'checkout_additional_intro' => [
1159 - 'id' => 'checkout_additional_intro',
1160 - 'type' => 'description',
1161 - 'text' => esc_html__( 'Additional Fields Editor allows you to customize the extra fields on your checkout page.', 'shopbuilder' ),
1162 - 'tab' => 'additional_fields',
1163 - ],
1164 - 'modify_additional_form' => [
1165 - 'id' => 'modify_additional_form',
1166 - 'type' => 'switch',
1167 - 'label' => esc_html__( 'Modify Additional Form Field?', 'shopbuilder' ),
1168 - 'help' => esc_html__( 'Enable this option to edit Additional Form.', 'shopbuilder' ),
1169 - 'tab' => 'additional_fields',
1170 - ],
1171 - 'checkout_additional_fields_info' => [
1172 - 'id' => 'checkout_additional_fields_info',
1173 - 'type' => 'title',
1174 - 'label' => esc_html__( 'Additional Fields', 'shopbuilder' ),
1175 - 'tab' => 'additional_fields',
1176 - 'dependency' => [
1177 - 'rules' => [
1178 - [
1179 - 'item' => 'modules.checkout_fields_editor.modify_additional_form',
1180 - 'value' => 'on',
1181 - 'operator' => '==',
1182 - ],
1183 - ],
1184 - ],
1185 - ],
1186 - 'checkout_additional_fields' => [
1187 - 'id' => 'checkout_additional_fields',
1188 - 'type' => 'checkout_fields',
1189 - 'tab' => 'additional_fields',
1190 - 'value' => wp_json_encode( CheckoutFns::checkout_additional_fields() ),
1191 - 'dependency' => [
1192 - 'rules' => [
1193 - [
1194 - 'item' => 'modules.checkout_fields_editor.modify_additional_form',
1195 - 'value' => 'on',
1196 - 'operator' => '==',
1197 - ],
1198 - ],
1199 - ],
1200 - ],
1201 - ],
1202 - 'tabs' => [
1203 - 'general' => [
1204 - 'title' => esc_html__( 'General', 'shopbuilder' ),
1205 - ],
1206 - 'billing_fields' => [
1207 - 'title' => esc_html__( 'Billing Fields', 'shopbuilder' ),
1208 - ],
1209 - 'shipping_fields' => [
1210 - 'title' => esc_html__( 'Shipping Fields', 'shopbuilder' ),
1211 - ],
1212 - 'additional_fields' => [
1213 - 'title' => esc_html__( 'Additional Fields', 'shopbuilder' ),
1214 - ],
1215 - ],
1216 - ]
1217 - ),
1218 - 'shopify_checkout' => apply_filters(
1219 - 'rtsb/module/shopify_checkout/options',
1220 - [
1221 - 'id' => 'shopify_checkout',
1222 - 'active' => '',
1223 - 'title' => esc_html__( 'Shopify Checkout', 'shopbuilder' ),
1224 - 'base_class' => ShopifyCheckout::class,
1225 - 'active_field' => [
1226 - 'label' => esc_html__( 'Enable Shopify Checkout?', 'shopbuilder' ),
1227 - 'help' => esc_html__( 'Switch on to enable Shopify Checkout module.', 'shopbuilder' ),
1228 - ],
1229 - 'fields' => $this->shopify_checkout_options(),
1230 - 'tabs' => [
1231 - 'general' => [
1232 - 'title' => esc_html__( 'General', 'shopbuilder' ),
1233 - ],
1234 - 'multi-step' => [
1235 - 'title' => esc_html__( 'Multi-Step', 'shopbuilder' ),
1236 - ],
1237 - 'styles' => [
1238 - 'title' => esc_html__( 'General Styles', 'shopbuilder' ),
1239 - ],
1240 - 'btn-styles' => [
1241 - 'title' => esc_html__( 'Button Styles', 'shopbuilder' ),
1242 - ],
1243 - ],
1244 - ]
1245 - ),
1246 - 'mini_cart' => apply_filters(
1247 - 'rtsb/module/mini_cart/options',
1248 - [
1249 - 'id' => 'mini_cart',
1250 - 'active' => '',
1251 - 'title' => esc_html__( 'Mini Cart', 'shopbuilder' ),
1252 - 'package' => $this->pro_package(),
1253 - 'active_field' => [
1254 - 'label' => esc_html__( 'Enable Mini Cart?', 'shopbuilder' ),
1255 - 'help' => esc_html__( 'Switch on to enable mini cart module.', 'shopbuilder' ),
1256 - ],
1257 - 'is_active' => true,
1258 - 'fields' => Fns::pro_version_notice( '1.0.0' ),
1259 - ]
1260 - ),
1261 - 'product_size_chart' => apply_filters(
1262 - 'rtsb/module/product_size_chart/options',
1263 - [
1264 - 'id' => 'product_size_chart',
1265 - 'active' => '',
1266 - 'title' => esc_html__( 'Product Size Chart', 'shopbuilder' ),
1267 - 'package' => $this->pro_package(),
1268 - 'active_field' => [
1269 - 'label' => esc_html__( 'Enable Product Size Chart?', 'shopbuilder' ),
1270 - 'help' => esc_html__( 'Switch on to enable Product Size Chart module.', 'shopbuilder' ),
1271 - ],
1272 - 'fields' => Fns::pro_version_notice( '1.0.0' ),
1273 - ]
1274 - ),
1275 - 'customize_my_account' => apply_filters(
1276 - 'rtsb/module/customize_my_account/options',
1277 - [
1278 - 'id' => 'customize_my_account',
1279 - 'active' => '',
1280 - 'title' => esc_html__( 'Customize My Account', 'shopbuilder' ),
1281 - 'package' => $this->pro_package(),
1282 - 'active_field' => [
1283 - 'label' => esc_html__( 'Enable Customize My Account?', 'shopbuilder' ),
1284 - 'help' => esc_html__( 'Switch on to enable customize my account module.', 'shopbuilder' ),
1285 - ],
1286 - 'fields' => Fns::pro_version_notice( '1.4.0' ),
1287 - ]
1288 - ),
1289 - 'pre_order' => apply_filters(
1290 - 'rtsb/module/pre_order/options',
1291 - [
1292 - 'id' => 'pre_order',
1293 - 'active' => '',
1294 - 'title' => esc_html__( 'Pre-Order', 'shopbuilder' ),
1295 - 'package' => $this->pro_package(),
1296 - 'active_field' => [
1297 - 'label' => esc_html__( 'Enable Pre-Order?', 'shopbuilder' ),
1298 - 'help' => esc_html__( 'Switch on to enable pre-order module.', 'shopbuilder' ),
1299 - ],
1300 - 'fields' => Fns::pro_version_notice( '1.5.0' ),
1301 - ]
1302 - ),
1303 - 'currency_switcher' => apply_filters(
1304 - 'rtsb/module/currency_switcher/options',
1305 - [
1306 - 'id' => 'currency_switcher',
1307 - 'active' => '',
1308 - 'title' => esc_html__( 'Currency Switcher', 'shopbuilder' ),
1309 - 'package' => $this->pro_package(),
1310 - 'active_field' => [
1311 - 'label' => esc_html__( 'Enable Currency Switcher?', 'shopbuilder' ),
1312 - 'help' => esc_html__( 'Switch on to enable currency switcher module.', 'shopbuilder' ),
1313 - ],
1314 - 'is_active' => true,
1315 - 'fields' => Fns::pro_version_notice( '1.5.0' ),
1316 - ]
1317 - ),
1318 - 'product_add_ons' => apply_filters(
1319 - 'rtsb/module/product_add_ons/options',
1320 - [
1321 - 'id' => 'product_add_ons',
1322 - 'active' => '',
1323 - 'title' => esc_html__( 'Product Add-Ons', 'shopbuilder' ),
1324 - 'package' => $this->pro_package(),
1325 - 'active_field' => [
1326 - 'label' => esc_html__( 'Enable Product Add-Ons?', 'shopbuilder' ),
1327 - 'help' => esc_html__( 'Switch on to enable product add-ons module.', 'shopbuilder' ),
1328 - ],
1329 - 'is_active' => true,
1330 - 'fields' => Fns::pro_version_notice( '1.6.0' ),
1331 - ]
1332 - ),
1333 - 'sales_notification' => apply_filters(
1334 - 'rtsb/module/sales_notification/options',
1335 - [
1336 - 'id' => 'sales_notification',
1337 - 'active' => '',
1338 - 'title' => esc_html__( 'Sales Notification', 'shopbuilder' ),
1339 - 'package' => $this->pro_package(),
1340 - 'active_field' => [
1341 - 'label' => esc_html__( 'Enable Sales Notification?', 'shopbuilder' ),
1342 - 'help' => esc_html__( 'Switch on to enable Sales Notification module.', 'shopbuilder' ),
1343 - ],
1344 - 'fields' => Fns::pro_version_notice( '1.0.0' ),
1345 - ]
1346 - ),
1347 - 'flash_sale_countdown' => apply_filters(
1348 - 'rtsb/module/flash_sale_countdown/options',
1349 - [
1350 - 'id' => 'flash_sale_countdown',
1351 - 'active' => '',
1352 - 'title' => esc_html__( 'Flash Sale Countdown', 'shopbuilder' ),
1353 - 'package' => $this->pro_package(),
1354 - 'active_field' => [
1355 - 'label' => esc_html__( 'Enable Flash Sale Countdown?', 'shopbuilder' ),
1356 - 'help' => esc_html__( 'Switch on to enable Flash Sale Countdown module.', 'shopbuilder' ),
1357 - ],
1358 - 'fields' => Fns::pro_version_notice( '1.0.0' ),
1359 - ]
1360 - ),
1361 - 'quick_checkout' => apply_filters(
1362 - 'rtsb/module/quick_checkout/options',
1363 - [
1364 - 'id' => 'quick_checkout',
1365 - 'active' => '',
1366 - 'title' => esc_html__( 'Quick Checkout', 'shopbuilder' ),
1367 - 'package' => $this->pro_package(),
1368 - 'active_field' => [
1369 - 'label' => esc_html__( 'Enable Quick Checkout?', 'shopbuilder' ),
1370 - 'help' => esc_html__( 'Switch on to enable quick checkout module. Note: Currently, this is not suitable for variable products.', 'shopbuilder' ),
1371 - ],
1372 - 'fields' => Fns::pro_version_notice( '1.1.0' ),
1373 - ]
1374 - ),
1375 - 'multi_step_checkout' => apply_filters(
1376 - 'rtsb/module/multi_step_checkout/options',
1377 - [
1378 - 'id' => 'multi_step_checkout',
1379 - 'active' => '',
1380 - 'title' => esc_html__( 'Multi-Step Checkout', 'shopbuilder' ),
1381 - 'package' => $this->pro_package(),
1382 - 'active_field' => [
1383 - 'label' => esc_html__( 'Enable Multi-Step Checkout?', 'shopbuilder' ),
1384 - 'help' => esc_html__( 'Switch on to enable Multi-step Checkout module.', 'shopbuilder' ),
1385 - ],
1386 - 'fields' => Fns::pro_version_notice( '1.0.0' ),
1387 - ]
1388 - ),
1389 - 'back_order' => apply_filters(
1390 - 'rtsb/module/back_order/options',
1391 - [
1392 - 'id' => 'back_order',
1393 - 'active' => '',
1394 - 'title' => esc_html__( 'Back-Order', 'shopbuilder' ),
1395 - 'package' => $this->pro_package(),
1396 - 'active_field' => [
1397 - 'label' => esc_html__( 'Enable Back-Order?', 'shopbuilder' ),
1398 - 'help' => esc_html__( 'Switch on to enable back-order module.', 'shopbuilder' ),
1399 - ],
1400 - 'fields' => Fns::pro_version_notice( '1.3.0', 'general', 'Back-Order', false ),
1401 - ]
1402 - ),
1403 - 'sticky_add_to_cart' => apply_filters(
1404 - 'rtsb/module/sticky_add_to_cart/options',
1405 - [
1406 - 'id' => 'sticky_add_to_cart',
1407 - 'active' => '',
1408 - 'title' => esc_html__( 'Sticky Add-To-Cart', 'shopbuilder' ),
1409 - 'package' => $this->pro_package(),
1410 - 'active_field' => [
1411 - 'label' => esc_html__( 'Enable Sticky Add-To-Cart?', 'shopbuilder' ),
1412 - 'help' => esc_html__( 'Switch on to enable sticky add-to-cart module.', 'shopbuilder' ),
1413 - ],
1414 - 'fields' => Fns::pro_version_notice( '1.7.0', 'general', 'Sticky Add-To-Cart', false ),
1415 - ]
1416 - ),
1417 - 'smart_coupons' => apply_filters(
1418 - 'rtsb/module/smart_coupons/options',
1419 - [
1420 - 'id' => 'smart_coupons',
1421 - 'active' => '',
1422 - 'title' => esc_html__( 'Smart Coupons', 'shopbuilder' ),
1423 - 'package' => $this->pro_package(),
1424 - 'active_field' => [
1425 - 'label' => esc_html__( 'Enable Smart Coupons?', 'shopbuilder' ),
1426 - 'help' => esc_html__( 'Switch on to enable smart coupons module.', 'shopbuilder' ),
1427 - ],
1428 - 'fields' => Fns::pro_version_notice( '1.10.0', 'general', 'ShopBuilder Pro', false ),
1429 - ]
1430 - ),
1431 - 'bulk_discounts' => apply_filters(
1432 - 'rtsb/module/bulk_discounts/options',
1433 - [
1434 - 'id' => 'bulk_discounts',
1435 - 'active' => '',
1436 - 'title' => esc_html__( 'Volume Discount', 'shopbuilder' ),
1437 - 'active_field' => [
1438 - 'label' => esc_html__( 'Enable Bulk Discounts?', 'shopbuilder' ),
1439 - 'help' => esc_html__( 'Switch on to enable bulk discounts module.', 'shopbuilder' ),
1440 - ],
1441 - 'package' => $this->pro_package(),
1442 - 'fields' => Fns::pro_version_notice( '1.10.0', 'general', 'ShopBuilder Pro', false ),
1443 - ]
1444 - ),
1445 - 'bogo_bxgy_free_gift_discounts' => apply_filters(
1446 - 'rtsb/module/bogo_bxgy_free_gift_discounts/options',
1447 - [
1448 - 'id' => 'bogo_bxgy_free_gift_discounts',
1449 - 'active' => '',
1450 - 'title' => esc_html__( 'Buy X Get Y | BOGO', 'shopbuilder' ),
1451 - 'active_field' => [
1452 - 'label' => esc_html__( 'Enable Buy X Get Y | BOGO?', 'shopbuilder' ),
1453 - 'help' => esc_html__( 'Switch on to enable Buy X Get Y | BOGO module.', 'shopbuilder' ),
1454 - ],
1455 - 'package' => $this->pro_package(),
1456 - 'fields' => Fns::pro_version_notice( '1.11.0', 'general', 'ShopBuilder Pro', false ),
1457 - ]
1458 - ),
1459 - 'partial_pay' => apply_filters(
1460 - 'rtsb/module/partial_pay/options',
1461 - [
1462 - 'id' => 'partial_pay',
1463 - 'active' => '',
1464 - 'title' => esc_html__( 'Partial Pay', 'shopbuilder' ),
1465 - 'active_field' => [
1466 - 'label' => esc_html__( 'Enable Partial Pay?', 'shopbuilder' ),
1467 - 'help' => esc_html__( 'Switch on to enable partial pay module.', 'shopbuilder' ),
1468 - ],
1469 - 'package' => $this->pro_package(),
1470 - 'fields' => Fns::pro_version_notice( '1.12.0', 'general', 'ShopBuilder Pro', false ),
1471 - ]
1472 - ),
1473 - 'gift_card' => apply_filters(
1474 - 'rtsb/module/gift_card/options',
1475 - [
1476 - 'id' => 'gift_card',
1477 - 'active' => '',
1478 - 'title' => esc_html__( 'Gift Card', 'shopbuilder' ),
1479 - 'active_field' => [
1480 - 'label' => esc_html__( 'Enable Gift Card?', 'shopbuilder' ),
1481 - 'help' => esc_html__( 'Switch on to enable Gift Card module.', 'shopbuilder' ),
1482 - ],
1483 - 'package' => $this->pro_package(),
1484 - 'fields' => Fns::pro_version_notice( '1.10.0' ),
1485 - ]
1486 - ),
1487 - 'pdf_invoice' => apply_filters(
1488 - 'rtsb/module/pdf_invoice/options',
1489 - [
1490 - 'id' => 'pdf_invoice',
1491 - 'active' => '',
1492 - 'title' => esc_html__( 'PDF Invoice', 'shopbuilder' ),
1493 - 'active_field' => [
1494 - 'label' => esc_html__( 'Enable PDF Invoice?', 'shopbuilder' ),
1495 - 'help' => esc_html__( 'Switch on to enable PDF Invoice module.', 'shopbuilder' ),
1496 - ],
1497 - 'package' => $this->pro_package(),
1498 - 'fields' => Fns::pro_version_notice( '2.1.0', 'general', 'ShopBuilder Pro', false ),
1499 - ]
1500 - ),
1501 - 'extended_cross_sell' => apply_filters(
1502 - 'rtsb/module/extended_cross_sell/options',
1503 - [
1504 - 'id' => 'extended_cross_sell',
1505 - 'active' => '',
1506 - 'title' => esc_html__( 'Extended Cross Sell', 'shopbuilder' ),
1507 - 'active_field' => [
1508 - 'label' => esc_html__( 'Enable Extended Cross Sell?', 'shopbuilder' ),
1509 - 'help' => esc_html__( 'Switch on to enable Extended Cross Sell.', 'shopbuilder' ),
1510 - ],
1511 - 'package' => $this->pro_package(),
1512 - 'fields' => Fns::pro_version_notice( '2.1.4', 'general', 'ShopBuilder Pro', false ),
1513 - ]
1514 - ),
1515 - 'abandoned_cart_recovery' => apply_filters(
1516 - 'rtsb/module/abandoned_cart_recovery/options',
1517 - [
1518 - 'id' => 'abandoned_cart_recovery',
1519 - 'active' => '',
1520 - 'badge' => 'new',
1521 - 'title' => esc_html__( 'Abandoned Cart Recovery', 'shopbuilder' ),
1522 - 'active_field' => [
1523 - 'label' => esc_html__( 'Enable Abandoned Cart Recovery?', 'shopbuilder' ),
1524 - 'help' => esc_html__( 'Cart will be considered abandoned if order is not completed in cut-off time.', 'shopbuilder' ),
1525 - ],
1526 - 'fields' => CartRecoveryOptions::get_cart_recovery_fields(),
1527 - 'base_class' => CartRecoveryInit::class,
1528 - 'tabs' => [
1529 - 'general' => [
1530 - 'title' => esc_html__( 'General', 'shopbuilder' ),
1531 - ],
1532 - 'emailTemplates' => [
1533 - 'title' => esc_html__( 'Email Templates', 'shopbuilder' ),
1534 - ],
1535 - ],
1536 - ]
1537 - ),
1538 - 'popup_builder' => apply_filters(
1539 - 'rtsb/module/popup_builder/options',
1540 - [
1541 - 'id' => 'popup_builder',
1542 - 'active' => '',
1543 - 'title' => esc_html__( 'Popup Builder', 'shopbuilder' ),
1544 - 'active_field' => [
1545 - 'label' => esc_html__( 'Enable Popup Builder?', 'shopbuilder' ),
1546 - 'help' => esc_html__( 'Switch on to enable Popup Builder.', 'shopbuilder' ),
1547 - ],
1548 - 'package' => $this->pro_package(),
1549 - 'fields' => Fns::pro_version_notice( '2.1.5', 'general', 'ShopBuilder Pro', false ),
1550 - ]
1551 - ),
1552 - 'save_for_buy_later' => apply_filters(
1553 - 'rtsb/module/save_for_buy_later/options',
1554 - [
1555 - 'id' => 'save_for_buy_later',
1556 - 'active' => '',
1557 - 'title' => esc_html__( 'Save Cart For Buy Later', 'shopbuilder' ),
1558 - 'active_field' => [
1559 - 'label' => esc_html__( 'Enable Save Cart For Buy Later?', 'shopbuilder' ),
1560 - 'help' => esc_html__( 'Switch on to enable Save Cart For Buy Later.', 'shopbuilder' ),
1561 - ],
1562 - 'package' => $this->pro_package(),
1563 - 'fields' => Fns::pro_version_notice( '2.1.8', 'general', 'ShopBuilder Pro', false ),
1564 - ]
1565 - ),
1566 - 'catalog_mode' => apply_filters(
1567 - 'rtsb/module/catalog_mode/options',
1568 - [
1569 - 'id' => 'catalog_mode',
1570 - 'active' => '',
1571 - 'title' => esc_html__( 'Catalog Mode', 'shopbuilder' ),
1572 - 'active_field' => [
1573 - 'label' => esc_html__( 'Enable Catalog Mode?', 'shopbuilder' ),
1574 - 'help' => esc_html__( 'Switch on to enable Catalog Mode.', 'shopbuilder' ),
1575 - ],
1576 - 'package' => $this->pro_package(),
1577 - 'fields' => Fns::pro_version_notice( '2.1.9', 'general', 'ShopBuilder Pro', false ),
1578 - ]
1579 - ),
1580 - 'back_in_stock_notifier' => apply_filters(
1581 - 'rtsb/module/back_in_stock_notifier/options',
1582 - [
1583 - 'id' => 'back_in_stock_notifier',
1584 - 'active' => '',
1585 - 'title' => esc_html__( 'Back In Stock Notifier', 'shopbuilder' ),
1586 - 'active_field' => [
1587 - 'label' => esc_html__( 'Enable Back In Stock Notifier?', 'shopbuilder' ),
1588 - 'help' => esc_html__( 'Switch on to enable Back In Stock Notifier.', 'shopbuilder' ),
1589 - ],
1590 - 'package' => $this->pro_package(),
1591 - 'fields' => Fns::pro_version_notice( '2.1.11', 'general', 'ShopBuilder Pro', false ),
1592 - ]
1593 - ),
1594 - 'mega_menu' => apply_filters(
1595 - 'rtsb/module/mega_menu/options',
1596 - [
1597 - 'id' => 'mega_menu',
1598 - 'active' => '',
1599 - 'title' => esc_html__( 'Mega Menu', 'shopbuilder' ),
1600 - 'active_field' => [
1601 - 'label' => esc_html__( 'Enable Mega Menu?', 'shopbuilder' ),
1602 - 'help' => esc_html__( 'Switch on to enable Mega Menu module.', 'shopbuilder' ),
1603 - ],
1604 - 'package' => $this->pro_package(),
1605 - 'fields' => Fns::pro_version_notice( '2.1.12', 'general', 'ShopBuilder Pro', false ),
1606 - ]
1607 - ),
1608 - ];
1609 - // Inject icons, descriptions and links per module.
1610 - $meta = self::module_meta();
1611 - foreach ( $list as $key => &$item ) {
1612 - if ( isset( $meta[ $key ] ) ) {
1613 - $item['icon'] = SvgIcons::get( $meta[ $key ]['icon'] ?? 'default' );
1614 - $item['description'] = $meta[ $key ]['desc'] ?? '';
1615 - } else {
1616 - $item['icon'] = SvgIcons::get( 'default' );
1617 - $item['description'] = '';
1618 - }
1619 - $item['links'] = [
1620 - 'doc' => '',
1621 - 'video' => '',
1622 - ];
1623 - }
1624 - unset( $item );
1625 -
1626 - return apply_filters( 'rtsb/core/modules/raw_list', $list );
1627 - }
1628 -
1629 - /**
1630 - * Module icon and description metadata.
1631 - *
1632 - * @return array<string, array{icon: string, desc: string}>
1633 - */
1634 - private static function module_meta() {
1635 - return [
1636 - 'variation_swatches' => [
1637 - 'icon' => 'dots',
1638 - 'desc' => 'Replace dropdowns with color, image, label, or radio swatches.',
1639 - ],
1640 - 'variation_gallery' => [
1641 - 'icon' => 'image',
1642 - 'desc' => 'Show a unique product gallery for every variation.',
1643 - ],
1644 - 'quick_view' => [
1645 - 'icon' => 'eye',
1646 - 'desc' => 'Open a popup product preview from grids without a full page load.',
1647 - ],
1648 - 'wishlist' => [
1649 - 'icon' => 'heart',
1650 - 'desc' => 'Let customers save products to a wishlist they can revisit or share.',
1651 - ],
1652 - 'compare' => [
1653 - 'icon' => 'flip_box',
1654 - 'desc' => 'Side-by-side product attribute comparison with sticky header.',
1655 - ],
1656 - 'product_badges' => [
1657 - 'icon' => 'onsale',
1658 - 'desc' => 'Sale, new, featured, low-stock, and custom badges with rules.',
1659 - ],
1660 - 'checkout_fields_editor' => [
1661 - 'icon' => 'form',
1662 - 'desc' => 'Add, edit, reorder, or remove billing, shipping, and checkout fields.',
1663 - ],
1664 - 'shopify_checkout' => [
1665 - 'icon' => 'cart',
1666 - 'desc' => 'Single-page Shopify-style checkout with autofill and express pay.',
1667 - ],
1668 - 'mini_cart' => [
1669 - 'icon' => 'cart',
1670 - 'desc' => 'Sliding cart drawer with AJAX add-to-cart and quantity edits.',
1671 - ],
1672 - 'product_size_chart' => [
1673 - 'icon' => 'ruler',
1674 - 'desc' => 'Per-category size guides with units, conversion, and modal preview.',
1675 - ],
1676 - 'customize_my_account' => [
1677 - 'icon' => 'user',
1678 - 'desc' => 'Build the customer dashboard with custom tabs, fields, and layouts.',
1679 - ],
1680 - 'pre_order' => [
1681 - 'icon' => 'countdown',
1682 - 'desc' => 'Accept orders before launch with deposit and scheduled release.',
1683 - ],
1684 - 'currency_switcher' => [
1685 - 'icon' => 'currency',
1686 - 'desc' => 'Geo-detected switcher with live exchange rates and pricing rules.',
1687 - ],
1688 - 'product_add_ons' => [
1689 - 'icon' => 'grid',
1690 - 'desc' => 'Optional extras like gift wrap and warranties with conditional pricing.',
1691 - ],
1692 - 'sales_notification' => [
1693 - 'icon' => 'notification',
1694 - 'desc' => 'Real-time sales popups to create social proof and urgency.',
1695 - ],
1696 - 'flash_sale_countdown' => [
1697 - 'icon' => 'flash',
1698 - 'desc' => 'Scheduled flash sale countdown timers with auto-pricing.',
1699 - ],
1700 - 'quick_checkout' => [
1701 - 'icon' => 'checkout',
1702 - 'desc' => 'One-click checkout from product pages, skipping the cart.',
1703 - ],
1704 - 'multi_step_checkout' => [
1705 - 'icon' => 'multi_step',
1706 - 'desc' => 'Break checkout into guided steps with progress indicator.',
1707 - ],
1708 - 'back_order' => [
1709 - 'icon' => 'document',
1710 - 'desc' => 'Allow orders on out-of-stock products with availability dates.',
1711 - ],
1712 - 'sticky_add_to_cart' => [
1713 - 'icon' => 'button',
1714 - 'desc' => 'Sticky add-to-cart bar that follows the user on product pages.',
1715 - ],
1716 - 'smart_coupons' => [
1717 - 'icon' => 'discount',
1718 - 'desc' => 'Advanced coupon rules, URL coupons, and auto-apply conditions.',
1719 - ],
1720 - 'bulk_discounts' => [
1721 - 'icon' => 'pricing',
1722 - 'desc' => 'Tiered quantity-based pricing tables for bulk purchases.',
1723 - ],
1724 - 'bogo_bxgy_free_gift_discounts' => [
1725 - 'icon' => 'star',
1726 - 'desc' => 'Buy-one-get-one, buy-X-get-Y, and free gift promotions.',
1727 - ],
1728 - 'partial_pay' => [
1729 - 'icon' => 'payment',
1730 - 'desc' => 'Allow customers to pay in installments or deposits.',
1731 - ],
1732 - 'gift_card' => [
1733 - 'icon' => 'coupon',
1734 - 'desc' => 'Digital gift cards with email delivery and balance management.',
1735 - ],
1736 - 'pdf_invoice' => [
1737 - 'icon' => 'note',
1738 - 'desc' => 'Auto-generated PDF invoices and packing slips for orders.',
1739 - ],
1740 - 'extended_cross_sell' => [
1741 - 'icon' => 'grid',
1742 - 'desc' => 'Extended cross-sell recommendations across cart and checkout.',
1743 - ],
1744 - 'abandoned_cart_recovery' => [
1745 - 'icon' => 'cart',
1746 - 'desc' => 'Automated email nudges, discount triggers, and recovery analytics.',
1747 - ],
1748 - 'popup_builder' => [
1749 - 'icon' => 'popup',
1750 - 'desc' => 'Create promotional popups with triggers, targeting, and templates.',
1751 - ],
1752 - 'save_for_buy_later' => [
1753 - 'icon' => 'heart',
1754 - 'desc' => 'Save cart items for later purchase with one-click restore.',
1755 - ],
1756 - 'catalog_mode' => [
1757 - 'icon' => 'list',
1758 - 'desc' => 'Hide prices and add-to-cart buttons for catalog-only browsing.',
1759 - ],
1760 - 'back_in_stock_notifier' => [
1761 - 'icon' => 'notification',
1762 - 'desc' => 'Email notifications when out-of-stock products become available.',
1763 - ],
1764 - 'mega_menu' => [
1765 - 'icon' => 'grid',
1766 - 'desc' => 'Multi-column mega menus with widgets, images, and icons.',
1767 - ],
1768 - ];
1769 - }
1770 - /**
1771 - * Get All Menu
1772 - */
1773 - public function get_all_menu() {
1774 - $manus = [
1775 - 'none' => esc_html__( 'None', 'shopbuilder' ),
1776 - ];
1777 - $nav_menus = wp_get_nav_menus();
1778 - if ( empty( $nav_menus ) ) {
1779 - return $manus;
1780 - }
1781 - foreach ( $nav_menus as $menu ) {
1782 - $manus[ $menu->slug ] = $menu->name;
1783 - }
1784 - return $manus;
1785 - }
1786 - /**
1787 - * Sticky add-to-cart module options.
1788 - *
1789 - * @return array
1790 - */
1791 - public function shopify_checkout_options() {
1792 - $notice = [];
1793 - if ( defined( 'RTSBPRO_VERSION' ) && version_compare( RTSBPRO_VERSION, '1.8.0', '<' ) ) {
1794 - $notice = Fns::pro_version_notice( '1.8.0', 'general', 'ShopBuilder Pro', false );
1795 - }
1796 - $fields = $notice + [
1797 - 'general_settings' => [
1798 - 'id' => 'general_settings',
1799 - 'type' => 'title',
1800 - 'label' => esc_html__( 'Settings', 'shopbuilder' ),
1801 - 'tab' => 'general',
1802 - ],
1803 - 'shopify_page_logo' => [
1804 - 'id' => 'shopify_page_logo',
1805 - 'type' => 'fileupload',
1806 - 'label' => esc_html__( 'Upload Checkout Page Logo', 'shopbuilder' ),
1807 - 'help' => esc_html__( 'Please upload your custom logo to display on the checkout page.', 'shopbuilder' ),
1808 - 'tab' => 'general',
1809 - ],
1810 - 'shopify_logo_height' => [
1811 - 'id' => 'shopify_logo_height',
1812 - 'label' => esc_html__( 'Logo Height (px)', 'shopbuilder' ),
1813 - 'help' => esc_html__( 'Specify the height of the checkout page logo in px.', 'shopbuilder' ),
1814 - 'type' => 'slider',
1815 - 'min' => 10,
1816 - 'max' => 200,
1817 - 'unit' => 'px',
1818 - 'value' => 40,
1819 - 'tab' => 'general',
1820 - ],
1821 - 'cart_icon_source' => [
1822 - 'id' => 'cart_icon_source',
1823 - 'label' => esc_html__( 'Cart Icon', 'shopbuilder' ),
1824 - 'help' => sprintf(
1825 - // translators: %s for pro message.
1826 - __( 'Choose a cart icon to display in your checkout\'s header. <br />%s', 'shopbuilder' ),
1827 - ! rtsb()->has_pro()
1828 - ? sprintf(
1829 - '<a target="_blank" href="' . esc_url( rtsb()->pro_version_link() ) . '">%s </a> %s ',
1830 - esc_html__( 'Upgrade to PRO', 'shopbuilder' ),
1831 - esc_html__( 'to unlock custom image icon.', 'shopbuilder' )
1832 - )
1833 - : ''
1834 - ),
1835 - 'type' => 'select',
1836 - 'value' => 'none',
1837 - 'isPro' => ! rtsb()->has_pro(),
1838 - 'options' => [
1839 - 'none' => esc_html__( 'None', 'shopbuilder' ),
1840 - 'select_icon' => esc_html__( 'Select Icon', 'shopbuilder' ),
1841 - 'upload_icon' => esc_html__( 'Upload Icon', 'shopbuilder' ),
1842 - ],
1843 - 'tab' => 'general',
1844 - ],
1845 - 'cart_icon' => [
1846 - 'id' => 'cart_icon',
1847 - 'label' => esc_html__( 'Select Cart Icon', 'shopbuilder' ),
1848 - 'help' => esc_html__( 'Please choose the icon.', 'shopbuilder' ),
1849 - 'type' => 'icon_select',
1850 - 'searchable' => true,
1851 - 'options' => Fns::get_icons(),
1852 - 'value' => 'cart-2',
1853 - 'tab' => 'general',
1854 - 'dependency' => [
1855 - 'rules' => [
1856 - [
1857 - 'item' => 'modules.shopify_checkout.cart_icon_source',
1858 - 'value' => 'select_icon',
1859 - 'operator' => '==',
1860 - ],
1861 - ],
1862 - ],
1863 - ],
1864 -
1865 - 'cart_image_icon' => [
1866 - 'id' => 'cart_image_icon',
1867 - 'type' => 'fileupload',
1868 - 'label' => esc_html__( 'Upload Custom Icon', 'shopbuilder' ),
1869 - 'help' => esc_html__( 'Please upload your custom image icon.', 'shopbuilder' ),
1870 - 'tab' => 'general',
1871 - 'dependency' => [
1872 - 'rules' => [
1873 - [
1874 - 'item' => 'modules.shopify_checkout.cart_icon_source',
1875 - 'value' => 'upload_icon',
1876 - 'operator' => '==',
1877 - ],
1878 - ],
1879 - ],
1880 - ],
1881 -
1882 - 'email_field_title' => [
1883 - 'id' => 'email_field_title',
1884 - 'type' => 'text',
1885 - 'label' => esc_html__( 'Email Field Section Title', 'shopbuilder' ),
1886 - 'help' => esc_html__( 'Enter the custom title to be displayed above the email field section.', 'shopbuilder' ),
1887 - 'value' => esc_html__( 'Contact', 'shopbuilder' ),
1888 - 'tab' => 'general',
1889 - ],
1890 -
1891 - 'billing_address_field_title' => [
1892 - 'id' => 'billing_address_field_title',
1893 - 'type' => 'text',
1894 - 'label' => esc_html__( 'Billing Fields Section Title', 'shopbuilder' ),
1895 - 'help' => esc_html__( 'Enter the custom title to be displayed above the billing fields section', 'shopbuilder' ),
1896 - 'value' => esc_html__( 'Billing address', 'shopbuilder' ),
1897 - 'tab' => 'general',
1898 - ],
1899 -
1900 - 'enable_multi_step' => [
1901 - 'id' => 'enable_multi_step',
1902 - 'type' => 'switch',
1903 - 'isPro' => ! rtsb()->has_pro(),
1904 - 'label' => esc_html__( 'Multi-Step Checkout', 'shopbuilder' ),
1905 - 'help' => esc_html__( 'Enable multi-step checkout to simplify the purchasing process.', 'shopbuilder' ),
1906 - 'tab' => 'multi-step',
1907 - ],
1908 - 'step_menu_settings' => [
1909 - 'id' => 'step_menu_settings',
1910 - 'type' => 'title',
1911 - 'label' => esc_html__( 'Step Settings ', 'shopbuilder' ),
1912 - 'tab' => 'multi-step',
1913 - 'dependency' => [
1914 - 'rules' => [
1915 - [
1916 - 'item' => 'modules.shopify_checkout.enable_multi_step',
1917 - 'value' => 'on',
1918 - 'operator' => '==',
1919 - ],
1920 - ],
1921 - ],
1922 - ],
1923 -
1924 - 'show_step_menu' => [
1925 - 'id' => 'show_step_menu',
1926 - 'type' => 'switch',
1927 - 'isPro' => ! rtsb()->has_pro(),
1928 - 'label' => esc_html__( 'Show Step Menu', 'shopbuilder' ),
1929 - 'help' => esc_html__( 'Enable to display the step navigation menu during checkout.', 'shopbuilder' ),
1930 - 'tab' => 'multi-step',
1931 - 'value' => 'on',
1932 - 'dependency' => [
1933 - 'rules' => [
1934 - [
1935 - 'item' => 'modules.shopify_checkout.enable_multi_step',
1936 - 'value' => 'on',
1937 - 'operator' => '==',
1938 - ],
1939 - ],
1940 - ],
1941 - ],
1942 - 'show_cart_menu' => [
1943 - 'id' => 'show_cart_menu',
1944 - 'type' => 'switch',
1945 - 'isPro' => ! rtsb()->has_pro(),
1946 - 'label' => esc_html__( 'Show Cart Menu', 'shopbuilder' ),
1947 - 'help' => esc_html__( 'Enable this option to display the cart item in the step menu.', 'shopbuilder' ),
1948 - 'tab' => 'multi-step',
1949 - 'dependency' => [
1950 - 'rules' => [
1951 - [
1952 - 'item' => 'modules.shopify_checkout.enable_multi_step',
1953 - 'value' => 'on',
1954 - 'operator' => '==',
1955 - ],
1956 - [
1957 - 'item' => 'modules.shopify_checkout.show_step_menu',
1958 - 'value' => 'on',
1959 - 'operator' => '==',
1960 - ],
1961 - ],
1962 - ],
1963 - ],
1964 - 'cart_text' => [
1965 - 'id' => 'cart_text',
1966 - 'type' => 'text',
1967 - 'isPro' => ! rtsb()->has_pro(),
1968 - 'label' => esc_html__( 'Cart Step Title', 'shopbuilder' ),
1969 - 'help' => esc_html__( 'Enter the cart step menu title.', 'shopbuilder' ),
1970 - 'value' => esc_html__( 'Cart', 'shopbuilder' ),
1971 - 'tab' => 'multi-step',
1972 - 'dependency' => [
1973 - 'rules' => [
1974 - [
1975 - 'item' => 'modules.shopify_checkout.show_step_menu',
1976 - 'value' => 'on',
1977 - 'operator' => '==',
1978 - ],
1979 - [
1980 - 'item' => 'modules.shopify_checkout.show_cart_menu',
1981 - 'value' => 'on',
1982 - 'operator' => '==',
1983 - ],
1984 - ],
1985 - ],
1986 - ],
1987 -
1988 - 'billing_text' => [
1989 - 'id' => 'billing_text',
1990 - 'type' => 'text',
1991 - 'isPro' => ! rtsb()->has_pro(),
1992 - 'label' => esc_html__( 'Billing Step Title', 'shopbuilder' ),
1993 - 'help' => esc_html__( 'Enter the billing step menu title.', 'shopbuilder' ),
1994 - 'value' => esc_html__( 'Billing', 'shopbuilder' ),
1995 - 'tab' => 'multi-step',
1996 - 'dependency' => [
1997 - 'rules' => [
1998 - [
1999 - 'item' => 'modules.shopify_checkout.enable_multi_step',
2000 - 'value' => 'on',
2001 - 'operator' => '==',
2002 - ],
2003 - [
2004 - 'item' => 'modules.shopify_checkout.show_step_menu',
2005 - 'value' => 'on',
2006 - 'operator' => '==',
2007 - ],
2008 - ],
2009 - ],
2010 - ],
2011 -
2012 - 'shipping_text' => [
2013 - 'id' => 'shipping_text',
2014 - 'type' => 'text',
2015 - 'isPro' => ! rtsb()->has_pro(),
2016 - 'label' => esc_html__( 'Shipping Step Title', 'shopbuilder' ),
2017 - 'help' => esc_html__( 'Enter the shipping step menu title.', 'shopbuilder' ),
2018 - 'value' => esc_html__( 'Shipping', 'shopbuilder' ),
2019 - 'tab' => 'multi-step',
2020 - 'dependency' => [
2021 - 'rules' => [
2022 - [
2023 - 'item' => 'modules.shopify_checkout.enable_multi_step',
2024 - 'value' => 'on',
2025 - 'operator' => '==',
2026 - ],
2027 - [
2028 - 'item' => 'modules.shopify_checkout.show_step_menu',
2029 - 'value' => 'on',
2030 - 'operator' => '==',
2031 - ],
2032 - ],
2033 - ],
2034 - ],
2035 -
2036 - 'shipping_method_text' => [
2037 - 'id' => 'shipping_method_text',
2038 - 'type' => 'text',
2039 - 'isPro' => ! rtsb()->has_pro(),
2040 - 'label' => esc_html__( 'Shipping Method Step Title', 'shopbuilder' ),
2041 - 'help' => esc_html__( 'Enter the shipping method step menu title.', 'shopbuilder' ),
2042 - 'value' => esc_html__( 'Shipping Method ', 'shopbuilder' ),
2043 - 'tab' => 'multi-step',
2044 - 'dependency' => [
2045 - 'rules' => [
2046 - [
2047 - 'item' => 'modules.shopify_checkout.enable_multi_step',
2048 - 'value' => 'on',
2049 - 'operator' => '==',
2050 - ],
2051 - [
2052 - 'item' => 'modules.shopify_checkout.show_step_menu',
2053 - 'value' => 'on',
2054 - 'operator' => '==',
2055 - ],
2056 - ],
2057 - ],
2058 - ],
2059 -
2060 - 'payment_text' => [
2061 - 'id' => 'payment_text',
2062 - 'type' => 'text',
2063 - 'isPro' => ! rtsb()->has_pro(),
2064 - 'label' => esc_html__( 'Payment Method Step Title', 'shopbuilder' ),
2065 - 'help' => esc_html__( 'Enter the payment method step menu title.', 'shopbuilder' ),
2066 - 'value' => esc_html__( 'Payment', 'shopbuilder' ),
2067 - 'tab' => 'multi-step',
2068 - 'dependency' => [
2069 - 'rules' => [
2070 - [
2071 - 'item' => 'modules.shopify_checkout.enable_multi_step',
2072 - 'value' => 'on',
2073 - 'operator' => '==',
2074 - ],
2075 - [
2076 - 'item' => 'modules.shopify_checkout.show_step_menu',
2077 - 'value' => 'on',
2078 - 'operator' => '==',
2079 - ],
2080 - ],
2081 - ],
2082 - ],
2083 -
2084 - 'next_button_settings' => [
2085 - 'id' => 'next_button_settings',
2086 - 'type' => 'title',
2087 - 'label' => esc_html__( 'Button Settings', 'shopbuilder' ),
2088 - 'tab' => 'multi-step',
2089 - 'dependency' => [
2090 - 'rules' => [
2091 - [
2092 - 'item' => 'modules.shopify_checkout.enable_multi_step',
2093 - 'value' => 'on',
2094 - 'operator' => '==',
2095 - ],
2096 - ],
2097 - ],
2098 - ],
2099 -
2100 - 'shop_continue_btn' => [
2101 - 'id' => 'shop_continue_btn',
2102 - 'type' => 'switch',
2103 - 'isPro' => ! rtsb()->has_pro(),
2104 - 'label' => esc_html__( 'Show Next Button', 'shopbuilder' ),
2105 - 'help' => esc_html__( 'Enable this option to display the \'Next\' button.', 'shopbuilder' ),
2106 - 'tab' => 'multi-step',
2107 - 'value' => 'on',
2108 - 'dependency' => [
2109 - 'rules' => [
2110 - [
2111 - 'item' => 'modules.shopify_checkout.enable_multi_step',
2112 - 'value' => 'on',
2113 - 'operator' => '==',
2114 - ],
2115 - ],
2116 - ],
2117 - ],
2118 - 'continue_btn_text_for_shipping' => [
2119 - 'id' => 'continue_btn_text_for_shipping',
2120 - 'type' => 'text',
2121 - 'isPro' => ! rtsb()->has_pro(),
2122 - 'label' => esc_html__( 'Next Button Label for Shipping', 'shopbuilder' ),
2123 - 'value' => esc_html__( 'Next', 'shopbuilder' ),
2124 - 'tab' => 'multi-step',
2125 - 'dependency' => [
2126 - 'rules' => [
2127 - [
2128 - 'item' => 'modules.shopify_checkout.enable_multi_step',
2129 - 'value' => 'on',
2130 - 'operator' => '==',
2131 - ],
2132 - [
2133 - 'item' => 'modules.shopify_checkout.shop_continue_btn',
2134 - 'value' => 'on',
2135 - 'operator' => '==',
2136 - ],
2137 - ],
2138 - ],
2139 - ],
2140 - 'continue_btn_text_for_shipping_method' => [
2141 - 'id' => 'continue_btn_text_for_shipping_method',
2142 - 'type' => 'text',
2143 - 'isPro' => ! rtsb()->has_pro(),
2144 - 'label' => esc_html__( 'Next Button Label for Shipping Method', 'shopbuilder' ),
2145 - 'value' => esc_html__( 'Next', 'shopbuilder' ),
2146 - 'tab' => 'multi-step',
2147 - 'dependency' => [
2148 - 'rules' => [
2149 - [
2150 - 'item' => 'modules.shopify_checkout.enable_multi_step',
2151 - 'value' => 'on',
2152 - 'operator' => '==',
2153 - ],
2154 - [
2155 - 'item' => 'modules.shopify_checkout.shop_continue_btn',
2156 - 'value' => 'on',
2157 - 'operator' => '==',
2158 - ],
2159 - ],
2160 - ],
2161 - ],
2162 - 'continue_btn_text_for_payment' => [
2163 - 'id' => 'continue_btn_text_for_payment',
2164 - 'type' => 'text',
2165 - 'label' => esc_html__( 'Next Button Label for Payment', 'shopbuilder' ),
2166 - 'value' => esc_html__( 'Next', 'shopbuilder' ),
2167 - 'tab' => 'multi-step',
2168 - 'dependency' => [
2169 - 'rules' => [
2170 - [
2171 - 'item' => 'modules.shopify_checkout.enable_multi_step',
2172 - 'value' => 'on',
2173 - 'operator' => '==',
2174 - ],
2175 - [
2176 - 'item' => 'modules.shopify_checkout.shop_continue_btn',
2177 - 'value' => 'on',
2178 - 'operator' => '==',
2179 - ],
2180 - ],
2181 - ],
2182 - ],
2183 - 'shop_return_btn' => [
2184 - 'id' => 'shop_return_btn',
2185 - 'type' => 'switch',
2186 - 'isPro' => ! rtsb()->has_pro(),
2187 - 'label' => esc_html__( 'Show Back Button', 'shopbuilder' ),
2188 - 'help' => esc_html__( 'Enable this option to display the \'Back\' button.', 'shopbuilder' ),
2189 - 'tab' => 'multi-step',
2190 - 'value' => 'on',
2191 - 'dependency' => [
2192 - 'rules' => [
2193 - [
2194 - 'item' => 'modules.shopify_checkout.enable_multi_step',
2195 - 'value' => 'on',
2196 - 'operator' => '==',
2197 - ],
2198 - ],
2199 - ],
2200 - ],
2201 - 'return_btn_text_for_billing' => [
2202 - 'id' => 'return_btn_text_for_billing',
2203 - 'type' => 'text',
2204 - 'isPro' => ! rtsb()->has_pro(),
2205 - 'label' => esc_html__( 'Back Button Label for Billing', 'shopbuilder' ),
2206 - 'value' => esc_html__( 'Prev', 'shopbuilder' ),
2207 - 'tab' => 'multi-step',
2208 - 'dependency' => [
2209 - 'rules' => [
2210 - [
2211 - 'item' => 'modules.shopify_checkout.enable_multi_step',
2212 - 'value' => 'on',
2213 - 'operator' => '==',
2214 - ],
2215 - [
2216 - 'item' => 'modules.shopify_checkout.shop_return_btn',
2217 - 'value' => 'on',
2218 - 'operator' => '==',
2219 - ],
2220 - ],
2221 - ],
2222 - ],
2223 -
2224 - 'return_btn_text_for_shipping' => [
2225 - 'id' => 'return_btn_text_for_shipping',
2226 - 'type' => 'text',
2227 - 'isPro' => ! rtsb()->has_pro(),
2228 - 'label' => esc_html__( 'Back Button Label for Shipping', 'shopbuilder' ),
2229 - 'value' => esc_html__( 'Prev', 'shopbuilder' ),
2230 - 'tab' => 'multi-step',
2231 - 'dependency' => [
2232 - 'rules' => [
2233 - [
2234 - 'item' => 'modules.shopify_checkout.enable_multi_step',
2235 - 'value' => 'on',
2236 - 'operator' => '==',
2237 - ],
2238 - [
2239 - 'item' => 'modules.shopify_checkout.shop_return_btn',
2240 - 'value' => 'on',
2241 - 'operator' => '==',
2242 - ],
2243 - ],
2244 - ],
2245 - ],
2246 -
2247 - 'return_btn_text_for_shipping_method' => [
2248 - 'id' => 'return_btn_text_for_shipping_method',
2249 - 'type' => 'text',
2250 - 'isPro' => ! rtsb()->has_pro(),
2251 - 'label' => esc_html__( 'Back Button Label for Shipping Method', 'shopbuilder' ),
2252 - 'value' => esc_html__( 'Prev', 'shopbuilder' ),
2253 - 'tab' => 'multi-step',
2254 - 'dependency' => [
2255 - 'rules' => [
2256 - [
2257 - 'item' => 'modules.shopify_checkout.enable_multi_step',
2258 - 'value' => 'on',
2259 - 'operator' => '==',
2260 - ],
2261 - [
2262 - 'item' => 'modules.shopify_checkout.shop_return_btn',
2263 - 'value' => 'on',
2264 - 'operator' => '==',
2265 - ],
2266 - ],
2267 - ],
2268 - ],
2269 -
2270 - 'order_review_settings' => [
2271 - 'id' => 'order_review_settings',
2272 - 'type' => 'title',
2273 - 'label' => esc_html__( 'Order Reviews', 'shopbuilder' ),
2274 - 'tab' => 'general',
2275 - ],
2276 - 'order_review_item_link' => [
2277 - 'id' => 'order_review_item_link',
2278 - 'type' => 'switch',
2279 - 'label' => esc_html__( 'Link Product Titles', 'shopbuilder' ),
2280 - 'help' => esc_html__( 'Enable to make product titles clickable, linking to their product pages.', 'shopbuilder' ),
2281 - 'value' => '',
2282 - 'tab' => 'general',
2283 - ],
2284 - 'extra_content' => [
2285 - 'id' => 'extra_content',
2286 - 'label' => esc_html__( 'Display Additional Data', 'shopbuilder' ),
2287 - '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' ),
2288 - 'type' => 'text_editor',
2289 - 'isPro' => ! rtsb()->has_pro(),
2290 - 'sanitize_fn' => 'pass_all',
2291 - 'tab' => 'general',
2292 - ],
2293 -
2294 - 'footer_settings' => [
2295 - 'id' => 'footer_settings',
2296 - 'type' => 'title',
2297 - 'label' => esc_html__( 'Footer', 'shopbuilder' ),
2298 - 'tab' => 'general',
2299 - ],
2300 -
2301 - 'footer_menu' => [
2302 - 'id' => 'footer_menu',
2303 - 'label' => esc_html__( 'Footer Menu', 'shopbuilder' ),
2304 - 'help' => esc_html__( 'Select a menu to display in the footer section of your checkout page.', 'shopbuilder' ),
2305 - 'type' => 'select',
2306 - 'value' => 'none',
2307 - 'options' => $this->get_all_menu(),
2308 - 'tab' => 'general',
2309 - ],
2310 -
2311 - 'footer_text' => [
2312 - 'id' => 'footer_text',
2313 - 'type' => 'text',
2314 - 'label' => esc_html__( 'Footer Text', 'shopbuilder' ),
2315 - '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' ),
2316 - 'value' => esc_html__( 'Copyright @{year} | All rights reserved', 'shopbuilder' ),
2317 - 'tab' => 'general',
2318 - ],
2319 -
2320 - // Place Order.
2321 - 'login_button_styles_settings' => [
2322 - 'id' => 'login_button_styles_settings',
2323 - 'type' => 'title',
2324 - 'tab' => 'btn-styles',
2325 - 'label' => esc_html__( 'Login Button Style', 'shopbuilder' ),
2326 - ],
2327 - 'login_button_height' => [
2328 - 'id' => 'login_button_height',
2329 - 'label' => esc_html__( 'Height (px)', 'shopbuilder' ),
2330 - 'type' => 'slider',
2331 - 'min' => 10,
2332 - 'max' => 100,
2333 - 'unit' => 'px',
2334 - 'value' => 50,
2335 - 'tab' => 'btn-styles',
2336 - ],
2337 - 'login_button_width' => [
2338 - 'id' => 'login_button_width',
2339 - 'label' => esc_html__( 'Width (px)', 'shopbuilder' ),
2340 - 'type' => 'slider',
2341 - 'min' => 10,
2342 - 'max' => 1000,
2343 - 'unit' => 'px',
2344 - 'tab' => 'btn-styles',
2345 - ],
2346 - 'login_button_font_size' => [
2347 - 'id' => 'login_button_font_size',
2348 - 'label' => esc_html__( 'Font Size (px)', 'shopbuilder' ),
2349 - 'type' => 'slider',
2350 - 'min' => 10,
2351 - 'max' => 50,
2352 - 'unit' => 'px',
2353 - 'value' => 15,
2354 - 'tab' => 'btn-styles',
2355 - ],
2356 - 'login_button_bg_color' => [
2357 - 'id' => 'login_button_bg_color',
2358 - 'label' => esc_html__( 'Background Color', 'shopbuilder' ),
2359 - 'tab' => 'btn-styles',
2360 - 'type' => 'color',
2361 - ],
2362 - 'login_button_hover_bg_color' => [
2363 - 'id' => 'login_button_hover_bg_color',
2364 - 'label' => esc_html__( 'Hover Background Color', 'shopbuilder' ),
2365 - 'tab' => 'btn-styles',
2366 - 'type' => 'color',
2367 - ],
2368 - 'login_button_color' => [
2369 - 'id' => 'login_button_color',
2370 - 'label' => esc_html__( 'Color', 'shopbuilder' ),
2371 - 'tab' => 'btn-styles',
2372 - 'type' => 'color',
2373 - ],
2374 - 'login_button_hover_color' => [
2375 - 'id' => 'login_button_hover_color',
2376 - 'label' => esc_html__( 'Hover Color', 'shopbuilder' ),
2377 - 'tab' => 'btn-styles',
2378 - 'type' => 'color',
2379 - ],
2380 - 'login_button_border_color' => [
2381 - 'id' => 'login_button_border_color',
2382 - 'label' => esc_html__( 'Border Color', 'shopbuilder' ),
2383 - 'tab' => 'btn-styles',
2384 - 'type' => 'color',
2385 - ],
2386 - 'login_button_hover_border_color' => [
2387 - 'id' => 'login_button_hover_border_color',
2388 - 'label' => esc_html__( 'Hover Border Color', 'shopbuilder' ),
2389 - 'tab' => 'btn-styles',
2390 - 'type' => 'color',
2391 - ],
2392 -
2393 - // Place Order.
2394 - 'place_order_button_styles_settings' => [
2395 - 'id' => 'place_order_button_styles_settings',
2396 - 'type' => 'title',
2397 - 'tab' => 'btn-styles',
2398 - 'label' => esc_html__( 'Place Order Button Style', 'shopbuilder' ),
2399 - ],
2400 - 'place_order_button_height' => [
2401 - 'id' => 'place_order_button_height',
2402 - 'label' => esc_html__( 'Height (px)', 'shopbuilder' ),
2403 - 'type' => 'slider',
2404 - 'min' => 10,
2405 - 'max' => 100,
2406 - 'unit' => 'px',
2407 - 'value' => 50,
2408 - 'tab' => 'btn-styles',
2409 - ],
2410 - 'place_order_button_width' => [
2411 - 'id' => 'place_order_button_width',
2412 - 'label' => esc_html__( 'Width (px)', 'shopbuilder' ),
2413 - 'type' => 'slider',
2414 - 'min' => 10,
2415 - 'max' => 1000,
2416 - 'unit' => 'px',
2417 - 'tab' => 'btn-styles',
2418 - ],
2419 - 'place_order_button_font_size' => [
2420 - 'id' => 'place_order_button_font_size',
2421 - 'label' => esc_html__( 'Font Size (px)', 'shopbuilder' ),
2422 - 'type' => 'slider',
2423 - 'min' => 10,
2424 - 'max' => 50,
2425 - 'unit' => 'px',
2426 - 'value' => 15,
2427 - 'tab' => 'btn-styles',
2428 - ],
2429 - 'place_order_button_bg_color' => [
2430 - 'id' => 'place_order_button_bg_color',
2431 - 'label' => esc_html__( 'Background Color', 'shopbuilder' ),
2432 - 'tab' => 'btn-styles',
2433 - 'type' => 'color',
2434 - ],
2435 - 'place_order_button_hover_bg_color' => [
2436 - 'id' => 'place_order_button_hover_bg_color',
2437 - 'label' => esc_html__( 'Hover Background Color', 'shopbuilder' ),
2438 - 'tab' => 'btn-styles',
2439 - 'type' => 'color',
2440 - ],
2441 - 'place_order_button_color' => [
2442 - 'id' => 'place_order_button_color',
2443 - 'label' => esc_html__( 'Color', 'shopbuilder' ),
2444 - 'tab' => 'btn-styles',
2445 - 'type' => 'color',
2446 - ],
2447 - 'place_order_button_hover_color' => [
2448 - 'id' => 'place_order_button_hover_color',
2449 - 'label' => esc_html__( 'Hover Color', 'shopbuilder' ),
2450 - 'tab' => 'btn-styles',
2451 - 'type' => 'color',
2452 - ],
2453 - 'place_order_button_border_color' => [
2454 - 'id' => 'place_order_button_border_color',
2455 - 'label' => esc_html__( 'Border Color', 'shopbuilder' ),
2456 - 'tab' => 'btn-styles',
2457 - 'type' => 'color',
2458 - ],
2459 - 'place_order_button_hover_border_color' => [
2460 - 'id' => 'place_order_button_hover_border_color',
2461 - 'label' => esc_html__( 'Hover Border Color', 'shopbuilder' ),
2462 - 'tab' => 'btn-styles',
2463 - 'type' => 'color',
2464 - ],
2465 -
2466 - // Next Button.
2467 - 'next_button_styles_settings' => [
2468 - 'id' => 'next_button_styles_settings',
2469 - 'type' => 'title',
2470 - 'tab' => 'btn-styles',
2471 - 'label' => esc_html__( 'Next Button Style', 'shopbuilder' ),
2472 - 'dependency' => [
2473 - 'rules' => [
2474 - [
2475 - 'item' => 'modules.shopify_checkout.enable_multi_step',
2476 - 'value' => 'on',
2477 - 'operator' => '==',
2478 - ],
2479 - [
2480 - 'item' => 'modules.shopify_checkout.shop_continue_btn',
2481 - 'value' => 'on',
2482 - 'operator' => '==',
2483 - ],
2484 - ],
2485 - ],
2486 - ],
2487 - 'next_button_height' => [
2488 - 'id' => 'next_button_height',
2489 - 'isPro' => ! rtsb()->has_pro(),
2490 - 'label' => esc_html__( 'Height (px)', 'shopbuilder' ),
2491 - 'type' => 'slider',
2492 - 'min' => 10,
2493 - 'max' => 100,
2494 - 'unit' => 'px',
2495 - 'value' => 50,
2496 - 'tab' => 'btn-styles',
2497 - 'dependency' => [
2498 - 'rules' => [
2499 - [
2500 - 'item' => 'modules.shopify_checkout.enable_multi_step',
2501 - 'value' => 'on',
2502 - 'operator' => '==',
2503 - ],
2504 - [
2505 - 'item' => 'modules.shopify_checkout.shop_continue_btn',
2506 - 'value' => 'on',
2507 - 'operator' => '==',
2508 - ],
2509 - ],
2510 - ],
2511 - ],
2512 - 'next_button_width' => [
2513 - 'id' => 'next_button_width',
2514 - 'label' => esc_html__( 'Width (px)', 'shopbuilder' ),
2515 - 'type' => 'slider',
2516 - 'min' => 10,
2517 - 'max' => 1000,
2518 - 'unit' => 'px',
2519 - 'tab' => 'btn-styles',
2520 - 'dependency' => [
2521 - 'rules' => [
2522 - [
2523 - 'item' => 'modules.shopify_checkout.enable_multi_step',
2524 - 'value' => 'on',
2525 - 'operator' => '==',
2526 - ],
2527 - [
2528 - 'item' => 'modules.shopify_checkout.shop_continue_btn',
2529 - 'value' => 'on',
2530 - 'operator' => '==',
2531 - ],
2532 - ],
2533 - ],
2534 - ],
2535 - 'next_button_font_size' => [
2536 - 'id' => 'next_button_font_size',
2537 - 'isPro' => ! rtsb()->has_pro(),
2538 - 'label' => esc_html__( 'Font Size (px)', 'shopbuilder' ),
2539 - 'type' => 'slider',
2540 - 'min' => 10,
2541 - 'max' => 50,
2542 - 'unit' => 'px',
2543 - 'value' => 15,
2544 - 'tab' => 'btn-styles',
2545 - 'dependency' => [
2546 - 'rules' => [
2547 - [
2548 - 'item' => 'modules.shopify_checkout.enable_multi_step',
2549 - 'value' => 'on',
2550 - 'operator' => '==',
2551 - ],
2552 - [
2553 - 'item' => 'modules.shopify_checkout.shop_continue_btn',
2554 - 'value' => 'on',
2555 - 'operator' => '==',
2556 - ],
2557 - ],
2558 - ],
2559 - ],
2560 - 'next_button_bg_color' => [
2561 - 'id' => 'next_button_bg_color',
2562 - 'isPro' => ! rtsb()->has_pro(),
2563 - 'label' => esc_html__( 'Background Color', 'shopbuilder' ),
2564 - 'tab' => 'btn-styles',
2565 - 'type' => 'color',
2566 - 'dependency' => [
2567 - 'rules' => [
2568 - [
2569 - 'item' => 'modules.shopify_checkout.enable_multi_step',
2570 - 'value' => 'on',
2571 - 'operator' => '==',
2572 - ],
2573 - [
2574 - 'item' => 'modules.shopify_checkout.shop_continue_btn',
2575 - 'value' => 'on',
2576 - 'operator' => '==',
2577 - ],
2578 - ],
2579 - ],
2580 - ],
2581 - 'next_button_hover_bg_color' => [
2582 - 'id' => 'next_button_hover_bg_color',
2583 - 'isPro' => ! rtsb()->has_pro(),
2584 - 'label' => esc_html__( 'Hover Background Color', 'shopbuilder' ),
2585 - 'tab' => 'btn-styles',
2586 - 'type' => 'color',
2587 - 'dependency' => [
2588 - 'rules' => [
2589 - [
2590 - 'item' => 'modules.shopify_checkout.enable_multi_step',
2591 - 'value' => 'on',
2592 - 'operator' => '==',
2593 - ],
2594 - [
2595 - 'item' => 'modules.shopify_checkout.shop_continue_btn',
2596 - 'value' => 'on',
2597 - 'operator' => '==',
2598 - ],
2599 - ],
2600 - ],
2601 - ],
2602 - 'next_button_color' => [
2603 - 'id' => 'next_button_color',
2604 - 'isPro' => ! rtsb()->has_pro(),
2605 - 'label' => esc_html__( 'Color', 'shopbuilder' ),
2606 - 'tab' => 'btn-styles',
2607 - 'type' => 'color',
2608 - 'dependency' => [
2609 - 'rules' => [
2610 - [
2611 - 'item' => 'modules.shopify_checkout.enable_multi_step',
2612 - 'value' => 'on',
2613 - 'operator' => '==',
2614 - ],
2615 - [
2616 - 'item' => 'modules.shopify_checkout.shop_continue_btn',
2617 - 'value' => 'on',
2618 - 'operator' => '==',
2619 - ],
2620 - ],
2621 - ],
2622 - ],
2623 - 'next_button_hover_color' => [
2624 - 'id' => 'next_button_hover_color',
2625 - 'isPro' => ! rtsb()->has_pro(),
2626 - 'label' => esc_html__( 'Hover Color', 'shopbuilder' ),
2627 - 'tab' => 'btn-styles',
2628 - 'type' => 'color',
2629 - 'dependency' => [
2630 - 'rules' => [
2631 - [
2632 - 'item' => 'modules.shopify_checkout.enable_multi_step',
2633 - 'value' => 'on',
2634 - 'operator' => '==',
2635 - ],
2636 - [
2637 - 'item' => 'modules.shopify_checkout.shop_continue_btn',
2638 - 'value' => 'on',
2639 - 'operator' => '==',
2640 - ],
2641 - ],
2642 - ],
2643 - ],
2644 - 'next_button_border_color' => [
2645 - 'id' => 'next_button_border_color',
2646 - 'isPro' => ! rtsb()->has_pro(),
2647 - 'label' => esc_html__( 'Border Color', 'shopbuilder' ),
2648 - 'tab' => 'btn-styles',
2649 - 'type' => 'color',
2650 - 'dependency' => [
2651 - 'rules' => [
2652 - [
2653 - 'item' => 'modules.shopify_checkout.enable_multi_step',
2654 - 'value' => 'on',
2655 - 'operator' => '==',
2656 - ],
2657 - [
2658 - 'item' => 'modules.shopify_checkout.shop_continue_btn',
2659 - 'value' => 'on',
2660 - 'operator' => '==',
2661 - ],
2662 - ],
2663 - ],
2664 - ],
2665 - 'next_button_hover_border_color' => [
2666 - 'id' => 'next_button_hover_border_color',
2667 - 'isPro' => ! rtsb()->has_pro(),
2668 - 'label' => esc_html__( 'Hover Border Color', 'shopbuilder' ),
2669 - 'tab' => 'btn-styles',
2670 - 'type' => 'color',
2671 - 'dependency' => [
2672 - 'rules' => [
2673 - [
2674 - 'item' => 'modules.shopify_checkout.enable_multi_step',
2675 - 'value' => 'on',
2676 - 'operator' => '==',
2677 - ],
2678 - [
2679 - 'item' => 'modules.shopify_checkout.shop_continue_btn',
2680 - 'value' => 'on',
2681 - 'operator' => '==',
2682 - ],
2683 - ],
2684 - ],
2685 - ],
2686 - 'prev_button_styles_settings' => [
2687 - 'id' => 'prev_button_styles_settings',
2688 - 'type' => 'title',
2689 - 'tab' => 'btn-styles',
2690 - 'label' => esc_html__( 'Prev Button Style', 'shopbuilder' ),
2691 - 'dependency' => [
2692 - 'rules' => [
2693 - [
2694 - 'item' => 'modules.shopify_checkout.enable_multi_step',
2695 - 'value' => 'on',
2696 - 'operator' => '==',
2697 - ],
2698 - [
2699 - 'item' => 'modules.shopify_checkout.shop_return_btn',
2700 - 'value' => 'on',
2701 - 'operator' => '==',
2702 - ],
2703 - ],
2704 - ],
2705 -
2706 - ],
2707 - 'prev_button_height' => [
2708 - 'id' => 'prev_button_height',
2709 - 'isPro' => ! rtsb()->has_pro(),
2710 - 'label' => esc_html__( 'Height (px)', 'shopbuilder' ),
2711 - 'type' => 'slider',
2712 - 'min' => 10,
2713 - 'max' => 100,
2714 - 'unit' => 'px',
2715 - 'value' => 50,
2716 - 'tab' => 'btn-styles',
2717 - 'dependency' => [
2718 - 'rules' => [
2719 - [
2720 - 'item' => 'modules.shopify_checkout.enable_multi_step',
2721 - 'value' => 'on',
2722 - 'operator' => '==',
2723 - ],
2724 - [
2725 - 'item' => 'modules.shopify_checkout.shop_return_btn',
2726 - 'value' => 'on',
2727 - 'operator' => '==',
2728 - ],
2729 - ],
2730 - ],
2731 - ],
2732 - 'prev_button_width' => [
2733 - 'id' => 'prev_button_width',
2734 - 'label' => esc_html__( 'Width (px)', 'shopbuilder' ),
2735 - 'type' => 'slider',
2736 - 'min' => 10,
2737 - 'max' => 1000,
2738 - 'unit' => 'px',
2739 - 'tab' => 'btn-styles',
2740 - 'dependency' => [
2741 - 'rules' => [
2742 - [
2743 - 'item' => 'modules.shopify_checkout.enable_multi_step',
2744 - 'value' => 'on',
2745 - 'operator' => '==',
2746 - ],
2747 - [
2748 - 'item' => 'modules.shopify_checkout.shop_return_btn',
2749 - 'value' => 'on',
2750 - 'operator' => '==',
2751 - ],
2752 - ],
2753 - ],
2754 - ],
2755 - 'prev_button_font_size' => [
2756 - 'id' => 'prev_button_font_size',
2757 - 'isPro' => ! rtsb()->has_pro(),
2758 - 'label' => esc_html__( 'Font Size (px)', 'shopbuilder' ),
2759 - 'type' => 'slider',
2760 - 'min' => 10,
2761 - 'max' => 50,
2762 - 'unit' => 'px',
2763 - 'value' => 15,
2764 - 'tab' => 'btn-styles',
2765 - 'dependency' => [
2766 - 'rules' => [
2767 - [
2768 - 'item' => 'modules.shopify_checkout.enable_multi_step',
2769 - 'value' => 'on',
2770 - 'operator' => '==',
2771 - ],
2772 - [
2773 - 'item' => 'modules.shopify_checkout.shop_return_btn',
2774 - 'value' => 'on',
2775 - 'operator' => '==',
2776 - ],
2777 - ],
2778 - ],
2779 - ],
2780 - 'prev_button_bg_color' => [
2781 - 'id' => 'prev_button_bg_color',
2782 - 'isPro' => ! rtsb()->has_pro(),
2783 - 'label' => esc_html__( 'Background Color', 'shopbuilder' ),
2784 - 'tab' => 'btn-styles',
2785 - 'type' => 'color',
2786 - 'dependency' => [
2787 - 'rules' => [
2788 - [
2789 - 'item' => 'modules.shopify_checkout.enable_multi_step',
2790 - 'value' => 'on',
2791 - 'operator' => '==',
2792 - ],
2793 - [
2794 - 'item' => 'modules.shopify_checkout.shop_return_btn',
2795 - 'value' => 'on',
2796 - 'operator' => '==',
2797 - ],
2798 - ],
2799 - ],
2800 - ],
2801 - 'prev_button_hover_bg_color' => [
2802 - 'id' => 'prev_button_hover_bg_color',
2803 - 'label' => esc_html__( 'Hover Background Color', 'shopbuilder' ),
2804 - 'isPro' => ! rtsb()->has_pro(),
2805 - 'tab' => 'btn-styles',
2806 - 'type' => 'color',
2807 - 'dependency' => [
2808 - 'rules' => [
2809 - [
2810 - 'item' => 'modules.shopify_checkout.enable_multi_step',
2811 - 'value' => 'on',
2812 - 'operator' => '==',
2813 - ],
2814 - [
2815 - 'item' => 'modules.shopify_checkout.shop_return_btn',
2816 - 'value' => 'on',
2817 - 'operator' => '==',
2818 - ],
2819 - ],
2820 - ],
2821 - ],
2822 - 'prev_button_color' => [
2823 - 'id' => 'prev_button_color',
2824 - 'label' => esc_html__( 'Color', 'shopbuilder' ),
2825 - 'isPro' => ! rtsb()->has_pro(),
2826 - 'tab' => 'btn-styles',
2827 - 'type' => 'color',
2828 - 'dependency' => [
2829 - 'rules' => [
2830 - [
2831 - 'item' => 'modules.shopify_checkout.enable_multi_step',
2832 - 'value' => 'on',
2833 - 'operator' => '==',
2834 - ],
2835 - [
2836 - 'item' => 'modules.shopify_checkout.shop_return_btn',
2837 - 'value' => 'on',
2838 - 'operator' => '==',
2839 - ],
2840 - ],
2841 - ],
2842 - ],
2843 - 'prev_button_hover_color' => [
2844 - 'id' => 'prev_button_hover_color',
2845 - 'label' => esc_html__( 'Hover Color', 'shopbuilder' ),
2846 - 'isPro' => ! rtsb()->has_pro(),
2847 - 'tab' => 'btn-styles',
2848 - 'type' => 'color',
2849 - 'dependency' => [
2850 - 'rules' => [
2851 - [
2852 - 'item' => 'modules.shopify_checkout.enable_multi_step',
2853 - 'value' => 'on',
2854 - 'operator' => '==',
2855 - ],
2856 - [
2857 - 'item' => 'modules.shopify_checkout.shop_return_btn',
2858 - 'value' => 'on',
2859 - 'operator' => '==',
2860 - ],
2861 - ],
2862 - ],
2863 - ],
2864 - 'prev_button_border_color' => [
2865 - 'id' => 'prev_button_border_color',
2866 - 'label' => esc_html__( 'Border Color', 'shopbuilder' ),
2867 - 'isPro' => ! rtsb()->has_pro(),
2868 - 'tab' => 'btn-styles',
2869 - 'type' => 'color',
2870 - 'dependency' => [
2871 - 'rules' => [
2872 - [
2873 - 'item' => 'modules.shopify_checkout.enable_multi_step',
2874 - 'value' => 'on',
2875 - 'operator' => '==',
2876 - ],
2877 - [
2878 - 'item' => 'modules.shopify_checkout.shop_return_btn',
2879 - 'value' => 'on',
2880 - 'operator' => '==',
2881 - ],
2882 - ],
2883 - ],
2884 - ],
2885 - 'prev_button_hover_border_color' => [
2886 - 'id' => 'prev_button_hover_border_color',
2887 - 'label' => esc_html__( 'Hover Border Color', 'shopbuilder' ),
2888 - 'isPro' => ! rtsb()->has_pro(),
2889 - 'tab' => 'btn-styles',
2890 - 'type' => 'color',
2891 - 'dependency' => [
2892 - 'rules' => [
2893 - [
2894 - 'item' => 'modules.shopify_checkout.enable_multi_step',
2895 - 'value' => 'on',
2896 - 'operator' => '==',
2897 - ],
2898 - [
2899 - 'item' => 'modules.shopify_checkout.shop_return_btn',
2900 - 'value' => 'on',
2901 - 'operator' => '==',
2902 - ],
2903 - ],
2904 - ],
2905 - ],
2906 - 'coupon_button_styles_settings' => [
2907 - 'id' => 'coupon_button_styles_settings',
2908 - 'type' => 'title',
2909 - 'tab' => 'btn-styles',
2910 - 'label' => esc_html__( 'Apply Coupon Button Style', 'shopbuilder' ),
2911 - ],
2912 - 'coupon_height' => [
2913 - 'id' => 'coupon_height',
2914 - 'label' => esc_html__( 'Coupon Field And Button Height (px)', 'shopbuilder' ),
2915 - 'type' => 'slider',
2916 - 'min' => 10,
2917 - 'max' => 100,
2918 - 'unit' => 'px',
2919 - 'value' => 50,
2920 - 'tab' => 'btn-styles',
2921 - ],
2922 - 'coupon_button_font_size' => [
2923 - 'id' => 'coupon_button_font_size',
2924 - 'label' => esc_html__( 'Font Size (px)', 'shopbuilder' ),
2925 - 'type' => 'slider',
2926 - 'min' => 10,
2927 - 'max' => 50,
2928 - 'unit' => 'px',
2929 - 'value' => 15,
2930 - 'tab' => 'btn-styles',
2931 - ],
2932 - 'coupon_button_bg_color' => [
2933 - 'id' => 'coupon_button_bg_color',
2934 - 'label' => esc_html__( 'Background Color', 'shopbuilder' ),
2935 - 'tab' => 'btn-styles',
2936 - 'type' => 'color',
2937 - ],
2938 - 'coupon_button_hover_bg_color' => [
2939 - 'id' => 'coupon_button_hover_bg_color',
2940 - 'label' => esc_html__( 'Hover Background Color', 'shopbuilder' ),
2941 - 'tab' => 'btn-styles',
2942 - 'type' => 'color',
2943 - ],
2944 - 'coupon_button_color' => [
2945 - 'id' => 'coupon_button_color',
2946 - 'label' => esc_html__( 'Color', 'shopbuilder' ),
2947 - 'tab' => 'btn-styles',
2948 - 'type' => 'color',
2949 - ],
2950 - 'coupon_button_hover_color' => [
2951 - 'id' => 'coupon_button_hover_color',
2952 - 'label' => esc_html__( 'Hover Color', 'shopbuilder' ),
2953 - 'tab' => 'btn-styles',
2954 - 'type' => 'color',
2955 - ],
2956 - 'coupon_button_border_color' => [
2957 - 'id' => 'coupon_button_border_color',
2958 - 'label' => esc_html__( 'Border Color', 'shopbuilder' ),
2959 - 'tab' => 'btn-styles',
2960 - 'type' => 'color',
2961 - ],
2962 - 'coupon_button_hover_border_color' => [
2963 - 'id' => 'coupon_button_hover_border_color',
2964 - 'label' => esc_html__( 'Hover Border Color', 'shopbuilder' ),
2965 - 'tab' => 'btn-styles',
2966 - 'type' => 'color',
2967 - ],
2968 -
2969 - 'header_cart_icon_styles' => [
2970 - 'id' => 'header_cart_icon_styles',
2971 - 'type' => 'title',
2972 - 'tab' => 'styles',
2973 - 'label' => esc_html__( 'Header Cart Icon Style', 'shopbuilder' ),
2974 - 'dependency' => [
2975 - 'rules' => [
2976 - [
2977 - 'item' => 'modules.shopify_checkout.cart_icon_source',
2978 - 'value' => 'none',
2979 - 'operator' => '!=',
2980 - ],
2981 - ],
2982 - ],
2983 - ],
2984 -
2985 - 'shopify_cart_icon_height' => [
2986 - 'id' => 'shopify_cart_icon_height',
2987 - 'label' => esc_html__( 'Cart Icon Height (px)', 'shopbuilder' ),
2988 - 'type' => 'slider',
2989 - 'min' => 10,
2990 - 'max' => 200,
2991 - 'unit' => 'px',
2992 - 'value' => 40,
2993 - 'tab' => 'styles',
2994 - 'dependency' => [
2995 - 'rules' => [
2996 - [
2997 - 'item' => 'modules.shopify_checkout.cart_icon_source',
2998 - 'value' => 'upload_icon',
2999 - 'operator' => '==',
3000 - ],
3001 - ],
3002 - ],
3003 - ],
3004 -
3005 - 'header_cart_icon_color' => [
3006 - 'id' => 'step_menu_color',
3007 - 'label' => esc_html__( 'Color', 'shopbuilder' ),
3008 - 'tab' => 'styles',
3009 - 'type' => 'color',
3010 - 'dependency' => [
3011 - 'rules' => [
3012 - [
3013 - 'item' => 'modules.shopify_checkout.cart_icon_source',
3014 - 'value' => 'select_icon',
3015 - 'operator' => '==',
3016 - ],
3017 - ],
3018 - ],
3019 - ],
3020 - 'header_cart_icon_hover_color' => [
3021 - 'id' => 'header_cart_icon_hover_color',
3022 - 'label' => esc_html__( 'Hover Color', 'shopbuilder' ),
3023 - 'tab' => 'styles',
3024 - 'type' => 'color',
3025 - 'dependency' => [
3026 - 'rules' => [
3027 - [
3028 - 'item' => 'modules.shopify_checkout.cart_icon_source',
3029 - 'value' => 'select_icon',
3030 - 'operator' => '==',
3031 - ],
3032 - ],
3033 - ],
3034 - ],
3035 - 'header_cart_icon_font_size' => [
3036 - 'id' => 'header_cart_icon_font_size',
3037 - 'label' => esc_html__( 'Font Size (px)', 'shopbuilder' ),
3038 - 'type' => 'slider',
3039 - 'min' => 10,
3040 - 'max' => 50,
3041 - 'unit' => 'px',
3042 - 'value' => 15,
3043 - 'tab' => 'styles',
3044 - 'dependency' => [
3045 - 'rules' => [
3046 - [
3047 - 'item' => 'modules.shopify_checkout.cart_icon_source',
3048 - 'value' => 'select_icon',
3049 - 'operator' => '==',
3050 - ],
3051 - ],
3052 - ],
3053 - ],
3054 - 'cart_button_styles_settings' => [
3055 - 'id' => 'cart_button_styles_settings',
3056 - 'type' => 'title',
3057 - 'tab' => 'styles',
3058 - 'label' => esc_html__( 'Cart Button Style', 'shopbuilder' ),
3059 - 'dependency' => [
3060 - 'rules' => [
3061 - [
3062 - 'item' => 'modules.shopify_checkout.cart_icon_source',
3063 - 'value' => 'select_icon',
3064 - 'operator' => '==',
3065 - ],
3066 - ],
3067 - ],
3068 - ],
3069 - 'cart_button_height' => [
3070 - 'id' => 'cart_button_height',
3071 - 'label' => esc_html__( 'Button Height (px)', 'shopbuilder' ),
3072 - 'type' => 'slider',
3073 - 'min' => 10,
3074 - 'max' => 200,
3075 - 'unit' => 'px',
3076 - 'tab' => 'styles',
3077 - 'dependency' => [
3078 - 'rules' => [
3079 - [
3080 - 'item' => 'modules.shopify_checkout.cart_icon_source',
3081 - 'value' => 'select_icon',
3082 - 'operator' => '==',
3083 - ],
3084 - ],
3085 - ],
3086 - ],
3087 - 'cart_button_width' => [
3088 - 'id' => 'cart_button_width',
3089 - 'label' => esc_html__( 'Button Width (px)', 'shopbuilder' ),
3090 - 'type' => 'slider',
3091 - 'min' => 10,
3092 - 'max' => 200,
3093 - 'unit' => 'px',
3094 - 'tab' => 'styles',
3095 - 'dependency' => [
3096 - 'rules' => [
3097 - [
3098 - 'item' => 'modules.shopify_checkout.cart_icon_source',
3099 - 'value' => 'select_icon',
3100 - 'operator' => '==',
3101 - ],
3102 - ],
3103 - ],
3104 - ],
3105 - 'cart_button_padding' => [
3106 - 'id' => 'cart_button_padding',
3107 - 'label' => esc_html__( 'Padding (px)', 'shopbuilder' ),
3108 - 'type' => 'slider',
3109 - 'min' => 0,
3110 - 'max' => 50,
3111 - 'unit' => 'px',
3112 - 'tab' => 'styles',
3113 - 'dependency' => [
3114 - 'rules' => [
3115 - [
3116 - 'item' => 'modules.shopify_checkout.cart_icon_source',
3117 - 'value' => 'select_icon',
3118 - 'operator' => '==',
3119 - ],
3120 - ],
3121 - ],
3122 - ],
3123 - 'cart_button_border_style' => [
3124 - 'id' => 'cart_button_border_style',
3125 - 'label' => esc_html__( 'Border Style', 'shopbuilder' ),
3126 - 'type' => 'select',
3127 - 'options' => [
3128 - 'none' => esc_html__( 'None', 'shopbuilder' ),
3129 - 'solid' => esc_html__( 'Solid', 'shopbuilder' ),
3130 - 'dashed' => esc_html__( 'Dashed', 'shopbuilder' ),
3131 - 'dotted' => esc_html__( 'Dotted', 'shopbuilder' ),
3132 - ],
3133 - 'tab' => 'styles',
3134 - 'dependency' => [
3135 - 'rules' => [
3136 - [
3137 - 'item' => 'modules.shopify_checkout.cart_icon_source',
3138 - 'value' => 'select_icon',
3139 - 'operator' => '==',
3140 - ],
3141 - ],
3142 - ],
3143 - ],
3144 - 'cart_button_border_width' => [
3145 - 'id' => 'cart_button_border_width',
3146 - 'label' => esc_html__( 'Border Width (px)', 'shopbuilder' ),
3147 - 'type' => 'slider',
3148 - 'min' => 0,
3149 - 'max' => 10,
3150 - 'unit' => 'px',
3151 - 'tab' => 'styles',
3152 - 'dependency' => [
3153 - 'rules' => [
3154 - [
3155 - 'item' => 'modules.shopify_checkout.cart_icon_source',
3156 - 'value' => 'select_icon',
3157 - 'operator' => '==',
3158 - ],
3159 - ],
3160 - ],
3161 - ],
3162 - 'cart_button_border_color' => [
3163 - 'id' => 'cart_button_border_color',
3164 - 'label' => esc_html__( 'Border Color', 'shopbuilder' ),
3165 - 'tab' => 'styles',
3166 - 'type' => 'color',
3167 - 'dependency' => [
3168 - 'rules' => [
3169 - [
3170 - 'item' => 'modules.shopify_checkout.cart_icon_source',
3171 - 'value' => 'select_icon',
3172 - 'operator' => '==',
3173 - ],
3174 - ],
3175 - ],
3176 - ],
3177 - 'cart_button_border_radius' => [
3178 - 'id' => 'cart_button_border_radius',
3179 - 'label' => esc_html__( 'Border Radius (px)', 'shopbuilder' ),
3180 - 'type' => 'slider',
3181 - 'min' => 0,
3182 - 'max' => 100,
3183 - 'unit' => 'px',
3184 - 'tab' => 'styles',
3185 - 'dependency' => [
3186 - 'rules' => [
3187 - [
3188 - 'item' => 'modules.shopify_checkout.cart_icon_source',
3189 - 'value' => 'select_icon',
3190 - 'operator' => '==',
3191 - ],
3192 - ],
3193 - ],
3194 - ],
3195 - 'cart_button_bg_color' => [
3196 - 'id' => 'cart_button_bg_color',
3197 - 'label' => esc_html__( 'Background Color', 'shopbuilder' ),
3198 - 'tab' => 'styles',
3199 - 'type' => 'color',
3200 - 'dependency' => [
3201 - 'rules' => [
3202 - [
3203 - 'item' => 'modules.shopify_checkout.cart_icon_source',
3204 - 'value' => 'select_icon',
3205 - 'operator' => '==',
3206 - ],
3207 - ],
3208 - ],
3209 - ],
3210 - 'cart_button_hover_bg_color' => [
3211 - 'id' => 'cart_button_hover_bg_color',
3212 - 'label' => esc_html__( 'Hover Background Color', 'shopbuilder' ),
3213 - 'tab' => 'styles',
3214 - 'type' => 'color',
3215 - 'dependency' => [
3216 - 'rules' => [
3217 - [
3218 - 'item' => 'modules.shopify_checkout.cart_icon_source',
3219 - 'value' => 'select_icon',
3220 - 'operator' => '==',
3221 - ],
3222 - ],
3223 - ],
3224 - ],
3225 - 'footer_menu_styles_settings' => [
3226 - 'id' => 'footer_menu_styles_settings',
3227 - 'type' => 'title',
3228 - 'tab' => 'styles',
3229 - 'label' => esc_html__( 'Footer Style', 'shopbuilder' ),
3230 - ],
3231 - 'footer_menu_color' => [
3232 - 'id' => 'footer_menu_color',
3233 - 'label' => esc_html__( 'Menu Color', 'shopbuilder' ),
3234 - 'tab' => 'styles',
3235 - 'type' => 'color',
3236 - ],
3237 - 'footer_menu_hover_color' => [
3238 - 'id' => 'footer_menu_hover_color',
3239 - 'label' => esc_html__( 'Menu Hover Color', 'shopbuilder' ),
3240 - 'tab' => 'styles',
3241 - 'type' => 'color',
3242 - ],
3243 - 'footer_menu_font_size' => [
3244 - 'id' => 'footer_menu_font_size',
3245 - 'label' => esc_html__( 'Menu Font Size (px)', 'shopbuilder' ),
3246 - 'type' => 'slider',
3247 - 'min' => 10,
3248 - 'max' => 50,
3249 - 'unit' => 'px',
3250 - 'value' => 15,
3251 - 'tab' => 'styles',
3252 - ],
3253 - 'footer_text_size' => [
3254 - 'id' => 'footer_text_size',
3255 - 'label' => esc_html__( 'Footer Text Font Size (px)', 'shopbuilder' ),
3256 - 'type' => 'slider',
3257 - 'min' => 10,
3258 - 'max' => 50,
3259 - 'unit' => 'px',
3260 - 'value' => 15,
3261 - 'tab' => 'styles',
3262 - ],
3263 - 'footer_text_color' => [
3264 - 'id' => 'footer_text_color',
3265 - 'label' => esc_html__( 'Footer Text Color', 'shopbuilder' ),
3266 - 'tab' => 'styles',
3267 - 'type' => 'color',
3268 - ],
3269 - 'step_menu_styles_settings' => [
3270 - 'id' => 'step_menu_styles_settings',
3271 - 'type' => 'title',
3272 - 'tab' => 'styles',
3273 - 'label' => esc_html__( 'Step Menu Style', 'shopbuilder' ),
3274 - 'dependency' => [
3275 - 'rules' => [
3276 - [
3277 - 'item' => 'modules.shopify_checkout.enable_multi_step',
3278 - 'value' => 'on',
3279 - 'operator' => '==',
3280 - ],
3281 - [
3282 - 'item' => 'modules.shopify_checkout.show_step_menu',
3283 - 'value' => 'on',
3284 - 'operator' => '==',
3285 - ],
3286 - ],
3287 - ],
3288 - ],
3289 - 'step_menu_color' => [
3290 - 'id' => 'step_menu_color',
3291 - 'label' => esc_html__( 'Color', 'shopbuilder' ),
3292 - 'isPro' => ! rtsb()->has_pro(),
3293 - 'tab' => 'styles',
3294 - 'type' => 'color',
3295 - 'dependency' => [
3296 - 'rules' => [
3297 - [
3298 - 'item' => 'modules.shopify_checkout.enable_multi_step',
3299 - 'value' => 'on',
3300 - 'operator' => '==',
3301 - ],
3302 - [
3303 - 'item' => 'modules.shopify_checkout.show_step_menu',
3304 - 'value' => 'on',
3305 - 'operator' => '==',
3306 - ],
3307 - ],
3308 - ],
3309 - ],
3310 - 'step_menu_hover_color' => [
3311 - 'id' => 'step_menu_hover_color',
3312 - 'label' => esc_html__( 'Hover Color', 'shopbuilder' ),
3313 - 'isPro' => ! rtsb()->has_pro(),
3314 - 'tab' => 'styles',
3315 - 'type' => 'color',
3316 - 'dependency' => [
3317 - 'rules' => [
3318 - [
3319 - 'item' => 'modules.shopify_checkout.enable_multi_step',
3320 - 'value' => 'on',
3321 - 'operator' => '==',
3322 - ],
3323 - [
3324 - 'item' => 'modules.shopify_checkout.show_step_menu',
3325 - 'value' => 'on',
3326 - 'operator' => '==',
3327 - ],
3328 - ],
3329 - ],
3330 - ],
3331 - 'step_menu_font_size' => [
3332 - 'id' => 'step_menu_font_size',
3333 - 'label' => esc_html__( 'Font Size (px)', 'shopbuilder' ),
3334 - 'isPro' => ! rtsb()->has_pro(),
3335 - 'type' => 'slider',
3336 - 'min' => 10,
3337 - 'max' => 50,
3338 - 'unit' => 'px',
3339 - 'value' => 15,
3340 - 'tab' => 'styles',
3341 - 'dependency' => [
3342 - 'rules' => [
3343 - [
3344 - 'item' => 'modules.shopify_checkout.enable_multi_step',
3345 - 'value' => 'on',
3346 - 'operator' => '==',
3347 - ],
3348 - [
3349 - 'item' => 'modules.shopify_checkout.show_step_menu',
3350 - 'value' => 'on',
3351 - 'operator' => '==',
3352 - ],
3353 - ],
3354 - ],
3355 - ],
3356 - ];
3357 - return $fields;
3358 - }
3359 - /**
3360 - * @return array
3361 - */
3362 - public function product_badges_fields() {
3363 - return apply_filters(
3364 - 'rtsb/module/product_badges/fields',
3365 - [
3366 - 'hide_woocommerce_badge' => [
3367 - 'id' => 'hide_woocommerce_badge',
3368 - 'value' => '',
3369 - 'type' => 'switch',
3370 - 'label' => esc_html__( 'Hide Theme Badges', 'shopbuilder' ),
3371 - 'help' => esc_html__( 'Switch on to hide theme default badges.', 'shopbuilder' ),
3372 - 'tab' => 'general',
3373 - ],
3374 - // Hide "On sale".
3375 - 'hide_on_sale' => [
3376 - 'id' => 'hide_on_sale',
3377 - 'type' => 'select',
3378 - 'value' => 'all_products',
3379 - 'isPro' => ! rtsb()->has_pro(),
3380 - 'label' => esc_html__( 'Applicable Products', 'shopbuilder' ),
3381 - 'options' => [
3382 - 'all_products' => esc_html__( 'All products', 'shopbuilder' ),
3383 - 'where_custom_badge_applied' => esc_html__( 'Only for products which have custom badge enabled', 'shopbuilder' ),
3384 - ],
3385 - 'help' => esc_html__( 'Choose where to hide the default badges.', 'shopbuilder' ),
3386 - 'tab' => 'general',
3387 - 'dependency' => [
3388 - 'rules' => [
3389 - [
3390 - 'item' => 'modules.product_badges.hide_woocommerce_badge',
3391 - 'value' => 'on',
3392 - 'operator' => '==',
3393 - ],
3394 - ],
3395 - ],
3396 - ],
3397 -
3398 - 'group_badge_display_as' => [
3399 - 'id' => 'group_badge_display_as',
3400 - 'type' => 'select',
3401 - 'value' => 'horizontal',
3402 - 'isPro' => ! rtsb()->has_pro(),
3403 - 'label' => esc_html__( 'Group Badge Display Type', 'shopbuilder' ),
3404 - 'help' => sprintf(
3405 - // translators: %s for pro message.
3406 - esc_html__( 'Please choose the group display type. %s', 'shopbuilder' ),
3407 - ! rtsb()->has_pro()
3408 - ? sprintf(
3409 - '<a target="_blank" href="' . esc_url( rtsb()->pro_version_link() ) . '">%s </a> %s ',
3410 - esc_html__( 'Upgrade to PRO', 'shopbuilder' ),
3411 - esc_html__( 'for vertical layout.', 'shopbuilder' )
3412 - )
3413 - : ''
3414 - ),
3415 - 'options' => [
3416 - 'horizontal' => esc_html__( 'Horizontal', 'shopbuilder' ),
3417 - 'vertical' => esc_html__( 'Vertical', 'shopbuilder' ),
3418 - ],
3419 - 'tab' => 'group',
3420 - ],
3421 - 'group_badge_gap' => [
3422 - 'id' => 'group_badge_gap',
3423 - 'type' => 'text',
3424 - 'value' => '10px',
3425 - 'label' => esc_html__( 'Group Badge Gap/Spacing', 'shopbuilder' ),
3426 - 'help' => esc_html__( 'Example: 10px', 'shopbuilder' ),
3427 - 'tab' => 'group',
3428 - ],
3429 - 'general_options' => [
3430 - 'id' => 'general_options',
3431 - 'type' => 'title',
3432 - 'label' => esc_html__( 'Shop Page Settings', 'shopbuilder' ),
3433 - 'tab' => 'group',
3434 - ],
3435 - 'loop_group_position' => [
3436 - 'id' => 'loop_group_position',
3437 - 'type' => 'select',
3438 - 'value' => 'above_image',
3439 - 'isPro' => ! rtsb()->has_pro(),
3440 - 'label' => esc_html__( 'Shop Page Group Position', 'shopbuilder' ),
3441 - 'help' => esc_html__( 'Choose the group badges position in Shop page.', 'shopbuilder' ),
3442 - 'options' => [
3443 - 'above_image' => esc_html__( 'Floating Above Image', 'shopbuilder' ),
3444 - 'before_product_title' => esc_html__( 'Before Product Title', 'shopbuilder' ),
3445 - 'after_product_title' => esc_html__( 'After Product Title', 'shopbuilder' ),
3446 - 'before_add_to_cart' => esc_html__( 'Above Add To Cart', 'shopbuilder' ),
3447 - 'after_add_to_cart' => esc_html__( 'Below Add To Cart', 'shopbuilder' ),
3448 - 'custom' => esc_html__( 'Custom Position', 'shopbuilder' ),
3449 - ],
3450 - 'tab' => 'group',
3451 - ],
3452 - 'loop_custom_hook_name' => [
3453 - 'id' => 'loop_custom_hook_name',
3454 - 'type' => 'text',
3455 - 'label' => esc_html__( 'Enter Hook Name', 'shopbuilder' ),
3456 - 'tab' => 'group',
3457 - 'help' => sprintf(
3458 - /* translators: 1: The shortcode.*/
3459 - __( 'Or Copy the php code <br />%1$s<br /> and paste it in your product query where you want to show the button.', 'shopbuilder' ),
3460 - "<code>&lt;?php do_action( 'rtsb/modules/product_badges/frontend/display' ); ?&gt;</code> OR Use shortcode <code>&lt;?php echo do_shortcode( '[rtsb_badges]' ); ?&gt;</code>"
3461 - ),
3462 - 'dependency' => [
3463 - 'rules' => [
3464 - [
3465 - 'item' => 'modules.product_badges.loop_group_position',
3466 - 'value' => 'custom',
3467 - 'operator' => '==',
3468 - ],
3469 - ],
3470 - ],
3471 - ],
3472 - 'group_position_hook_priority' => [
3473 - 'id' => 'group_position_hook_priority',
3474 - 'type' => 'number',
3475 - 'size' => 'small',
3476 - 'min' => 0,
3477 - 'max' => 999,
3478 - 'label' => esc_html__( 'Badge Position Priority', 'shopbuilder' ),
3479 - 'help' => esc_html__( 'It\'s depend on your theme functionality. Example: 20', 'shopbuilder' ),
3480 - 'tab' => 'group',
3481 - 'dependency' => [
3482 - 'rules' => [
3483 - [
3484 - 'item' => 'modules.product_badges.loop_group_position',
3485 - 'value' => 'custom',
3486 - 'operator' => '==',
3487 - ],
3488 - ],
3489 - ],
3490 - ],
3491 - 'group_badge_position' => [
3492 - 'id' => 'group_badge_position',
3493 - 'label' => esc_html__( 'Position Above Image', 'shopbuilder' ),
3494 - 'type' => 'text_select',
3495 - 'value' => 'top-left',
3496 - 'options' => [
3497 - 'top-left' => esc_html__( 'Top Left', 'shopbuilder' ),
3498 - 'top-right' => esc_html__( 'Top Right', 'shopbuilder' ),
3499 - 'bottom-left' => esc_html__( 'Bottom Left', 'shopbuilder' ),
3500 - 'bottom-right' => esc_html__( 'Bottom Right', 'shopbuilder' ),
3501 - ],
3502 - 'dependency' => [
3503 - 'rules' => [
3504 - [
3505 - 'item' => 'modules.product_badges.loop_group_position',
3506 - 'value' => 'above_image',
3507 - 'operator' => '==',
3508 - ],
3509 - ],
3510 - ],
3511 - 'tab' => 'group',
3512 - ],
3513 - 'product_options' => [
3514 - 'id' => 'product_options',
3515 - 'type' => 'title',
3516 - 'label' => esc_html__( 'Product Page Settings', 'shopbuilder' ),
3517 - 'tab' => 'group',
3518 - ],
3519 - 'product_page_group_position' => [
3520 - 'id' => 'product_page_group_position',
3521 - 'type' => 'select',
3522 - 'value' => 'above_image',
3523 - 'isPro' => ! rtsb()->has_pro(),
3524 - 'label' => esc_html__( 'Product Page Group Position', 'shopbuilder' ),
3525 - 'help' => esc_html__( 'Choose the group badges position in product page.', 'shopbuilder' ),
3526 - 'options' => [
3527 - 'above_image' => esc_html__( 'Floating Above Image', 'shopbuilder' ),
3528 - 'before_add_to_cart' => esc_html__( 'Above Add To Cart', 'shopbuilder' ),
3529 - 'after_add_to_cart' => esc_html__( 'Below Add To Cart', 'shopbuilder' ),
3530 - 'after_summary' => esc_html__( 'After Summary', 'shopbuilder' ),
3531 - 'after_short_desc' => esc_html__( 'After Short Description', 'shopbuilder' ),
3532 - 'shortcode' => esc_html__( 'Use Shortcode', 'shopbuilder' ),
3533 - 'custom' => esc_html__( 'Custom Position', 'shopbuilder' ),
3534 - ],
3535 - 'tab' => 'group',
3536 - ],
3537 - 'product_page_badges_shortcode' => [
3538 - 'type' => 'raw',
3539 - 'label' => ' ',
3540 - 'html' => sprintf(
3541 - /* translators: 1: The shortcode.*/
3542 - 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' ),
3543 - '<code>[rtsb_badges]</code>'
3544 - ),
3545 - 'dependency' => [
3546 - 'rules' => [
3547 - [
3548 - 'item' => 'modules.product_badges.product_page_group_position',
3549 - 'value' => 'shortcode',
3550 - 'operator' => '==',
3551 - ],
3552 - ],
3553 - ],
3554 - 'tab' => 'group',
3555 - ],
3556 - 'product_page_custom_hook_name' => [
3557 - 'id' => 'product_page_custom_hook_name',
3558 - 'type' => 'text',
3559 - 'label' => esc_html__( 'Enter Hook Name', 'shopbuilder' ),
3560 - 'tab' => 'group',
3561 - 'help' => sprintf(
3562 - /* translators: 1: The shortcode.*/
3563 - __( 'Or Copy the php code <br />%1$s<br /> and paste it in your product query where you want to show the button.', 'shopbuilder' ),
3564 - "<code>&lt;?php do_action( 'rtsb/modules/product_badges/frontend/display' ); ?&gt;</code>"
3565 - ),
3566 - 'dependency' => [
3567 - 'rules' => [
3568 - [
3569 - 'item' => 'modules.product_badges.product_page_group_position',
3570 - 'value' => 'custom',
3571 - 'operator' => '==',
3572 - ],
3573 - ],
3574 - ],
3575 - ],
3576 - 'product_page_group_hook_priority' => [
3577 - 'id' => 'product_page_group_hook_priority',
3578 - 'type' => 'number',
3579 - 'size' => 'small',
3580 - 'min' => 0,
3581 - 'max' => 999,
3582 - 'label' => esc_html__( 'Badge Position Priority', 'shopbuilder' ),
3583 - 'help' => esc_html__( 'It\'s depend on your theme functionality. Example: 20', 'shopbuilder' ),
3584 - 'tab' => 'group',
3585 - 'dependency' => [
3586 - 'rules' => [
3587 - [
3588 - 'item' => 'modules.product_badges.product_page_group_position',
3589 - 'value' => 'custom',
3590 - 'operator' => '==',
3591 - ],
3592 - ],
3593 - ],
3594 -
3595 - ],
3596 - 'product_page_group_badge_position' => [
3597 - 'id' => 'product_page_group_badge_position',
3598 - 'label' => esc_html__( 'Position Above Image', 'shopbuilder' ),
3599 - 'type' => 'text_select',
3600 - 'value' => 'top-left',
3601 - 'options' => [
3602 - 'top-left' => esc_html__( 'Top Left', 'shopbuilder' ),
3603 - 'top-right' => esc_html__( 'Top Right', 'shopbuilder' ),
3604 - 'bottom-left' => esc_html__( 'Bottom Left', 'shopbuilder' ),
3605 - 'bottom-right' => esc_html__( 'Bottom Right', 'shopbuilder' ),
3606 - ],
3607 - 'dependency' => [
3608 - 'rules' => [
3609 - [
3610 - 'item' => 'modules.product_badges.product_page_group_position',
3611 - 'value' => 'above_image',
3612 - 'operator' => '==',
3613 - ],
3614 - ],
3615 - ],
3616 - 'tab' => 'group',
3617 - ],
3618 -
3619 - 'badges_field_intro' => [
3620 - 'id' => 'badges_field_intro',
3621 - 'type' => 'description',
3622 - 'text' => esc_html__( 'To add new product badges, simply click on the \'Add New\' button below.', 'shopbuilder' ),
3623 - 'tab' => 'badges',
3624 - ],
3625 - 'badges_field' => [
3626 - 'id' => 'badges_field',
3627 - 'type' => 'repeaters',
3628 - 'label' => '',
3629 - 'tab' => 'badges',
3630 - 'repeat' => [
3631 - 'title' => [
3632 - 'id' => 'title',
3633 - 'label' => esc_html__( 'Badge Name', 'shopbuilder' ),
3634 - 'help' => esc_html__( 'Enter badge name.', 'shopbuilder' ),
3635 - 'type' => 'text',
3636 - 'placeholder' => esc_html__( 'Badge Name', 'shopbuilder' ),
3637 - 'value' => esc_html__( 'Badge Name', 'shopbuilder' ),
3638 - ],
3639 - 'badge_condition' => [
3640 - 'id' => 'badge_condition',
3641 - 'type' => 'select',
3642 - 'value' => 'dynamic',
3643 - 'isPro' => ! rtsb()->has_pro(),
3644 - 'label' => esc_html__( 'Badge Type', 'shopbuilder' ),
3645 - 'help' => sprintf(
3646 - // translators: %s for pro message.
3647 - esc_html__( 'Select badge type. %s', 'shopbuilder' ),
3648 - ! rtsb()->has_pro()
3649 - ? sprintf(
3650 - '<a target="_blank" href="' . esc_url( rtsb()->pro_version_link() ) . '">%s</a> %s',
3651 - esc_html__( 'Upgrade to PRO', 'shopbuilder' ),
3652 - esc_html__( 'unlock custom badge creation.', 'shopbuilder' )
3653 - )
3654 - : ''
3655 - ),
3656 - 'options' => [
3657 - 'dynamic' => esc_html__( 'Dynamic', 'shopbuilder' ),
3658 - 'custom' => esc_html__( 'Custom', 'shopbuilder' ),
3659 - ],
3660 - ],
3661 - 'badge_for' => [
3662 - 'id' => 'badge_for',
3663 - 'type' => 'select',
3664 - 'value' => 'on_sale',
3665 - 'label' => esc_html__( 'Dynamic Badge Condition', 'shopbuilder' ),
3666 - 'help' => esc_html__( 'Specify dynamic badge condition', 'shopbuilder' ),
3667 - 'options' => $this->dynamic_badge_list(),
3668 - 'dependency' => [
3669 - 'rules' => [
3670 - [
3671 - 'item' => 'modules.product_badges.badges_field.badge_condition',
3672 - 'value' => 'dynamic',
3673 - 'operator' => '==',
3674 - ],
3675 - ],
3676 - ],
3677 - ],
3678 - 'badge_for_pre_order' => [
3679 - 'type' => 'raw',
3680 - 'label' => ' ',
3681 - 'html' => esc_html__( 'Please ensure that Pre-Order module is activated and properly configured.', 'shopbuilder' ),
3682 - 'tab' => 'general',
3683 - 'dependency' => [
3684 - 'rules' => [
3685 - [
3686 - 'item' => 'modules.product_badges.badges_field.badge_condition',
3687 - 'value' => 'dynamic',
3688 - 'operator' => '==',
3689 - ],
3690 - [
3691 - 'item' => 'modules.product_badges.badges_field.badge_for',
3692 - 'value' => 'pre_order',
3693 - 'operator' => '==',
3694 - ],
3695 - ],
3696 - ],
3697 - ],
3698 - 'minimum_sale_count' => [
3699 - 'id' => 'minimum_sale_count',
3700 - 'type' => 'number',
3701 - 'label' => esc_html__( 'Minimum Sale Count', 'shopbuilder' ),
3702 - 'help' => esc_html__( 'Enter the number of Sale you want to designate for products to be labeled as \'Best Selling.\'', 'shopbuilder' ),
3703 - 'dependency' => [
3704 - 'rules' => [
3705 - [
3706 - 'item' => 'modules.product_badges.badges_field.badge_condition',
3707 - 'value' => 'dynamic',
3708 - 'operator' => '==',
3709 - ],
3710 - [
3711 - 'item' => 'modules.product_badges.badges_field.badge_for',
3712 - 'value' => 'best_selling',
3713 - 'operator' => '==',
3714 - ],
3715 - ],
3716 - ],
3717 - ],
3718 - 'new_arrival_days' => [
3719 - 'id' => 'new_arrival_days',
3720 - 'type' => 'number',
3721 - 'label' => esc_html__( 'Specify Number of Days', 'shopbuilder' ),
3722 - 'help' => esc_html__( 'Enter the number of days you want to designate for products to be labeled as \'New Arrivals.\'', 'shopbuilder' ),
3723 - 'dependency' => [
3724 - 'rules' => [
3725 - [
3726 - 'item' => 'modules.product_badges.badges_field.badge_for',
3727 - 'value' => 'new_arrival',
3728 - 'operator' => '==',
3729 - ],
3730 - ],
3731 - ],
3732 - ],
3733 - 'badges_type' => [
3734 - 'id' => 'badges_type',
3735 - 'type' => 'select',
3736 - 'value' => 'text',
3737 - 'isPro' => ! rtsb()->has_pro(),
3738 - 'label' => esc_html__( 'Show Badge As:', 'shopbuilder' ),
3739 - 'help' => sprintf(
3740 - // translators: %s for pro message.
3741 - esc_html__( 'Specify the badge display as Image Or Text. %s', 'shopbuilder' ),
3742 - ! rtsb()->has_pro()
3743 - ? sprintf(
3744 - '<a target="_blank" href="' . esc_url( rtsb()->pro_version_link() ) . '">%s</a> %s',
3745 - esc_html__( 'Upgrade to PRO', 'shopbuilder' ),
3746 - esc_html__( 'unlock Image badge creation.', 'shopbuilder' )
3747 - )
3748 - : ''
3749 - ),
3750 - 'options' => [
3751 - 'image' => esc_html__( 'Image', 'shopbuilder' ),
3752 - 'text' => esc_html__( 'Text', 'shopbuilder' ),
3753 - ],
3754 - ],
3755 -
3756 - 'badge_preset' => [
3757 - 'id' => 'badge_preset',
3758 - 'label' => esc_html__( 'Text Badge Preset', 'shopbuilder' ),
3759 - 'help' => esc_html__( 'Choose the badge appearance', 'shopbuilder' ),
3760 - 'type' => 'image_select',
3761 - 'value' => 'preset1',
3762 - 'options' => [
3763 - 'preset1' => [
3764 - 'label' => esc_html__( 'Preset 1', 'shopbuilder' ),
3765 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/badge-preset-1.png' ) ),
3766 - ],
3767 -
3768 - 'preset2' => [
3769 - 'label' => esc_html__( 'Preset 2', 'shopbuilder' ),
3770 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/badge-preset-2.png' ) ),
3771 - ],
3772 -
3773 - 'preset3' => [
3774 - 'label' => esc_html__( 'Preset 3', 'shopbuilder' ),
3775 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/badge-preset-3.png' ) ),
3776 - ],
3777 -
3778 - 'preset4' => [
3779 - 'title' => esc_html__( 'Preset 4', 'shopbuilder' ),
3780 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/badge-preset-4.png' ) ),
3781 - ],
3782 - ],
3783 - 'dependency' => [
3784 - 'rules' => [
3785 - [
3786 - 'item' => 'modules.product_badges.badges_field.badges_type',
3787 - 'value' => 'text',
3788 - 'operator' => '==',
3789 - ],
3790 - ],
3791 - ],
3792 - ],
3793 - 'badges_text' => [
3794 - 'id' => 'badges_text',
3795 - 'label' => esc_html__( 'Enter Badge Text', 'shopbuilder' ),
3796 - 'help' => esc_html__( 'The badge text will be displayed when the dynamic percentage switch is turned off.', 'shopbuilder' ),
3797 - 'type' => 'text',
3798 - 'placeholder' => 'Badge Text',
3799 - 'value' => esc_html__( 'New', 'shopbuilder' ),
3800 - 'dependency' => [
3801 - 'rules' => [
3802 - [
3803 - 'item' => 'modules.product_badges.badges_field.badges_type',
3804 - 'value' => 'text',
3805 - 'operator' => '==',
3806 - ],
3807 - ],
3808 - ],
3809 - ],
3810 - 'show_badges_percent_text' => [
3811 - 'id' => 'show_badges_percent_text',
3812 - 'type' => 'switch',
3813 - 'label' => esc_html__( 'Show Badges Percentage (%)', 'shopbuilder' ),
3814 - 'help' => esc_html__( 'Switch on to show badge as dynamic percentage instead of text.', 'shopbuilder' ),
3815 - 'dependency' => [
3816 - 'rules' => [
3817 - [
3818 - 'item' => 'modules.product_badges.badges_field.badge_for',
3819 - 'value' => 'on_sale',
3820 - 'operator' => '==',
3821 - ],
3822 - [
3823 - 'item' => 'modules.product_badges.badges_field.badges_type',
3824 - 'value' => 'text',
3825 - 'operator' => '==',
3826 - ],
3827 - [
3828 - 'item' => 'modules.product_badges.badges_field.badge_condition',
3829 - 'value' => 'dynamic',
3830 - 'operator' => '==',
3831 - ],
3832 -
3833 - ],
3834 - ],
3835 - ],
3836 -
3837 - 'upload_image' => [
3838 - 'id' => 'upload_image',
3839 - 'type' => 'fileupload',
3840 - 'label' => esc_html__( 'Upload Image', 'shopbuilder' ),
3841 - 'help' => esc_html__( 'Upload badge image.', 'shopbuilder' ),
3842 - 'tab' => 'general',
3843 - 'dependency' => [
3844 - 'rules' => [
3845 - [
3846 - 'item' => 'modules.product_badges.badges_field.badges_type',
3847 - 'value' => 'image',
3848 - 'operator' => '==',
3849 - ],
3850 - ],
3851 - ],
3852 - ],
3853 -
3854 - 'apply_for' => [
3855 - 'id' => 'apply_for',
3856 - 'type' => 'select',
3857 - 'value' => 'product',
3858 - 'isPro' => ! rtsb()->has_pro(),
3859 - 'label' => esc_html__( 'Applicable For', 'shopbuilder' ),
3860 - 'options' => [
3861 - 'product' => esc_html__( 'Products', 'shopbuilder' ),
3862 - 'product_cat' => esc_html__( 'Product Categories', 'shopbuilder' ),
3863 - ],
3864 - 'help' => esc_html__( 'Badges will apply for selected products, or categories.', 'shopbuilder' ),
3865 - ],
3866 - 'applicable_products' => [
3867 - 'id' => 'applicable_products',
3868 - 'type' => 'search_and_multi_select',
3869 - 'label' => esc_html__( 'Applicable Products', 'shopbuilder' ),
3870 - 'help' => esc_html__( 'Choose products to include. Leave blank to apply in all product.', 'shopbuilder' ),
3871 - 'placeholder' => esc_html__( 'Search Products', 'shopbuilder' ),
3872 - 'func_with_param' => [ Fns::class, 'get_post_types', [ 'post_type' => 'product' ] ],
3873 - 'options' => Fns::get_post_types( null, [ 'post_type' => 'product' ] ),
3874 - 'dependency' => [
3875 - 'rules' => [
3876 - [
3877 - 'item' => 'modules.product_badges.badges_field.apply_for',
3878 - 'value' => 'product',
3879 - 'operator' => '==',
3880 - ],
3881 - ],
3882 - ],
3883 - ],
3884 - 'applicable_categories' => [
3885 - 'id' => 'applicable_categories',
3886 - 'type' => 'search_and_multi_select',
3887 - 'label' => esc_html__( 'Applicable Categories', 'shopbuilder' ),
3888 - 'help' => esc_html__( 'Choose categories to include. Leave blank to apply in all categories.', 'shopbuilder' ),
3889 - 'placeholder' => esc_html__( 'Search Category', 'shopbuilder' ),
3890 - 'func_with_param' => [
3891 - Fns::class,
3892 - 'products_category_query',
3893 - ],
3894 - 'options' => Fns::products_category_query(),
3895 - 'dependency' => [
3896 - 'rules' => [
3897 - [
3898 - 'item' => 'modules.product_badges.badges_field.apply_for',
3899 - 'value' => 'product_cat',
3900 - 'operator' => '==',
3901 - ],
3902 - ],
3903 - ],
3904 - ],
3905 - 'exclude_product' => [
3906 - 'id' => 'exclude_product',
3907 - 'type' => 'search_and_multi_select',
3908 - 'isPro' => ! rtsb()->has_pro(),
3909 - 'label' => esc_html__( 'Exclude Products', 'shopbuilder' ),
3910 - 'help' => esc_html__( 'Choose products to exclude. Leave blank to exclude none.', 'shopbuilder' ),
3911 - 'placeholder' => esc_html__( 'Search Products', 'shopbuilder' ),
3912 - 'func_with_param' => [ Fns::class, 'get_post_types', [ 'post_type' => 'product' ] ],
3913 - 'options' => Fns::get_post_types( null, [ 'post_type' => 'product' ] ),
3914 - ],
3915 -
3916 - /**
3917 - * Style Settings
3918 - */
3919 - 'styles_settings' => [
3920 - 'id' => 'styles_settings',
3921 - 'type' => 'title',
3922 - 'label' => esc_html__( 'Style Settings', 'shopbuilder' ),
3923 - ],
3924 - 'badge_text_color' => [
3925 - 'id' => 'badge_text_color',
3926 - 'label' => esc_html__( 'Text Color', 'shopbuilder' ),
3927 - 'type' => 'color',
3928 - 'dependency' => [
3929 - 'rules' => [
3930 - [
3931 - 'item' => 'modules.product_badges.badges_field.badges_type',
3932 - 'value' => 'text',
3933 - 'operator' => '==',
3934 - ],
3935 - ],
3936 - ],
3937 - ],
3938 - 'badge_bg_color' => [
3939 - 'id' => 'badge_bg_color',
3940 - 'label' => esc_html__( 'Background Color', 'shopbuilder' ),
3941 - 'type' => 'color',
3942 - 'dependency' => [
3943 - 'rules' => [
3944 - [
3945 - 'item' => 'modules.product_badges.badges_field.badges_type',
3946 - 'value' => 'text',
3947 - 'operator' => '==',
3948 - ],
3949 - [
3950 - 'item' => 'modules.product_badges.badges_field.badges_type',
3951 - 'value' => 'text',
3952 - 'operator' => '==',
3953 - ],
3954 - [
3955 - 'item' => 'modules.product_badges.badges_field.badge_preset',
3956 - 'value' => [ 'preset1', 'preset2' ],
3957 - 'operator' => 'in',
3958 - ],
3959 - ],
3960 - ],
3961 - ],
3962 - 'badge_border_color' => [
3963 - 'id' => 'badge_border_color',
3964 - 'label' => esc_html__( 'Border Color', 'shopbuilder' ),
3965 - 'type' => 'color',
3966 - 'dependency' => [
3967 - 'rules' => [
3968 - [
3969 - 'item' => 'modules.product_badges.badges_field.badges_type',
3970 - 'value' => 'text',
3971 - 'operator' => '==',
3972 - ],
3973 - [
3974 - 'item' => 'modules.product_badges.badges_field.badges_type',
3975 - 'value' => 'text',
3976 - 'operator' => '==',
3977 - ],
3978 - [
3979 - 'item' => 'modules.product_badges.badges_field.badge_preset',
3980 - 'value' => [ 'preset3', 'preset4' ],
3981 - 'operator' => 'in',
3982 - ],
3983 - ],
3984 - ],
3985 - ],
3986 - 'badge_font_size' => [
3987 - 'id' => 'badge_font_size',
3988 - 'type' => 'text',
3989 - 'label' => esc_html__( 'Font Size', 'shopbuilder' ),
3990 - 'help' => esc_html__( 'Example: 14px', 'shopbuilder' ),
3991 - 'dependency' => [
3992 - 'rules' => [
3993 - [
3994 - 'item' => 'modules.product_badges.badges_field.badges_type',
3995 - 'value' => 'text',
3996 - 'operator' => '==',
3997 - ],
3998 - ],
3999 - ],
4000 - ],
4001 - 'badge_font_width' => [
4002 - 'id' => 'badge_font_width',
4003 - 'type' => 'select',
4004 - 'value' => '400',
4005 - 'label' => esc_html__( 'Font Weight', 'shopbuilder' ),
4006 - 'options' => [
4007 - '100' => '100',
4008 - '200' => '200',
4009 - '300' => '300',
4010 - '400' => '400',
4011 - '500' => '500',
4012 - '600' => '600',
4013 - '700' => '700',
4014 - '800' => '800',
4015 - '900' => '900',
4016 - 'normal' => 'normal',
4017 - 'bold' => 'bold',
4018 - 'bolder' => 'bolder',
4019 - 'lighter' => 'lighter',
4020 - 'initial' => 'initial',
4021 - 'inherit' => 'inherit',
4022 - ],
4023 - 'dependency' => [
4024 - 'rules' => [
4025 - [
4026 - 'item' => 'modules.product_badges.badges_field.badges_type',
4027 - 'value' => 'text',
4028 - 'operator' => '==',
4029 - ],
4030 - ],
4031 - ],
4032 - ],
4033 - 'badge_width' => [
4034 - 'id' => 'badge_width',
4035 - 'type' => 'text',
4036 - 'label' => esc_html__( 'Width', 'shopbuilder' ),
4037 - 'help' => esc_html__( 'Example: 150px', 'shopbuilder' ),
4038 - 'dependency' => [
4039 - 'rules' => [
4040 - [
4041 - 'item' => 'modules.product_badges.badges_field.badges_type',
4042 - 'value' => 'image',
4043 - 'operator' => '==',
4044 - ],
4045 - ],
4046 - ],
4047 - ],
4048 - 'badge_height' => [
4049 - 'id' => 'badge_height',
4050 - 'type' => 'text',
4051 - 'label' => esc_html__( 'Height', 'shopbuilder' ),
4052 - 'help' => esc_html__( 'Example: 50px', 'shopbuilder' ),
4053 - 'dependency' => [
4054 - 'rules' => [
4055 - [
4056 - 'item' => 'modules.product_badges.badges_field.badges_type',
4057 - 'value' => 'image',
4058 - 'operator' => '==',
4059 - ],
4060 - ],
4061 - ],
4062 - ],
4063 - 'border_radius' => [
4064 - 'id' => 'border_radius',
4065 - 'type' => 'text',
4066 - 'size' => 'small',
4067 - 'label' => esc_html__( 'Border Radius', 'shopbuilder' ),
4068 - 'help' => esc_html__( 'Example: 20px 20px 20px 20px Or 20px', 'shopbuilder' ),
4069 - 'dependency' => [
4070 - 'rules' => [
4071 - [
4072 - 'item' => 'modules.product_badges.badges_field.badges_type',
4073 - 'value' => 'text',
4074 - 'operator' => '==',
4075 - ],
4076 - ],
4077 - ],
4078 - ],
4079 - 'badge_padding' => [
4080 - 'id' => 'badge_padding',
4081 - 'type' => 'text',
4082 - 'size' => 'small',
4083 - 'label' => esc_html__( 'Padding', 'shopbuilder' ),
4084 - 'help' => esc_html__( 'Example: 10px 15px 10px 15px', 'shopbuilder' ),
4085 - 'dependency' => [
4086 - 'rules' => [
4087 - [
4088 - 'item' => 'modules.product_badges.badges_field.badges_type',
4089 - 'value' => 'text',
4090 - 'operator' => '==',
4091 - ],
4092 - ],
4093 - ],
4094 - ],
4095 - ],
4096 - ],
4097 -
4098 - ]
4099 - );
4100 - }
4101 -
4102 - /**
4103 - * Dynamic badge list.
4104 - *
4105 - * @return array
4106 - */
4107 - public function dynamic_badge_list() {
4108 - $items = [
4109 - 'on_sale' => esc_html__( 'Products On Sale', 'shopbuilder' ),
4110 - 'featured' => esc_html__( 'Featured Products', 'shopbuilder' ),
4111 - 'out_of_stock' => esc_html__( 'Out Of Stock Products', 'shopbuilder' ),
4112 - 'best_selling' => esc_html__( 'Best Selling Products', 'shopbuilder' ),
4113 - 'new_arrival' => esc_html__( 'New Arrival Products', 'shopbuilder' ),
4114 - ];
4115 -
4116 - if ( rtsb()->has_pro() && method_exists( FnsPro::class, 'is_module_active' ) && FnsPro::is_module_active( 'pre_order' ) ) {
4117 - $items['pre_order'] = esc_html__( 'Pre-Order Products', 'shopbuilder' );
4118 - }
4119 -
4120 - return $items;
4121 - }
4122 - /**
4123 - * @return array
4124 - */
4125 - public function get_variation_swatches_fields() {
4126 - return apply_filters(
4127 - 'rtsb/module/variation_swatches/fields',
4128 - [
4129 - 'show_tooltip' => [
4130 - 'id' => 'show_tooltip',
4131 - 'value' => 'on',
4132 - 'type' => 'switch',
4133 - 'label' => esc_html__( 'Enable Tooltip', 'shopbuilder' ),
4134 - 'help' => esc_html__( 'Enable / Disable plugin default tooltip on each product attribute.', 'shopbuilder' ),
4135 - 'tab' => 'general',
4136 - ],
4137 - 'shape_style_checkmark' => [
4138 - 'id' => 'shape_style_checkmark',
4139 - 'type' => 'switch',
4140 - 'isPro' => ! rtsb()->has_pro(),
4141 - 'default' => false,
4142 - 'label' => esc_html__( 'Checkmark Selected Term ', 'shopbuilder' ),
4143 - 'help' => esc_html__( 'Shape style will add checkmark icon. Note: This option will not be applied to radio attributes.', 'shopbuilder' ),
4144 - 'tab' => 'general',
4145 - ],
4146 - 'default_dropdown_convert' => [
4147 - 'id' => 'default_dropdown_convert',
4148 - 'label' => esc_html__( 'Default Dropdown Convert', 'shopbuilder' ),
4149 - 'help' => esc_html__( 'Dropdown Convert To Button Or Image', 'shopbuilder' ),
4150 - 'isPro' => ! rtsb()->has_pro(),
4151 - 'type' => 'select',
4152 - 'value' => 'button',
4153 - 'options' => [
4154 - 'select' => esc_html__( 'Select ( Default, Not Convert )', 'shopbuilder' ),
4155 - 'button' => esc_html__( 'Button', 'shopbuilder' ),
4156 - 'image' => esc_html__( 'Image', 'shopbuilder' ),
4157 - ],
4158 - 'tab' => 'general',
4159 - ],
4160 - 'show_term_name_beside_label' => [
4161 - 'id' => 'show_term_name_beside_label',
4162 - 'type' => 'switch',
4163 - 'isPro' => ! rtsb()->has_pro(),
4164 - 'default' => false,
4165 - 'label' => esc_html__( 'Show Term Name', 'shopbuilder' ),
4166 - 'help' => esc_html__( 'Selected term name will show beside attribute label.', 'shopbuilder' ),
4167 - 'tab' => 'general',
4168 - ],
4169 - 'disabled_attribute_behavior' => [
4170 - 'id' => 'disabled_attribute_behavior',
4171 - 'label' => esc_html__( 'Disabled Attribute behavior', 'shopbuilder' ),
4172 - '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>',
4173 - 'type' => 'select',
4174 - 'value' => 'blur-cross',
4175 - 'options' => [
4176 - 'blur-cross' => esc_html__( 'Blur And Cross', 'shopbuilder' ),
4177 - 'blur-no-cross' => esc_html__( 'Only Blur', 'shopbuilder' ),
4178 - 'hide' => esc_html__( 'Hide', 'shopbuilder' ),
4179 - ],
4180 - 'tab' => 'general',
4181 - ],
4182 - 'attr_display_limit' => [
4183 - 'id' => 'attr_display_limit',
4184 - 'type' => 'number',
4185 - 'isPro' => ! rtsb()->has_pro(),
4186 - 'value' => 0,
4187 - 'size' => 'small',
4188 - 'min' => 0,
4189 - 'max' => 999,
4190 - 'label' => esc_html__( 'Product Page Attribute display limit', 'shopbuilder' ),
4191 - 'help' => esc_html__( 'Catalog mode attribute display limit. Default is 0. Means no limit.', 'shopbuilder' ),
4192 - 'tab' => 'general',
4193 - ],
4194 - 'attribute_image_size' => [
4195 - 'id' => 'attribute_image_size',
4196 - 'label' => esc_html__( 'Attribute image size', 'shopbuilder' ),
4197 - 'help' => __( 'Choose attribute image size.', 'shopbuilder' ) . '<a target="_blank" href="' . esc_url( admin_url( 'options-media.php' ) ) . '"> ' . __( 'Media Settings', 'shopbuilder' ) . '</a>',
4198 - 'type' => 'select',
4199 - 'value' => 'thumbnail',
4200 - 'options' => Fns::get_image_sizes(),
4201 - 'tab' => 'general',
4202 - ],
4203 -
4204 - 'tooltip_title' => [
4205 - 'id' => 'tooltip_title',
4206 - 'type' => 'title',
4207 - 'label' => esc_html__( 'Tooltip Options', 'shopbuilder' ),
4208 - 'help' => esc_html__( 'Tooltip settings for single page and catalog mode on shop / archive pages', 'shopbuilder' ),
4209 - 'tab' => 'general',
4210 - 'dependency' => [
4211 - 'rules' => [
4212 - [
4213 - 'item' => 'modules.variation_swatches.show_tooltip',
4214 - 'value' => 'on',
4215 - 'operator' => '==',
4216 - ],
4217 - ],
4218 - ],
4219 - ],
4220 - 'tooltip_image_size' => [
4221 - 'id' => 'tooltip_image_size',
4222 - 'label' => esc_html__( 'Tooltip image size', 'shopbuilder' ),
4223 - 'help' => __( 'Choose Tooltip image size.', 'shopbuilder' ) . '<a target="_blank" href="' . esc_url( admin_url( 'options-media.php' ) ) . '"> ' . __( 'Media Settings', 'shopbuilder' ) . '</a>',
4224 - 'type' => 'select',
4225 - 'isPro' => ! rtsb()->has_pro(),
4226 - 'value' => 'thumbnail',
4227 - 'options' => Fns::get_image_sizes(),
4228 - 'tab' => 'general',
4229 - 'dependency' => [
4230 - 'rules' => [
4231 - [
4232 - 'item' => 'modules.variation_swatches.show_tooltip',
4233 - 'value' => 'on',
4234 - 'operator' => '==',
4235 - ],
4236 - ],
4237 - ],
4238 - ],
4239 - 'advanced_title' => [
4240 - 'id' => 'advanced_title',
4241 - 'type' => 'title',
4242 - 'label' => esc_html__( 'Advanced', 'shopbuilder' ),
4243 - 'tab' => 'general',
4244 - ],
4245 - 'disable_out_of_stock' => [
4246 - 'id' => 'disable_out_of_stock',
4247 - 'type' => 'switch',
4248 - 'default' => true,
4249 - 'label' => esc_html__( 'Disable Out of Stock', 'shopbuilder' ),
4250 - 'help' => __( 'Disable out of stock variation attribute items.', 'shopbuilder' ),
4251 - 'tab' => 'general',
4252 - ],
4253 -
4254 - 'enable_variation_url' => [
4255 - 'id' => 'enable_variation_url',
4256 - 'type' => 'switch',
4257 - 'default' => false,
4258 - 'isPro' => ! rtsb()->has_pro(),
4259 - 'label' => esc_html__( 'Variation URL', 'shopbuilder' ),
4260 - 'help' => esc_html__( 'Generate a URL based on the selected variation attributes.', 'shopbuilder' ),
4261 - 'tab' => 'general',
4262 - ],
4263 - 'enable_showcase_swatches' => [
4264 - 'id' => 'enable_showcase_swatches',
4265 - 'type' => 'switch',
4266 - 'default' => false,
4267 - 'isPro' => ! rtsb()->has_pro(),
4268 - 'label' => esc_html__( 'Enable Swatches', 'shopbuilder' ),
4269 - 'help' => esc_html__( 'Show swatches on archive / shop page.', 'shopbuilder' ),
4270 - 'tab' => 'showcase_shop',
4271 - ],
4272 - 'showcase_product_wrapper_selector' => [
4273 - 'id' => 'showcase_product_wrapper_selector',
4274 - 'type' => 'text',
4275 - 'isPro' => ! rtsb()->has_pro(),
4276 - 'label' => esc_html__( 'Product Wrapper Selector', 'shopbuilder' ),
4277 - 'help' => esc_html__( 'Archive product Wrapper Selector (.rtwpvs-product,.tmb-woocommerce)', 'shopbuilder' ),
4278 - 'value' => '.rtsb-vs-product,.product-item',
4279 - 'dependency' => [
4280 - 'rules' => [
4281 - [
4282 - 'item' => 'modules.variation_swatches.enable_showcase_swatches',
4283 - 'value' => 'on',
4284 - 'operator' => '==',
4285 - ],
4286 - ],
4287 - ],
4288 - 'tab' => 'showcase_shop',
4289 - ],
4290 - 'showcase_swatches_image_selector' => [
4291 - 'id' => 'showcase_swatches_image_selector',
4292 - 'type' => 'text',
4293 - 'isPro' => ! rtsb()->has_pro(),
4294 - 'label' => esc_html__( 'Image Selector', 'shopbuilder' ),
4295 - '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' ),
4296 - 'value' => '.wp-post-image, .attachment-woocommerce_thumbnail, .rtsb-product-image',
4297 - 'dependency' => [
4298 - 'rules' => [
4299 - [
4300 - 'item' => 'modules.variation_swatches.enable_showcase_swatches',
4301 - 'value' => 'on',
4302 - 'operator' => '==',
4303 - ],
4304 - ],
4305 - ],
4306 - 'tab' => 'showcase_shop',
4307 - ],
4308 - 'showcase_image_size' => [
4309 - 'id' => 'showcase_image_size',
4310 - 'label' => esc_html__( 'Showcase Image Size', 'shopbuilder' ),
4311 - 'help' => __( 'Choose showcase variation image size.', 'shopbuilder' ) ,
4312 - 'type' => 'select',
4313 - 'isPro' => ! rtsb()->has_pro(),
4314 - 'value' => 'woocommerce_thumbnail',
4315 - 'options' => array_diff_key( Fns::get_image_sizes(), [ 'rtsb_custom' => '' ] ),
4316 - 'dependency' => [
4317 - 'rules' => [
4318 - [
4319 - 'item' => 'modules.variation_swatches.enable_showcase_swatches',
4320 - 'value' => 'on',
4321 - 'operator' => '==',
4322 - ],
4323 - ],
4324 - ],
4325 - 'tab' => 'showcase_shop',
4326 - ],
4327 - 'showcase_swatches_position' => [
4328 - 'id' => 'showcase_swatches_position',
4329 - 'label' => esc_html__( 'Swatches Position', 'shopbuilder' ),
4330 - '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' ),
4331 - 'isPro' => ! rtsb()->has_pro(),
4332 - 'type' => 'select',
4333 - 'value' => 'before_add_to_cart',
4334 - 'options' => apply_filters(
4335 - 'rtsb_showcase_swatches_positions',
4336 - [
4337 - 'custom_hook' => esc_html__( 'Custom Hook', 'shopbuilder' ),
4338 - 'before_add_to_cart' => esc_html__( 'Above Add To Cart', 'shopbuilder' ),
4339 - 'after_add_to_cart' => esc_html__( 'Below Add To Cart', 'shopbuilder' ),
4340 - ]
4341 - ),
4342 - 'dependency' => [
4343 - 'rules' => [
4344 - [
4345 - 'item' => 'modules.variation_swatches.enable_showcase_swatches',
4346 - 'value' => 'on',
4347 - 'operator' => '==',
4348 - ],
4349 - ],
4350 - ],
4351 - 'tab' => 'showcase_shop',
4352 - ],
4353 - 'custom_hook_name' => [
4354 - 'type' => 'description',
4355 - 'text' => sprintf(
4356 - /* translators: 1: The shortcode.*/
4357 - esc_html__( 'Copy the php code %1$s and paste it in your product query where you want to show the button.', 'shopbuilder' ),
4358 - "<code style='padding: 5px' >&lt;?php do_action( 'rtsb/vs/showcase/variation' ); ?&gt;</code>"
4359 - ),
4360 - 'id' => 'custom_hook_name',
4361 - 'tab' => 'showcase_shop',
4362 - 'dependency' => [
4363 - 'rules' => [
4364 - [
4365 - 'item' => 'modules.variation_swatches.enable_showcase_swatches',
4366 - 'value' => 'on',
4367 - 'operator' => '==',
4368 - ],
4369 - [
4370 - 'item' => 'modules.variation_swatches.showcase_swatches_position',
4371 - 'value' => 'custom_hook',
4372 - 'operator' => '==',
4373 - ],
4374 - ],
4375 - ],
4376 - ],
4377 - 'showcase_swatches_align' => [
4378 - 'id' => 'showcase_swatches_align',
4379 - 'label' => esc_html__( 'Swatches Align', 'shopbuilder' ),
4380 - 'help' => esc_html__( 'Swatches align on archive page.', 'shopbuilder' ),
4381 - 'isPro' => ! rtsb()->has_pro(),
4382 - 'type' => 'select',
4383 - 'value' => 'left',
4384 - 'options' => apply_filters(
4385 - 'rtsb_get_showcase_swatches_aligns',
4386 - [
4387 - 'left' => esc_html__( 'Left', 'shopbuilder' ),
4388 - 'right' => esc_html__( 'Right', 'shopbuilder' ),
4389 - 'center' => esc_html__( 'Center', 'shopbuilder' ),
4390 - ]
4391 - ),
4392 - 'dependency' => [
4393 - 'rules' => [
4394 - [
4395 - 'item' => 'modules.variation_swatches.enable_showcase_swatches',
4396 - 'value' => 'on',
4397 - 'operator' => '==',
4398 - ],
4399 - ],
4400 - ],
4401 - 'tab' => 'showcase_shop',
4402 - ],
4403 -
4404 - 'show_clear_on_showcase' => [
4405 - 'id' => 'show_clear_on_showcase',
4406 - 'isPro' => ! rtsb()->has_pro(),
4407 - 'type' => 'switch',
4408 - 'label' => esc_html__( 'Show clear link', 'shopbuilder' ),
4409 - 'help' => esc_html__( 'Show clear link on archive, shop page, any other showcase.', 'shopbuilder' ),
4410 - 'dependency' => [
4411 - 'rules' => [
4412 - [
4413 - 'item' => 'modules.variation_swatches.enable_showcase_swatches',
4414 - 'value' => 'on',
4415 - 'operator' => '==',
4416 - ],
4417 - ],
4418 - ],
4419 - 'tab' => 'showcase_shop',
4420 - ],
4421 - 'showcase_special_attribute_title' => [
4422 - 'id' => 'showcase_special_attribute_title',
4423 - 'type' => 'title',
4424 - 'label' => esc_html__( 'Special Attribute', 'shopbuilder' ),
4425 - 'tab' => 'showcase_shop',
4426 - ],
4427 - 'showcase_single_attribute' => [
4428 - 'id' => 'showcase_single_attribute',
4429 - 'isPro' => ! rtsb()->has_pro(),
4430 - 'type' => 'switch',
4431 - 'label' => esc_html__( 'Show Single Attribute', 'shopbuilder' ),
4432 - 'help' => esc_html__( 'Show single attribute taxonomies on archive page.', 'shopbuilder' ),
4433 - 'tab' => 'showcase_shop',
4434 - ],
4435 - 'chose_showcase_single_attribute' => [
4436 - 'id' => 'chose_showcase_single_attribute',
4437 - 'label' => esc_html__( 'Chose Attribute', 'shopbuilder' ),
4438 - 'help' => esc_html__( 'Choose an attribute to show on catalog mode', 'shopbuilder' ),
4439 - 'isPro' => ! rtsb()->has_pro(),
4440 - 'type' => 'select',
4441 - 'options' => SwatchesFns::get_wc_attributes( esc_html__( ' - Choose Attribute - ', 'shopbuilder' ) ),
4442 - 'dependency' => [
4443 - 'rules' => [
4444 - [
4445 - 'item' => 'modules.variation_swatches.showcase_single_attribute',
4446 - 'value' => 'on',
4447 - 'operator' => '==',
4448 - ],
4449 - ],
4450 - ],
4451 - 'tab' => 'showcase_shop',
4452 - ],
4453 -
4454 - 'showcase_swatches_display_event' => [
4455 - 'id' => 'showcase_swatches_display_event',
4456 - 'label' => esc_html__( 'Catalog Mode Display Event', 'shopbuilder' ),
4457 - 'help' => esc_html__( 'Show catalog mode image display event.', 'shopbuilder' ),
4458 - 'isPro' => ! rtsb()->has_pro(),
4459 - 'type' => 'select',
4460 - 'value' => 'click',
4461 - 'options' => [
4462 - 'click' => esc_html__( 'on Click', 'shopbuilder' ),
4463 - 'hover' => esc_html__( 'on Hover', 'shopbuilder' ),
4464 - ],
4465 - 'dependency' => [
4466 - 'rules' => [
4467 - [
4468 - 'item' => 'modules.variation_swatches.enable_showcase_swatches',
4469 - 'value' => 'on',
4470 - 'operator' => '==',
4471 - ],
4472 - ],
4473 - ],
4474 - 'tab' => 'showcase_shop',
4475 - ],
4476 -
4477 - 'showcase_swatches_display_limit' => [
4478 - 'id' => 'showcase_swatches_display_limit',
4479 - 'type' => 'number',
4480 - 'isPro' => ! rtsb()->has_pro(),
4481 - 'value' => 0,
4482 - 'size' => 'small',
4483 - 'min' => 0,
4484 - 'max' => 999,
4485 - 'label' => esc_html__( 'Attribute display limit', 'shopbuilder' ),
4486 - 'help' => esc_html__( 'Catalog mode attribute display limit. Default is 0. Means no limit.', 'shopbuilder' ),
4487 - 'dependency' => [
4488 - 'rules' => [
4489 - [
4490 - 'item' => 'modules.variation_swatches.enable_showcase_swatches',
4491 - 'value' => 'on',
4492 - 'operator' => '==',
4493 - ],
4494 - ],
4495 - ],
4496 - 'tab' => 'showcase_shop',
4497 - ],
4498 - 'checkmark_size' => [
4499 - 'id' => 'checkmark_size',
4500 - 'type' => 'title',
4501 - 'label' => esc_html__( 'Checkmark', 'shopbuilder' ),
4502 - 'tab' => 'style',
4503 - ],
4504 - 'checkmark_bg_color' => [
4505 - 'id' => 'checkmark_bg_color',
4506 - 'label' => esc_html__( 'Checkmark Background Color', 'shopbuilder' ),
4507 - 'isPro' => ! rtsb()->has_pro(),
4508 - 'type' => 'color',
4509 - 'value' => '#333333',
4510 - 'tab' => 'style',
4511 - ],
4512 - 'attribute_checkmark_width' => [
4513 - 'id' => 'attribute_checkmark_width',
4514 - 'label' => esc_html__( 'Checkmark Width', 'shopbuilder' ),
4515 - 'isPro' => ! rtsb()->has_pro(),
4516 - 'help' => esc_html__( 'Set the width (in px) for selected attribute checkmark,', 'shopbuilder' ),
4517 - 'type' => 'slider',
4518 - 'min' => 15,
4519 - 'max' => 200,
4520 - 'unit' => 'px',
4521 - 'value' => 18,
4522 - 'tab' => 'style',
4523 - ],
4524 - 'attribute_checkmark_height' => [
4525 - 'id' => 'attribute_checkmark_height',
4526 - 'label' => esc_html__( 'Checkmark Height', 'shopbuilder' ),
4527 - 'isPro' => ! rtsb()->has_pro(),
4528 - 'help' => esc_html__( 'Set the height (in px) for selected attribute checkmark,', 'shopbuilder' ),
4529 - 'type' => 'slider',
4530 - 'min' => 15,
4531 - 'max' => 200,
4532 - 'unit' => 'px',
4533 - 'value' => 18,
4534 - 'tab' => 'style',
4535 - ],
4536 - 'attribute_checkmark_icon_size' => [
4537 - 'id' => 'attribute_checkmark_icon_size',
4538 - 'isPro' => ! rtsb()->has_pro(),
4539 - 'label' => esc_html__( 'Checkmark Icon Size', 'shopbuilder' ),
4540 - 'help' => esc_html__( 'Checkmark Icon Size.', 'shopbuilder' ),
4541 - 'type' => 'slider',
4542 - 'min' => 10,
4543 - 'max' => 30,
4544 - 'unit' => 'px',
4545 - 'value' => 13,
4546 - 'tab' => 'style',
4547 - ],
4548 - 'attribute_style' => [
4549 - 'id' => 'attribute_style',
4550 - 'type' => 'title',
4551 - 'label' => esc_html__( 'Attribute Style', 'shopbuilder' ),
4552 - 'tab' => 'style',
4553 - ],
4554 - 'attribute_border_color' => [
4555 - 'id' => 'attribute_border_color',
4556 - 'label' => esc_html__( 'Attribute Border Color', 'shopbuilder' ),
4557 - 'type' => 'color',
4558 - 'value' => '#D1D5DB',
4559 - 'tab' => 'style',
4560 - ],
4561 - 'attribute_border_color_hover' => [
4562 - 'id' => 'attribute_border_color_hover',
4563 - 'label' => esc_html__( 'Attribute Border Color Hover/Active', 'shopbuilder' ),
4564 - 'type' => 'color',
4565 - 'value' => '#333333',
4566 - 'tab' => 'style',
4567 - ],
4568 - 'attribute_border_radius' => [
4569 - 'id' => 'attribute_border_radius',
4570 - 'label' => esc_html__( 'Attribute Border Radius', 'shopbuilder' ),
4571 - 'isPro' => ! rtsb()->has_pro(),
4572 - 'help' => esc_html__( 'Set the border radius (in px) for attribute items. Use a small value for squared corners or a large value (e.g. 100+) for fully rounded / circular swatches.', 'shopbuilder' ),
4573 - 'type' => 'slider',
4574 - 'min' => 0,
4575 - 'max' => 200,
4576 - 'unit' => 'px',
4577 - 'value' => 4,
4578 - 'tab' => 'style',
4579 - ],
4580 - 'details_page_attribute_size' => [
4581 - 'id' => 'details_page_attribute_size',
4582 - 'type' => 'title',
4583 - 'label' => esc_html__( 'Details Page Attributes', 'shopbuilder' ),
4584 - 'tab' => 'style',
4585 - ],
4586 - 'details_page_attr_label_color' => [
4587 - 'id' => 'details_page_attr_label_color',
4588 - 'label' => esc_html__( 'Product Page Attribute Label Color', 'shopbuilder' ),
4589 - 'type' => 'color',
4590 - 'value' => '#333333',
4591 - 'tab' => 'style',
4592 - ],
4593 - 'details_page_attr_label_font_size' => [
4594 - 'id' => 'details_page_attr_label_font_size',
4595 - 'label' => esc_html__( 'Product Page Attribute Label Font Size', 'shopbuilder' ),
4596 - 'type' => 'slider',
4597 - 'min' => 8,
4598 - 'max' => 50,
4599 - 'unit' => 'px',
4600 - 'value' => 16,
4601 - 'tab' => 'style',
4602 - ],
4603 - 'details_page_attribute_width' => [
4604 - 'id' => 'details_page_attribute_width',
4605 - 'label' => esc_html__( 'Variation Item Width', 'shopbuilder' ),
4606 - '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' ),
4607 - 'type' => 'slider',
4608 - 'min' => 10,
4609 - 'max' => 150,
4610 - 'unit' => 'px',
4611 - 'value' => 30,
4612 - 'tab' => 'style',
4613 - ],
4614 - 'details_page_attribute_height' => [
4615 - 'id' => 'details_page_attribute_height',
4616 - 'label' => esc_html__( 'Variation Item Height', 'shopbuilder' ),
4617 - 'help' => esc_html__( 'Set the height (in px) for each variation attribute option, Note: This option will not be applied to radio attributes.', 'shopbuilder' ),
4618 - 'type' => 'slider',
4619 - 'min' => 10,
4620 - 'max' => 150,
4621 - 'unit' => 'px',
4622 - 'value' => 30,
4623 - 'tab' => 'style',
4624 - ],
4625 - 'details_page_attribute_font_size' => [
4626 - 'id' => 'details_page_attribute_font_size',
4627 - 'label' => esc_html__( 'Variation Item Font Size', 'shopbuilder' ),
4628 - 'help' => esc_html__( 'Set the font size (in px) for text within variation attribute options, such as labels on buttons.', 'shopbuilder' ),
4629 - 'type' => 'slider',
4630 - 'min' => 8,
4631 - 'max' => 30,
4632 - 'unit' => 'px',
4633 - 'value' => 16,
4634 - 'tab' => 'style',
4635 - ],
4636 - 'details_page_radio_size' => [
4637 - 'id' => 'details_page_radio_size',
4638 - 'label' => esc_html__( 'Radio Attribute Size', 'shopbuilder' ),
4639 - 'help' => esc_html__( 'Set the size (in px) for radio-button variation attributes. Independent from the Variation Item Width/Height settings.', 'shopbuilder' ),
4640 - 'type' => 'slider',
4641 - 'min' => 10,
4642 - 'max' => 80,
4643 - 'unit' => 'px',
4644 - 'value' => 25,
4645 - 'tab' => 'style',
4646 - ],
4647 - 'showcase_attribute_size' => [
4648 - 'id' => 'showcase_attribute_size',
4649 - 'type' => 'title',
4650 - 'label' => esc_html__( 'Shop Page / Product Showcase Attributes Size', 'shopbuilder' ),
4651 - 'tab' => 'style',
4652 - ],
4653 - 'showcase_attribute_width' => [
4654 - 'id' => 'showcase_attribute_width',
4655 - 'label' => esc_html__( 'Variation Item Width', 'shopbuilder' ),
4656 - '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' ),
4657 - 'type' => 'slider',
4658 - 'min' => 10,
4659 - 'max' => 200,
4660 - 'unit' => 'px',
4661 - 'value' => 30,
4662 - 'tab' => 'style',
4663 - ],
4664 - 'showcase_attribute_height' => [
4665 - 'id' => 'showcase_attribute_height',
4666 - 'label' => esc_html__( 'Variation Item Height', 'shopbuilder' ),
4667 - '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' ),
4668 - 'type' => 'slider',
4669 - 'min' => 10,
4670 - 'max' => 200,
4671 - 'unit' => 'px',
4672 - 'value' => 30,
4673 - 'tab' => 'style',
4674 - ],
4675 - 'showcase_attribute_font_size' => [
4676 - 'id' => 'showcase_attribute_font_size',
4677 - 'label' => esc_html__( 'Variation Item Font Size', 'shopbuilder' ),
4678 - 'help' => esc_html__( 'Set the font size (in px) for text within variation attribute options, such as labels on buttons.', 'shopbuilder' ),
4679 - 'type' => 'slider',
4680 - 'min' => 8,
4681 - 'max' => 30,
4682 - 'unit' => 'px',
4683 - 'value' => 16,
4684 - 'tab' => 'style',
4685 - ],
4686 - 'showcase_radio_size' => [
4687 - 'id' => 'showcase_radio_size',
4688 - 'label' => esc_html__( 'Radio Attribute Size', 'shopbuilder' ),
4689 - 'help' => esc_html__( 'Set the size (in px) for radio-button variation attributes in shop/showcase contexts.', 'shopbuilder' ),
4690 - 'type' => 'slider',
4691 - 'min' => 10,
4692 - 'max' => 80,
4693 - 'unit' => 'px',
4694 - 'value' => 25,
4695 - 'tab' => 'style',
4696 - ],
4697 - 'tooltip_style' => [
4698 - 'id' => 'tooltip_style',
4699 - 'type' => 'title',
4700 - 'label' => esc_html__( 'Tooltip Style', 'shopbuilder' ),
4701 - 'tab' => 'style',
4702 - ],
4703 - 'tooltip_text_color' => [
4704 - 'id' => 'tooltip_text_color',
4705 - 'label' => esc_html__( 'Tooltip Text Color', 'shopbuilder' ),
4706 - 'type' => 'color',
4707 - 'value' => '#ffffff',
4708 - 'tab' => 'style',
4709 - ],
4710 - 'tooltip_bg_color' => [
4711 - 'id' => 'tooltip_bg_color',
4712 - 'label' => esc_html__( 'Tooltip Background Color', 'shopbuilder' ),
4713 - 'type' => 'color',
4714 - 'value' => '#333333',
4715 - 'tab' => 'style',
4716 - ],
4717 - 'tooltip_images_padding' => [
4718 - 'id' => 'tooltip_images_padding',
4719 - 'label' => esc_html__( 'Tooltip Images Padding', 'shopbuilder' ),
4720 - 'type' => 'slider',
4721 - 'min' => 0,
4722 - 'max' => 30,
4723 - 'unit' => 'px',
4724 - 'value' => 3,
4725 - 'tab' => 'style',
4726 - ],
4727 - 'tooltip_image_bg_color' => [
4728 - 'id' => 'tooltip_image_bg_color',
4729 - 'label' => esc_html__( 'Tooltip Image Background Color', 'shopbuilder' ),
4730 - 'type' => 'color',
4731 - 'value' => '#333333',
4732 - 'tab' => 'style',
4733 - ],
4734 -
4735 - ]
4736 - ); // @phpstan-ignore-line
4737 - }
4738 - /**
4739 - * @return array
4740 - */
4741 - public function get_variation_gallery_fields() {
4742 - return apply_filters(
4743 - 'rtsb/module/variation_gallery/fields',
4744 - [
4745 - 'main_image_controls_title' => [
4746 - 'id' => 'main_image_controls_title',
4747 - 'type' => 'title',
4748 - 'label' => esc_html__( 'Main Image Controls', 'shopbuilder' ),
4749 - 'tab' => 'general',
4750 - ],
4751 - 'image_zoom' => [
4752 - 'id' => 'image_zoom',
4753 - 'type' => 'switch',
4754 - 'default' => false,
4755 - 'label' => esc_html__( 'Zoom Gallery image', 'shopbuilder' ),
4756 - 'tab' => 'general',
4757 - ],
4758 - 'lightBox' => [
4759 - 'id' => 'lightBox',
4760 - 'type' => 'switch',
4761 - 'default' => false,
4762 - 'label' => esc_html__( 'Enable Images lightBox', 'shopbuilder' ),
4763 - 'tab' => 'general',
4764 - ],
4765 - 'lightBox_button_position' => [
4766 - 'id' => 'lightBox_button_position',
4767 - 'type' => 'select',
4768 - 'value' => 'top-right',
4769 - 'label' => esc_html__( 'Zoom Button Position', 'shopbuilder' ),
4770 - 'isPro' => ! rtsb()->has_pro(),
4771 - 'options' => [
4772 - 'top-right' => esc_html__( 'Top Right', 'shopbuilder' ),
4773 - 'top-left' => esc_html__( 'Top Left', 'shopbuilder' ),
4774 - 'bottom-right' => esc_html__( 'Bottom Right', 'shopbuilder' ),
4775 - 'bottom-left' => esc_html__( 'Bottom Left', 'shopbuilder' ),
4776 - ],
4777 - 'tab' => 'general',
4778 - ],
4779 -
4780 - 'adaptive_height' => [
4781 - 'id' => 'adaptive_height',
4782 - 'type' => 'switch',
4783 - 'default' => false,
4784 - 'label' => esc_html__( 'Main Images Slider Adaptive Height', 'shopbuilder' ),
4785 - 'tab' => 'general',
4786 - 'dependency' => [
4787 - 'rules' => [
4788 - [
4789 - 'item' => 'modules.variation_gallery.gallery_style',
4790 - 'value' => 'grid',
4791 - 'operator' => '!=',
4792 - ],
4793 - ],
4794 - ],
4795 - ],
4796 - 'main_slider_alignment' => [
4797 - 'id' => 'main_slider_alignment',
4798 - 'type' => 'switch',
4799 - 'value' => 'center',
4800 - 'label' => esc_html__( 'Main Image Middle Position', 'shopbuilder' ),
4801 - 'help' => esc_html__( 'The main image area will align vertically in the center if the inner content is shorter than the adjacent content.', 'shopbuilder' ),
4802 - 'tab' => 'general',
4803 - 'dependency' => [
4804 - 'rules' => [
4805 - [
4806 - 'item' => 'modules.variation_gallery.gallery_style',
4807 - 'value' => [ 'left', 'right' ],
4808 - 'operator' => 'in',
4809 - ],
4810 - ],
4811 - ],
4812 - ],
4813 - 'main_image_transition_effect' => [
4814 - 'id' => 'main_image_transition_effect',
4815 - 'type' => 'select',
4816 - 'value' => 'slide',
4817 - 'label' => esc_html__( 'Transition Effect For Main Image Carousel', 'shopbuilder' ),
4818 - 'isPro' => ! rtsb()->has_pro(),
4819 - 'options' => [
4820 - 'slide' => esc_html__( 'Slide', 'shopbuilder' ),
4821 - 'fade' => esc_html__( 'Fade', 'shopbuilder' ),
4822 - ],
4823 - 'tab' => 'general',
4824 - 'dependency' => [
4825 - 'rules' => [
4826 - [
4827 - 'item' => 'modules.variation_gallery.gallery_style',
4828 - 'value' => 'grid',
4829 - 'operator' => '!=',
4830 - ],
4831 - ],
4832 - ],
4833 - ],
4834 - 'preloader' => [
4835 - 'id' => 'preloader',
4836 - 'type' => 'switch',
4837 - 'default' => false,
4838 - 'label' => esc_html__( 'Preloader', 'shopbuilder' ),
4839 - 'help' => esc_html__( 'Show a loading animation while the gallery images are being loaded.', 'shopbuilder' ),
4840 - 'tab' => 'general',
4841 - ],
4842 - 'preloader_image' => [
4843 - 'id' => 'preloader_image',
4844 - 'type' => 'fileupload',
4845 - 'label' => esc_html__( 'Preloader Image', 'shopbuilder' ),
4846 - 'help' => esc_html__( 'Upload a custom preloader image to replace the default loading animation. Recommended size: 60x60 pixels.', 'shopbuilder' ),
4847 - 'tab' => 'general',
4848 - // Preserve the { id, source } media array on save (the default text
4849 - // sanitizer would flatten it to an empty string and drop the upload).
4850 - 'sanitize_fn' => [ Fns::class, 'sanitize_fileupload_value' ],
4851 - 'dependency' => [
4852 - 'rules' => [
4853 - [
4854 - 'item' => 'modules.variation_gallery.preloader',
4855 - 'value' => 'on',
4856 - 'operator' => '==',
4857 - ],
4858 - ],
4859 - ],
4860 - ],
4861 - 'gallery_change_effect' => [
4862 - 'id' => 'gallery_change_effect',
4863 - 'type' => 'select',
4864 - 'value' => 'blur',
4865 - 'label' => esc_html__( 'Gallery Change Effect', 'shopbuilder' ),
4866 - 'help' => esc_html__( 'Choose the visual effect applied to the gallery when switching between variations.', 'shopbuilder' ),
4867 - 'options' => [
4868 - 'blur' => esc_html__( 'Blur', 'shopbuilder' ),
4869 - 'fade' => esc_html__( 'Fade', 'shopbuilder' ),
4870 - 'gray' => esc_html__( 'Gray', 'shopbuilder' ),
4871 - 'none' => esc_html__( 'No Effect', 'shopbuilder' ),
4872 - ],
4873 - 'tab' => 'general',
4874 - ],
4875 - 'gallery_thumbnail_controls_title' => [
4876 - 'id' => 'gallery_thumbnail_controls_title',
4877 - 'type' => 'title',
4878 - 'label' => esc_html__( 'Gallery / Thumbnail Item Controls', 'shopbuilder' ),
4879 - 'tab' => 'general',
4880 - ],
4881 - 'gallery_style' => [
4882 - 'id' => 'gallery_style',
4883 - 'type' => 'select',
4884 - 'value' => 'bottom',
4885 - 'label' => esc_html__( 'Thumbnail Position/Gallery Style', 'shopbuilder' ),
4886 - 'isPro' => ! rtsb()->has_pro(),
4887 - 'options' => [
4888 - 'bottom' => esc_html__( 'Thumbnail Position Bottom', 'shopbuilder' ),
4889 - 'left' => esc_html__( 'Thumbnail Position Left', 'shopbuilder' ),
4890 - 'right' => esc_html__( 'Thumbnail Position Right', 'shopbuilder' ),
4891 - 'grid' => esc_html__( 'Grid View Images', 'shopbuilder' ),
4892 - ],
4893 - 'tab' => 'general',
4894 - ],
4895 - 'thumbnails_columns' => [
4896 - 'id' => 'thumbnails_columns',
4897 - 'type' => 'slider',
4898 - 'label' => esc_html__( 'Thumbnail Items', 'shopbuilder' ),
4899 - 'help' => esc_html__( 'Add slides per view, or items per row if the slider is not activated.', 'shopbuilder' ),
4900 - 'min' => 2,
4901 - 'max' => 8,
4902 - 'unit' => '',
4903 - 'value' => 4,
4904 - 'tab' => 'general',
4905 - ],
4906 - 'thumbnails_gap' => [
4907 - 'id' => 'thumbnails_gap',
4908 - 'type' => 'slider',
4909 - 'label' => esc_html__( 'Thumbnails Gap', 'shopbuilder' ),
4910 - 'help' => esc_html__( 'Product Thumbnails Gap In Pixel. Default value is: 0. Limit: 0-50.', 'shopbuilder' ),
4911 - 'min' => 0,
4912 - 'max' => 50,
4913 - 'unit' => 'px',
4914 - 'value' => 10,
4915 - 'tab' => 'general',
4916 - ],
4917 - 'main_image_border_color' => [
4918 - 'id' => 'main_image_border_color',
4919 - 'label' => esc_html__( 'Main Image Border Color', 'shopbuilder' ),
4920 - 'tab' => 'styles',
4921 - 'type' => 'color',
4922 - 'dependency' => [
4923 - 'rules' => [
4924 - [
4925 - 'item' => 'modules.variation_gallery.gallery_style',
4926 - 'value' => 'grid',
4927 - 'operator' => '!=',
4928 - ],
4929 - ],
4930 - ],
4931 - ],
4932 - 'thumbnail_item_border_color' => [
4933 - 'id' => 'thumbnail_item_border_color',
4934 - 'label' => esc_html__( 'Thumbnail item Border Color', 'shopbuilder' ),
4935 - 'tab' => 'styles',
4936 - 'type' => 'color',
4937 - ],
4938 - 'thumbnail_active_border_color' => [
4939 - 'id' => 'thumbnail_active_border_color',
4940 - 'label' => esc_html__( 'Active Thumbnail Border Color', 'shopbuilder' ),
4941 - 'help' => esc_html__( 'Border color of the currently selected thumbnail.', 'shopbuilder' ),
4942 - 'tab' => 'styles',
4943 - 'type' => 'color',
4944 - ],
4945 - 'thumbnail_item_inner_padding' => [
4946 - 'id' => 'thumbnail_item_inner_padding',
4947 - 'type' => 'slider',
4948 - 'label' => esc_html__( 'Thumbnail Item Inner Padding', 'shopbuilder' ),
4949 - 'min' => 0,
4950 - 'max' => 30,
4951 - 'unit' => 'px',
4952 - 'value' => 10,
4953 - 'tab' => 'styles',
4954 - ],
4955 - 'thumbnail_item_border_radius' => [
4956 - 'id' => 'thumbnail_item_border_radius',
4957 - 'type' => 'slider',
4958 - 'label' => esc_html__( 'Thumbnail Item Border Radius', 'shopbuilder' ),
4959 - 'min' => 0,
4960 - 'max' => 30,
4961 - 'unit' => 'px',
4962 - 'value' => 5,
4963 - 'tab' => 'styles',
4964 - ],
4965 - ]
4966 - );
4967 - }
4968 -}
1 +<?php
2 +
3 +namespace RadiusTheme\SB\Models;
4 +
5 +use RadiusTheme\SB\Helpers\Fns;
6 +use RadiusTheme\SB\Models\Base\ListModel;
7 +use RadiusTheme\SB\Modules\Compare\Compare;
8 +use RadiusTheme\SB\Modules\Compare\CompareFns;
9 +use RadiusTheme\SB\Modules\QuickView\QuickView;
10 +use RadiusTheme\SB\Modules\WishList\Wishlist;
11 +use RadiusTheme\SB\Modules\WishList\WishlistFns;
12 +use RadiusTheme\SB\Traits\SingletonTrait;
13 +
14 +defined( 'ABSPATH' ) || exit;
15 +
16 +class ModuleList extends ListModel {
17 + use SingletonTrait;
18 +
19 + protected $list_id = 'modules';
20 +
21 + public function __construct() {
22 + parent::__construct();
23 + $this->title = esc_html__( 'Modules', 'shopbuilder' );
24 + $this->description = esc_html__( 'Here you can find the list of all the modules. You can individually enable or disable the modules. Or you can do that by one click.', 'shopbuilder' );
25 + $this->categories = [
26 + 'general' => [
27 + 'title' => esc_html__( 'Free', 'shopbuilder' ),
28 + ],
29 + /*
30 + * TODO:: Will add later
31 + 'pro' => array(
32 + 'title' => esc_html__( 'Pro', 'shopbuilder' ),
33 + ),
34 + */
35 + ];
36 + }
37 +
38 + protected function raw_list() {
39 + $list = [
40 + 'quick_view' => apply_filters(
41 + 'rtsb/module/quick_view/options',
42 + [
43 + 'id' => 'quick_view',
44 + 'title' => esc_html__( 'Quick View', 'shopbuilder' ),
45 + 'base_class' => QuickView::class,
46 + 'category' => 'general',
47 + 'active' => 'on',
48 + 'package' => 'free',
49 + 'active_field' => [
50 + 'label' => esc_html__( 'Enable Quick View?', 'shopbuilder' ),
51 + 'help' => esc_html__( 'Switch on to enable quick view module.', 'shopbuilder' ),
52 + ],
53 + 'fields' => apply_filters(
54 + 'rtsb/module/quick_view/fields',
55 + [
56 + 'loop_btn_position' => [
57 + 'id' => 'loop_btn_position',
58 + 'type' => 'select',
59 + 'value' => 'custom',
60 + 'label' => esc_html__( 'Shop Page Button Position', 'shopbuilder' ),
61 + 'help' => esc_html__( 'You can manage quick view button position in product list page.', 'shopbuilder' ),
62 + 'options' => [
63 + 'before_add_to_cart' => esc_html__( 'Before Add To Cart', 'shopbuilder' ),
64 + 'after_add_to_cart' => esc_html__( 'After Add To Cart', 'shopbuilder' ),
65 + 'top_thumbnail' => esc_html__( 'Top On Image', 'shopbuilder' ),
66 + 'shortcode' => esc_html__( 'Use Shortcode', 'shopbuilder' ),
67 + 'custom' => esc_html__( 'Custom Position', 'shopbuilder' ),
68 + ],
69 + ],
70 + 'loop_btn_position_shortcode' => [
71 + 'type' => 'raw',
72 + 'label' => ' ',
73 + 'html' => sprintf(
74 + /* translators: 1: The shortcode.*/
75 + esc_html__( 'Choose where to show button in WooCommerce product\'s loop. Copy this shortcode %1$s and paste it where you want to show the button.', 'shopbuilder' ),
76 + '<code>[rtsb_quick_view_button]</code>'
77 + ),
78 + 'dependency' => [
79 + 'rules' => [
80 + [
81 + 'item' => 'modules.quick_view.loop_btn_position',
82 + 'value' => 'shortcode',
83 + 'operator' => '==',
84 + ],
85 + ],
86 + ],
87 + ],
88 + 'loop_custom_hook_name' => [
89 + 'id' => 'loop_custom_hook_name',
90 + 'type' => 'text',
91 + 'label' => esc_html__( 'Loop Hook Name', 'shopbuilder' ),
92 + 'dependency' => [
93 + 'rules' => [
94 + [
95 + 'item' => 'modules.quick_view.loop_btn_position',
96 + 'value' => 'custom',
97 + 'operator' => '==',
98 + ],
99 + ],
100 + ],
101 + ],
102 + 'loop_custom_hook_priority' => [
103 + 'id' => 'loop_custom_hook_priority',
104 + 'type' => 'number',
105 + 'value' => 10,
106 + 'size' => 'small',
107 + 'min' => 0,
108 + 'max' => 999,
109 + 'label' => esc_html__( 'Loop Hook Priority', 'shopbuilder' ),
110 + 'dependency' => [
111 + 'rules' => [
112 + [
113 + 'item' => 'modules.quick_view.loop_btn_position',
114 + 'value' => 'custom',
115 + 'operator' => '==',
116 + ],
117 + ],
118 + ],
119 + ],
120 + 'button_text' => [
121 + 'id' => 'button_text',
122 + 'label' => esc_html__( 'Quick View Text', 'shopbuilder' ),
123 + 'help' => esc_html__( 'Enter your quick view button text.', 'shopbuilder' ),
124 + 'type' => 'text',
125 + 'value' => 'Quick view',
126 + 'placeholder' => 'Quick view',
127 + ],
128 + ]
129 + ),
130 + ]
131 + ),
132 + 'wishlist' => apply_filters(
133 + 'rtsb/module/wishlist/options',
134 + [
135 + 'id' => 'wishlist',
136 + 'title' => esc_html__( 'Wishlist', 'shopbuilder' ),
137 + 'package' => 'free',
138 + 'active' => 'on',
139 + 'base_class' => Wishlist::class,
140 + 'category' => 'general',
141 + 'active_field' => [
142 + 'label' => esc_html__( 'Enable Wishlist?', 'shopbuilder' ),
143 + 'help' => esc_html__( 'Switch on to enable wishlist module.', 'shopbuilder' ),
144 + ],
145 + 'fields' => apply_filters(
146 + 'rtsb/module/wishlist/fields',
147 + [
148 + 'enable_login_limit' => [
149 + 'id' => 'enable_login_limit',
150 + 'type' => 'switch',
151 + 'label' => esc_html__( 'Limit Wishlist Use', 'shopbuilder' ),
152 + 'help' => esc_html__( 'Enable this option to allow only the logged-in users to use the Wishlist feature.', 'shopbuilder' ),
153 + 'tab' => 'general',
154 + ],
155 + 'show_btn_on_loop' => [
156 + 'id' => 'show_btn_on_loop',
157 + 'value' => 'on',
158 + 'type' => 'switch',
159 + 'label' => esc_html__( 'Show Button in Product List', 'shopbuilder' ),
160 + 'tab' => 'button',
161 + ],
162 + 'loop_btn_position' => [
163 + 'id' => 'loop_btn_position',
164 + 'type' => 'select',
165 + 'value' => 'custom',
166 + 'label' => esc_html__( 'Shop Page Button Position', 'shopbuilder' ),
167 + 'help' => esc_html__( 'You can manage wishlist button position in product list page.', 'shopbuilder' ),
168 + 'options' => [
169 + 'before_add_to_cart' => esc_html__( 'Before Add To Cart', 'shopbuilder' ),
170 + 'after_add_to_cart' => esc_html__( 'After Add To Cart', 'shopbuilder' ),
171 + 'top_thumbnail' => esc_html__( 'Top On Image', 'shopbuilder' ),
172 + 'shortcode' => esc_html__( 'Use Shortcode', 'shopbuilder' ),
173 + 'custom' => esc_html__( 'Custom Position', 'shopbuilder' ),
174 + ],
175 + 'dependency' => [
176 + 'rules' => [
177 + [
178 + 'item' => 'modules.wishlist.show_btn_on_loop',
179 + 'value' => 'on',
180 + 'operator' => '==',
181 + ],
182 + ],
183 + ],
184 + 'tab' => 'button',
185 + ],
186 + 'loop_btn_position_shortcode' => [
187 + 'type' => 'raw',
188 + 'label' => ' ',
189 + 'html' => sprintf(
190 + /* translators: 1: The shortcode.*/
191 + esc_html__( 'Choose where to show button in WooCommerce product\'s loop. Copy this shortcode %1$s and paste it where you want to show the button.', 'shopbuilder' ),
192 + '<code>[rtsb_wishlist_button]</code>'
193 + ),
194 + 'dependency' => [
195 + 'rules' => [
196 + [
197 + 'item' => 'modules.wishlist.show_btn_on_loop',
198 + 'value' => 'on',
199 + 'operator' => '==',
200 + ],
201 + [
202 + 'item' => 'modules.wishlist.loop_btn_position',
203 + 'value' => 'shortcode',
204 + 'operator' => '==',
205 + ],
206 + ],
207 + ],
208 + 'tab' => 'button',
209 + ],
210 + 'loop_custom_hook_name' => [
211 + 'id' => 'loop_custom_hook_name',
212 + 'type' => 'text',
213 + 'label' => esc_html__( 'Loop Hook Name', 'shopbuilder' ),
214 + 'tab' => 'button',
215 + 'dependency' => [
216 + 'rules' => [
217 + [
218 + 'item' => 'modules.wishlist.show_btn_on_loop',
219 + 'value' => 'on',
220 + 'operator' => '==',
221 + ],
222 + [
223 + 'item' => 'modules.wishlist.loop_btn_position',
224 + 'value' => 'custom',
225 + 'operator' => '==',
226 + ],
227 + ],
228 + ],
229 + ],
230 + 'loop_custom_hook_priority' => [
231 + 'id' => 'loop_custom_hook_priority',
232 + 'type' => 'number',
233 + 'value' => 10,
234 + 'size' => 'small',
235 + 'min' => 0,
236 + 'max' => 999,
237 + 'label' => esc_html__( 'Loop Hook Priority', 'shopbuilder' ),
238 + 'tab' => 'button',
239 + 'dependency' => [
240 + 'rules' => [
241 + [
242 + 'item' => 'modules.wishlist.show_btn_on_loop',
243 + 'value' => 'on',
244 + 'operator' => '==',
245 + ],
246 + [
247 + 'item' => 'modules.wishlist.loop_btn_position',
248 + 'value' => 'custom',
249 + 'operator' => '==',
250 + ],
251 + ],
252 + 'relation' => 'and',
253 + ],
254 + ],
255 + 'show_btn_product_page' => [
256 + 'id' => 'show_btn_product_page',
257 + 'value' => 'on',
258 + 'type' => 'switch',
259 + 'label' => esc_html__( 'Show Button in Single Product Page', 'shopbuilder' ),
260 + 'tab' => 'button',
261 + ],
262 + 'product_btn_position' => [
263 + 'id' => 'product_btn_position',
264 + 'label' => esc_html__( 'Product Page Button Position', 'shopbuilder' ),
265 + 'help' => esc_html__( 'You can manage compare button position in single product page.', 'shopbuilder' ),
266 + 'type' => 'select',
267 + 'value' => 'custom',
268 + 'options' => [
269 + 'before_add_to_cart' => esc_html__( 'Before Add To Cart', 'shopbuilder' ),
270 + 'after_add_to_cart' => esc_html__( 'After Add To Cart', 'shopbuilder' ),
271 + 'after_thumbnail' => esc_html__( 'After Image', 'shopbuilder' ),
272 + 'after_summary' => esc_html__( 'After Summary', 'shopbuilder' ),
273 + 'shortcode' => esc_html__( 'Use Shortcode', 'shopbuilder' ),
274 + 'custom' => esc_html__( 'Custom Position', 'shopbuilder' ),
275 + ],
276 + 'dependency' => [
277 + 'rules' => [
278 + [
279 + 'item' => 'modules.wishlist.show_btn_product_page',
280 + 'value' => 'on',
281 + 'operator' => '==',
282 + ],
283 + ],
284 + ],
285 + 'tab' => 'button',
286 + ],
287 + 'product_btn_position_shortcode' => [
288 + 'type' => 'raw',
289 + 'label' => ' ',
290 + 'html' => sprintf(
291 + /* translators: 1: The shortcode.*/
292 + 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' ),
293 + '<code>[rtsb_wishlist_button]</code>'
294 + ),
295 + 'dependency' => [
296 + 'rules' => [
297 + [
298 + 'item' => 'modules.wishlist.show_btn_product_page',
299 + 'value' => 'on',
300 + 'operator' => '==',
301 + ],
302 + [
303 + 'item' => 'modules.wishlist.product_btn_position',
304 + 'value' => 'shortcode',
305 + 'operator' => '==',
306 + ],
307 + ],
308 + ],
309 + 'tab' => 'button',
310 + ],
311 + 'product_custom_hook_name' => [
312 + 'id' => 'product_custom_hook_name',
313 + 'type' => 'text',
314 + 'label' => esc_html__( 'Product Hook Name', 'shopbuilder' ),
315 + 'tab' => 'button',
316 + 'dependency' => [
317 + 'rules' => [
318 + [
319 + 'item' => 'modules.wishlist.show_btn_product_page',
320 + 'value' => 'on',
321 + 'operator' => '==',
322 + ],
323 + [
324 + 'item' => 'modules.wishlist.product_btn_position',
325 + 'value' => 'custom',
326 + 'operator' => '==',
327 + ],
328 + ],
329 + ],
330 + ],
331 + 'product_custom_hook_priority' => [
332 + 'id' => 'product_custom_hook_priority',
333 + 'type' => 'number',
334 + 'value' => 10,
335 + 'size' => 'small',
336 + 'min' => 0,
337 + 'max' => 999,
338 + 'label' => esc_html__( 'Product Hook Priority', 'shopbuilder' ),
339 + 'tab' => 'button',
340 + 'dependency' => [
341 + 'rules' => [
342 + [
343 + 'item' => 'modules.wishlist.show_btn_product_page',
344 + 'value' => 'on',
345 + 'operator' => '==',
346 + ],
347 + [
348 + 'item' => 'modules.wishlist.product_btn_position',
349 + 'value' => 'custom',
350 + 'operator' => '==',
351 + ],
352 + ],
353 + 'relation' => 'and',
354 + ],
355 + ],
356 + 'button_text' => [
357 + 'id' => 'button_text',
358 + 'label' => esc_html__( 'Add to Wishlist Text', 'shopbuilder' ),
359 + 'help' => esc_html__( 'Enter your wishlist button text.', 'shopbuilder' ),
360 + 'type' => 'text',
361 + 'value' => 'Add to wishlist',
362 + 'placeholder' => 'Add to wishlist',
363 + 'tab' => 'button',
364 + ],
365 + 'notice_added_text' => [
366 + 'id' => 'notice_added_text',
367 + 'label' => esc_html__( 'Product Added Text', 'shopbuilder' ),
368 + 'help' => esc_html__( 'Enter the product added text.', 'shopbuilder' ),
369 + 'type' => 'text',
370 + 'value' => 'Product added!',
371 + 'placeholder' => 'Product added!',
372 + 'tab' => 'button',
373 + ],
374 + 'notice_removed_text' => [
375 + 'id' => 'notice_removed_text',
376 + 'label' => esc_html__( 'Product Removed Text', 'shopbuilder' ),
377 + 'help' => esc_html__( 'Enter the product removed text.', 'shopbuilder' ),
378 + 'type' => 'text',
379 + 'value' => 'Product removed!',
380 + 'placeholder' => 'Product removed!',
381 + 'tab' => 'button',
382 + ],
383 + 'browse_list_text' => [
384 + 'id' => 'browse_list_text',
385 + 'label' => esc_html__( 'Browse Wishlist Text', 'shopbuilder' ),
386 + 'help' => esc_html__( 'Enter a text for the "Browse wishlist" link on the product page', 'shopbuilder' ),
387 + 'type' => 'text',
388 + 'value' => 'Browse wishlist',
389 + 'placeholder' => 'Browse wishlist',
390 + 'tab' => 'button',
391 + ],
392 + /*
393 + 'notice_exist_text' => array(
394 + 'id' => 'notice_exist_text',
395 + 'label' => esc_html__( 'Product Already Exist in Wishlist Text', 'shopbuilder' ),
396 + 'help' => esc_html__( 'Enter the message for "already exists in the wishlist" text.', 'shopbuilder' ),
397 + 'type' => 'text',
398 + 'value' => 'The product is already in your wishlist!',
399 + 'placeholder' => 'The product is already in your wishlist!',
400 + 'tab' => 'button',
401 + ),
402 + */
403 + /*
404 + * TODO:: Will Implement Later.
405 + 'redirect_cart' => array(
406 + 'id' => 'redirect_cart',
407 + 'type' => 'switch',
408 + 'help' => esc_html__( 'Redirect users to the cart page when they add a product to the cart from the wishlist page', 'shopbuilder' ),
409 + 'label' => esc_html__( 'Redirect to Cart', 'shopbuilder' ),
410 + 'tab' => 'page',
411 + ),
412 + 'remove_after_add_to_cart' => array(
413 + 'value' => 'on',
414 + 'id' => 'remove_after_add_to_cart',
415 + 'type' => 'switch',
416 + 'help' => esc_html__( 'Remove the product from the wishlist after it has been added to the cart', 'shopbuilder' ),
417 + 'label' => esc_html__( 'Remove if Added to Cart', 'shopbuilder' ),
418 + 'tab' => 'page',
419 + ),
420 + */
421 + 'page_show_fields' => [
422 + 'value' => WishlistFns::instance()->get_field_ids(),
423 + 'id' => 'page_show_fields',
424 + 'multiple' => true,
425 + 'checkbox' => true,
426 + 'sanitize_fn' => 'sanitize_text_field',
427 + 'type' => 'sortable',
428 + 'options' => WishlistFns::instance()->get_default_fields(),
429 + 'label' => esc_html__( 'Show Fields in Table', 'shopbuilder' ),
430 + 'tab' => 'page',
431 + ],
432 +
433 + ]
434 + ),
435 + 'tabs' => [
436 + 'general' => [
437 + 'title' => esc_html__( 'General', 'shopbuilder' ),
438 + ],
439 + 'button' => [
440 + 'title' => esc_html__( 'Button', 'shopbuilder' ),
441 + ],
442 + 'page' => [
443 + 'title' => esc_html__( 'Page', 'shopbuilder' ),
444 + ],
445 +
446 + ],
447 + ]
448 + ),
449 + 'compare' => apply_filters(
450 + 'rtsb/module/compare/options',
451 + [
452 + 'id' => 'compare',
453 + 'base_class' => Compare::class,
454 + 'category' => 'general',
455 + 'title' => esc_html__( 'Product Compare', 'shopbuilder' ),
456 + 'package' => 'free',
457 + 'active' => 'on',
458 + 'active_field' => [
459 + 'label' => esc_html__( 'Enable Product Comparison?', 'shopbuilder' ),
460 + 'help' => esc_html__( 'Switch on to enable product comparison module.', 'shopbuilder' ),
461 + ],
462 + 'fields' => apply_filters(
463 + 'rtsb/module/compare/fields',
464 + [
465 + 'show_btn_on_loop' => [
466 + 'id' => 'show_btn_on_loop',
467 + 'value' => 'on',
468 + 'type' => 'switch',
469 + 'label' => esc_html__( 'Show In Archive Page or Any Products Loop', 'shopbuilder' ),
470 + 'tab' => 'button',
471 + ],
472 + 'loop_btn_position' => [
473 + 'id' => 'loop_btn_position',
474 + 'type' => 'select',
475 + 'value' => 'custom',
476 + 'label' => esc_html__( 'Shop Page Button Position', 'shopbuilder' ),
477 + 'help' => esc_html__( 'You can manage wishlist button position in product list page.', 'shopbuilder' ),
478 + 'options' => [
479 + 'before_add_to_cart' => esc_html__( 'Before Add To Cart', 'shopbuilder' ),
480 + 'after_add_to_cart' => esc_html__( 'After Add To Cart', 'shopbuilder' ),
481 + 'top_thumbnail' => esc_html__( 'Top On Image', 'shopbuilder' ),
482 + 'shortcode' => esc_html__( 'Use Shortcode', 'shopbuilder' ),
483 + 'custom' => esc_html__( 'Custom Position', 'shopbuilder' ),
484 + ],
485 + 'dependency' => [
486 + 'rules' => [
487 + [
488 + 'item' => 'modules.compare.show_btn_on_loop',
489 + 'value' => 'on',
490 + 'operator' => '==',
491 + ],
492 + ],
493 + ],
494 + 'tab' => 'button',
495 + ],
496 + 'loop_btn_position_shortcode' => [
497 + 'type' => 'raw',
498 + 'label' => ' ',
499 + 'html' => sprintf(
500 + /* translators: 1: The shortcode.*/
501 + esc_html__( 'Choose where to show button in WooCommerce product\'s loop. Copy this shortcode %1$s and paste it where you want to show the button.', 'shopbuilder' ),
502 + '<code>[rtsb_compare_button]</code>'
503 + ),
504 + 'dependency' => [
505 + 'rules' => [
506 + [
507 + 'item' => 'modules.compare.show_btn_on_loop',
508 + 'value' => 'on',
509 + 'operator' => '==',
510 + ],
511 + [
512 + 'item' => 'modules.compare.loop_btn_position',
513 + 'value' => 'shortcode',
514 + 'operator' => '==',
515 + ],
516 + ],
517 + ],
518 + 'tab' => 'button',
519 + ],
520 + 'loop_custom_hook_name' => [
521 + 'id' => 'product_custom_hook_name',
522 + 'type' => 'text',
523 + 'label' => esc_html__( 'Product Hook Name', 'shopbuilder' ),
524 + 'tab' => 'button',
525 + 'dependency' => [
526 + 'rules' => [
527 + [
528 + 'item' => 'modules.compare.show_btn_on_loop',
529 + 'value' => 'on',
530 + 'operator' => '==',
531 + ],
532 + [
533 + 'item' => 'modules.compare.loop_btn_position',
534 + 'value' => 'custom',
535 + 'operator' => '==',
536 + ],
537 + ],
538 + ],
539 + ],
540 + 'loop_custom_hook_priority' => [
541 + 'id' => 'product_custom_hook_priority',
542 + 'type' => 'number',
543 + 'value' => 10,
544 + 'size' => 'small',
545 + 'min' => 0,
546 + 'max' => 999,
547 + 'label' => esc_html__( 'Product Hook Priority', 'shopbuilder' ),
548 + 'tab' => 'button',
549 + 'dependency' => [
550 + 'rules' => [
551 + [
552 + 'item' => 'modules.compare.show_btn_on_loop',
553 + 'value' => 'on',
554 + 'operator' => '==',
555 + ],
556 + [
557 + 'item' => 'modules.compare.loop_btn_position',
558 + 'value' => 'custom',
559 + 'operator' => '==',
560 + ],
561 + ],
562 + 'relation' => 'and',
563 + ],
564 + ],
565 + 'show_btn_product_page' => [
566 + 'id' => 'show_btn_product_page',
567 + 'type' => 'switch',
568 + 'value' => 'on',
569 + 'label' => esc_html__( 'Show Button in Single Product Page', 'shopbuilder' ),
570 + 'tab' => 'button',
571 + ],
572 + 'product_btn_position' => [
573 + 'id' => 'product_btn_position',
574 + 'label' => esc_html__( 'Product Page Button Position', 'shopbuilder' ),
575 + 'help' => esc_html__( 'You can manage compare button position in single product page.', 'shopbuilder' ),
576 + 'type' => 'select',
577 + 'value' => 'custom',
578 + 'options' => [
579 + 'before_add_to_cart' => esc_html__( 'Before Add To Cart', 'shopbuilder' ),
580 + 'after_add_to_cart' => esc_html__( 'After Add To Cart', 'shopbuilder' ),
581 + 'after_thumbnail' => esc_html__( 'After Image', 'shopbuilder' ),
582 + 'after_summary' => esc_html__( 'After Summary', 'shopbuilder' ),
583 + 'shortcode' => esc_html__( 'Use Shortcode', 'shopbuilder' ),
584 + 'custom' => esc_html__( 'Custom Position', 'shopbuilder' ),
585 + ],
586 + 'dependency' => [
587 + 'rules' => [
588 + [
589 + 'item' => 'modules.compare.show_btn_product_page',
590 + 'value' => 'on',
591 + 'operator' => '==',
592 + ],
593 + ],
594 + ],
595 + 'tab' => 'button',
596 + ],
597 + 'product_btn_position_shortcode' => [
598 + 'type' => 'raw',
599 + 'label' => ' ',
600 + 'html' => sprintf(
601 + /* translators: 1: The shortcode.*/
602 + 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' ),
603 + '<code>[rtsb_wishlist_button]</code> '
604 + ),
605 + 'dependency' => [
606 + 'rules' => [
607 + [
608 + 'item' => 'modules.wishlist.show_btn_product_page',
609 + 'value' => 'on',
610 + 'operator' => '==',
611 + ],
612 + [
613 + 'item' => 'modules.wishlist.product_btn_position',
614 + 'value' => 'shortcode',
615 + 'operator' => '==',
616 + ],
617 + ],
618 + ],
619 + 'tab' => 'button',
620 + ],
621 + 'product_custom_hook_name' => [
622 + 'id' => 'product_custom_hook_name',
623 + 'type' => 'text',
624 + 'label' => esc_html__( 'Product Hook Name', 'shopbuilder' ),
625 + 'tab' => 'button',
626 + 'dependency' => [
627 + 'rules' => [
628 + [
629 + 'item' => 'modules.compare.show_btn_product_page',
630 + 'value' => 'on',
631 + 'operator' => '==',
632 + ],
633 + [
634 + 'item' => 'modules.compare.product_btn_position',
635 + 'value' => 'custom',
636 + 'operator' => '==',
637 + ],
638 + ],
639 + ],
640 + ],
641 + 'product_custom_hook_priority' => [
642 + 'id' => 'product_custom_hook_priority',
643 + 'type' => 'number',
644 + 'value' => 10,
645 + 'size' => 'small',
646 + 'min' => 0,
647 + 'max' => 999,
648 + 'label' => esc_html__( 'Product Hook Priority', 'shopbuilder' ),
649 + 'tab' => 'button',
650 + 'dependency' => [
651 + 'rules' => [
652 + [
653 + 'item' => 'modules.compare.show_btn_product_page',
654 + 'value' => 'on',
655 + 'operator' => '==',
656 + ],
657 + [
658 + 'item' => 'modules.compare.product_btn_position',
659 + 'value' => 'custom',
660 + 'operator' => '==',
661 + ],
662 + ],
663 + 'relation' => 'and',
664 + ],
665 + ],
666 + 'button_text' => [
667 + 'id' => 'button_text',
668 + 'label' => esc_html__( 'Button Text', 'shopbuilder' ),
669 + 'help' => esc_html__( 'Enter your compare button text.', 'shopbuilder' ),
670 + 'type' => 'text',
671 + 'value' => 'Compare',
672 + 'placeholder' => 'Compare',
673 + 'tab' => 'button',
674 + ],
675 + 'notice_added_text' => [
676 + 'id' => 'notice_added_text',
677 + 'label' => esc_html__( 'Product Added Text', 'shopbuilder' ),
678 + 'help' => esc_html__( 'Enter the product added text.', 'shopbuilder' ),
679 + 'type' => 'text',
680 + 'value' => 'Product added!',
681 + 'placeholder' => 'Product added!',
682 + 'tab' => 'button',
683 + ],
684 + 'browse_list_text' => [
685 + 'id' => 'browse_list_text',
686 + 'label' => esc_html__( 'Browse Compare Text', 'shopbuilder' ),
687 + 'help' => esc_html__( 'Enter a text for the "Browse compare" link on the compare page', 'shopbuilder' ),
688 + 'type' => 'text',
689 + 'value' => 'Browse compare',
690 + 'placeholder' => 'Browse compare',
691 + 'tab' => 'button',
692 + ],
693 + 'notice_removed_text' => [
694 + 'id' => 'notice_removed_text',
695 + 'label' => esc_html__( 'Product Removed Text', 'shopbuilder' ),
696 + 'help' => esc_html__( 'Enter the product removed text.', 'shopbuilder' ),
697 + 'type' => 'text',
698 + 'value' => 'Product removed!',
699 + 'placeholder' => 'Product removed!',
700 + 'tab' => 'button',
701 + ],
702 + 'page' => [
703 + 'id' => 'page',
704 + 'type' => 'select',
705 + 'help' => sprintf(
706 + /* translators: 1: The shortcode.*/
707 + esc_html__( 'Select a page for compare page and make sure you add the shortcode %1$s into the page content', 'shopbuilder' ),
708 + '<code>[rtsb_compare_list]</code>'
709 + ),
710 + 'label' => esc_html__( 'Compare Page', 'shopbuilder' ),
711 + 'options' => Fns::get_pages(),
712 + 'empty' => esc_html__( 'Select a page', 'shopbuilder' ),
713 + 'searchable' => true,
714 + 'tab' => 'page',
715 + ],
716 + 'max_limit' => [
717 + 'id' => 'page',
718 + 'type' => 'number',
719 + 'sanitize_fn' => 'absint',
720 + 'value' => 10,
721 + 'help' => esc_html__( 'You can manage your maximum compare quantity from here.', 'shopbuilder' ),
722 + 'label' => esc_html__( 'Max Limit', 'shopbuilder' ),
723 + 'tab' => 'page',
724 + ],
725 + 'page_show_fields' => [
726 + 'value' => CompareFns::get_list_field_ids(),
727 + 'id' => 'page_show_fields',
728 + 'multiple' => true,
729 + 'checkbox' => true,
730 + 'type' => 'sortable',
731 + 'options' => CompareFns::get_available_list_fields(),
732 + 'label' => esc_html__( 'Show Fields in List', 'shopbuilder' ),
733 + 'tab' => 'page',
734 + ],
735 +
736 + ]
737 + ),
738 + 'tabs' => [
739 + 'button' => [
740 + 'title' => esc_html__( 'Button', 'shopbuilder' ),
741 + ],
742 + 'page' => [
743 + 'title' => esc_html__( 'Page', 'shopbuilder' ),
744 + ],
745 +
746 + ],
747 + ]
748 + ),
749 + 'variation_gallery' => apply_filters(
750 + 'rtsb/module/variation_gallery/options',
751 + [
752 + 'id' => 'variation_gallery',
753 + 'external' => true,
754 + 'category' => 'general',
755 + 'title' => esc_html__( 'Variation Gallery', 'shopbuilder' ),
756 + 'pluginSlug' => 'woo-product-variation-gallery',
757 + 'pluginIsInstalled' => Fns::check_plugin_installed( 'woo-product-variation-gallery/woo-product-variation-gallery.php' ),
758 + 'pluginIsActive' => Fns::check_plugin_active( 'woo-product-variation-gallery/woo-product-variation-gallery.php' ),
759 + 'pluginActiveUrl' => add_query_arg(
760 + [
761 + '_wpnonce' => wp_create_nonce( 'activate-plugin_woo-product-variation-gallery/woo-product-variation-gallery.php' ),
762 + 'action' => 'activate',
763 + 'plugin' => 'woo-product-variation-gallery/woo-product-variation-gallery.php',
764 + ],
765 + admin_url( 'plugins.php' )
766 + ),
767 + 'help' => esc_html__( 'This module requires: Variation Images Gallery for WooCommerce Plugin', 'shopbuilder' ),
768 + 'package' => 'free',
769 + 'active_field' => [
770 + 'disable' => false,
771 + ],
772 + 'fields' => [],
773 + ]
774 + ),
775 + 'variation_swatches' => apply_filters(
776 + 'rtsb/module/variation_swatches/options',
777 + [
778 + 'id' => 'variation_swatches',
779 + 'external' => true,
780 + 'category' => 'general',
781 + 'title' => esc_html__( 'Variation Swatches', 'shopbuilder' ),
782 + 'pluginSlug' => 'woo-product-variation-swatches',
783 + 'pluginIsInstalled' => Fns::check_plugin_installed( 'woo-product-variation-swatches/woo-product-variation-swatches.php' ),
784 + 'pluginIsActive' => Fns::check_plugin_active( 'woo-product-variation-swatches/woo-product-variation-swatches.php' ),
785 + 'pluginActiveUrl' => add_query_arg(
786 + [
787 + '_wpnonce' => wp_create_nonce( 'activate-plugin_woo-product-variation-swatches/woo-product-variation-swatches.php' ),
788 + 'action' => 'activate',
789 + 'plugin' => 'woo-product-variation-swatches/woo-product-variation-swatches.php',
790 + ],
791 + admin_url( 'plugins.php' )
792 + ),
793 + 'help' => esc_html__( 'This module requires: Variation Swatches for WooCommerce Plugin.', 'shopbuilder' ),
794 + 'package' => 'free',
795 + 'active_field' => [
796 + 'disable' => false,
797 + ],
798 + 'fields' => [],
799 + ]
800 + ),
801 + 'quick_checkout' => apply_filters(
802 + 'rtsb/module/quick_checkout/options',
803 + [
804 + 'id' => 'quick_checkout',
805 + 'base_class' => QuickCheckout::class,
806 + 'category' => 'pro',
807 + 'title' => esc_html__( 'Quick Checkout', 'shopbuilder' ),
808 + 'package' => 'pro-disabled',
809 + 'active_field' => [
810 + 'label' => esc_html__( 'Enable Quick Checkout?', 'shopbuilder' ),
811 + 'help' => esc_html__( 'Switch on to enable quick checkout module.', 'shopbuilder' ),
812 + ],
813 + 'fields' => [],
814 + ]
815 + ),
816 + 'mini_cart' => apply_filters(
817 + 'rtsb/module/mini_cart/options',
818 + [
819 + 'id' => 'mini_cart',
820 + 'base_class' => MiniCart::class,
821 + 'category' => 'pro',
822 + 'title' => esc_html__( 'Mini Cart', 'shopbuilder' ),
823 + 'package' => 'pro-disabled',
824 + 'active_field' => [
825 + 'label' => esc_html__( 'Enable Mini Cart?', 'shopbuilder' ),
826 + 'help' => esc_html__( 'Switch on to enable mini cart module.', 'shopbuilder' ),
827 + ],
828 + 'fields' => [],
829 + ]
830 + ),
831 + ];
832 +
833 + return apply_filters( 'rtsb/core/modules/raw_list', $list );
834 + }
835 +}