PluginProbe
ShopBuilder – WooCommerce Builder For Elementor / 1.1.3
ShopBuilder – WooCommerce Builder For Elementor v1.1.3
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
shopbuilder / app / Models / GeneralList.php

GeneralList.php in ShopBuilder – WooCommerce Builder For Elementor 1.1.3, at app/Models/GeneralList.php

1,304 lines 70.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace RadiusTheme\SB\Models;
4
5 // use RadiusTheme\SB\Helpers\Fns;
6 use RadiusTheme\SB\Elementor\Helper\ControlHelper;
7 use RadiusTheme\SB\Helpers\Fns;
8 use RadiusTheme\SB\Models\Base\ListModel;
9 use RadiusTheme\SB\Traits\SingletonTrait;
10
11 defined( 'ABSPATH' ) || exit;
12
13 /**
14 * General Settings.
15 */
16 class GeneralList extends ListModel {
17 /**
18 * Singleton
19 */
20 use SingletonTrait;
21
22 /**
23 * List Id
24 *
25 * @var string
26 */
27 protected $list_id = 'general';
28
29 /**
30 * Constructor
31 */
32 public function __construct() {
33 parent::__construct();
34 $this->title = esc_html__( 'Global Settings', 'shopbuilder' );
35 $this->description = esc_html__( 'ShopBuilder global settings for various elements.', 'shopbuilder' );
36 $this->categories = [
37 'general' => [
38 'title' => esc_html__( 'General', 'shopbuilder' ),
39 ],
40
41 'checkout' => [
42 'title' => esc_html__( 'Checkout Page', 'shopbuilder' ),
43 ],
44
45 ];
46 }
47
48 /**
49 * Package
50 *
51 * @return array
52 */
53 protected function raw_list() {
54 $list = [
55 'notification' => apply_filters(
56 'rtsb/settings/notification/options',
57 [
58 'id' => 'notification',
59 'category' => 'general',
60 'title' => esc_html__( 'Notification Settings', 'shopbuilder' ),
61 'package' => 'free',
62 'active_field' => [
63 'disable' => true,
64 ],
65 'fields' => [
66 'notification_position' => array(
67 'id' => 'notification_position',
68 'value' => 'center-center',
69 'type' => 'select',
70 'label' => esc_html__( 'Notification Position', 'shopbuilder' ),
71 'options' => array(
72 'center-center' => esc_html__( 'Center Center', 'shopbuilder' ),
73 'top-right' => esc_html__( 'Top Right', 'shopbuilder' ),
74 'bottom-right' => esc_html__( 'Bottom Right', 'shopbuilder' ),
75 'bottom-left' => esc_html__( 'Bottom Left', 'shopbuilder' ),
76 'top-left' => esc_html__( 'Top Left', 'shopbuilder' ),
77 'top-full-width' => esc_html__( 'Top Full Width', 'shopbuilder' ),
78 'bottom-full-width' => esc_html__( 'Bottom Full Width', 'shopbuilder' ),
79 'top-center' => esc_html__( 'Top center', 'shopbuilder' ),
80 'bottom-center' => esc_html__( 'Bottom center', 'shopbuilder' ),
81 ),
82 ),
83
84 ],
85 ],
86 ),
87 'social_share' => apply_filters(
88 'rtsb/settings/social_share/options',
89 [
90 'id' => 'social_share',
91 'category' => 'general',
92 'title' => esc_html__( 'Social Share Settings', 'shopbuilder' ),
93 'package' => 'free',
94 'active_field' => [
95 'disable' => true,
96 ],
97 'fields' => [
98 'share_platforms' => [
99 'id' => 'share_platforms',
100 'label' => esc_html__( 'Select Social Sharing Platforms', 'shopbuilder' ),
101 'type' => 'checkbox',
102 'orientation' => 'vertical',
103 'value' => [ 'facebook', 'twitter', 'linkedin' ],
104 'options' => Fns::social_share_platforms_list(),
105 ],
106 'share_platforms_to_product_page' => array(
107 'id' => 'share_platforms_to_product_page',
108 'type' => 'switch',
109 'label' => esc_html__( 'Sharing Button in Single Product Page', 'shopbuilder' ),
110 'help' => esc_html__( 'Enable this option to allow share a product from product page. Woocommerce Supported Sharing plugins added to Hook: woocommerce_share', 'shopbuilder' ),
111 ),
112 /*
113 * TODO : Implement later.
114 'share_icon_show_to_product_page' => array(
115 'id' => 'share_icon_show_to_product_page',
116 'type' => 'switch',
117 'label' => esc_html__( 'Sharing Icon in Single Product Page', 'shopbuilder' ),
118 'dependency' => [
119 'rules' => [
120 [
121 'item' => 'general.social_share.share_platforms_to_product_page',
122 'value' => 'on',
123 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
124 ],
125 ],
126 ],
127 ),
128 */
129 'share_icon_layout' => array(
130 'type' => 'select',
131 'value' => 'share-layout1',
132 'label' => esc_html__( 'Share Button Layout', 'shopbuilder' ),
133 'options' => [
134 'share-layout1' => esc_html__( 'Layout 1', 'shopbuilder' ),
135 'share-layout2' => esc_html__( 'Layout 2', 'shopbuilder' )
136 ],
137 'dependency' => [
138 'rules' => [
139 [
140 'item' => 'general.social_share.share_platforms_to_product_page',
141 'value' => 'on',
142 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
143 ],
144 ],
145 ],
146 ),
147 ],
148 ],
149 ),
150 'billing_form' => apply_filters(
151 'rtsb/settings/billing_form/options',
152 [
153 'id' => 'billing_form',
154 'category' => 'checkout',
155 'title' => esc_html__( 'Billing Form Settings', 'shopbuilder' ),
156 'package' => 'free',
157 'active_field' => [
158 'label' => esc_html__( 'Enable Billing form settings?', 'shopbuilder' ),
159 'help' => esc_html__( 'Switch on to Billing form settings.', 'shopbuilder' ),
160 ],
161 'fields' => [
162 'billing_first_name' => [
163 'id' => 'billing_first_name',
164 'label' => esc_html__( 'First name', 'shopbuilder' ),
165 'type' => 'checkbox',
166 'orientation' => 'vertical',
167 'value' => [ 'show', 'required' ],
168 'options' => [
169 [
170 'value' => 'show',
171 'label' => 'Show First name?',
172 ],
173 [
174 'value' => 'required',
175 'label' => 'Required Field',
176 ],
177 ],
178 // 'tab' => 'name',
179 ],
180 'billing_first_name_label' => [
181 'id' => 'billing_first_name_label',
182 'label' => esc_html__( 'First name Label', 'shopbuilder' ),
183 'type' => 'text',
184 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
185 // 'tab' => 'name',
186 'dependency' => [
187 'rules' => [
188 [
189 'item' => 'general.billing_form.billing_first_name',
190 'value' => 'show',
191 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
192 ],
193 ],
194 ],
195 ],
196 'billing_first_name_placeholder' => [
197 'id' => 'billing_first_name_placeholder',
198 'label' => esc_html__( 'First name Placeholder', 'shopbuilder' ),
199 'type' => 'text',
200 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
201 // 'tab' => 'country',
202 'dependency' => [
203 'rules' => [
204 [
205 'item' => 'general.billing_form.billing_first_name',
206 'value' => 'show',
207 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
208 ],
209 ],
210 ],
211 ],
212
213 'billing_last_name' => [
214 'id' => 'billing_last_name',
215 'label' => esc_html__( 'Last name', 'shopbuilder' ),
216 'type' => 'checkbox',
217 'orientation' => 'vertical',
218 'value' => [ 'show', 'required' ],
219 'options' => [
220 [
221 'value' => 'show',
222 'label' => 'Show Last name?',
223 ],
224 [
225 'value' => 'required',
226 'label' => 'Required Field',
227 ],
228 ],
229 // 'tab' => 'name',
230 ],
231
232 'billing_last_name_label' => [
233 'id' => 'billing_last_name_label',
234 'label' => esc_html__( 'Last name label', 'shopbuilder' ),
235 'type' => 'text',
236 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
237 // 'tab' => 'name',
238 'dependency' => [
239 'rules' => [
240 [
241 'item' => 'general.billing_form.billing_last_name',
242 'value' => 'show',
243 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
244 ],
245 ],
246 ],
247 ],
248 'billing_last_name_placeholder' => [
249 'id' => 'billing_last_name_placeholder',
250 'label' => esc_html__( 'Last name Placeholder', 'shopbuilder' ),
251 'type' => 'text',
252 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
253 // 'tab' => 'country',
254 'dependency' => [
255 'rules' => [
256 [
257 'item' => 'general.billing_form.billing_last_name',
258 'value' => 'show',
259 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
260 ],
261 ],
262 ],
263 ],
264
265 'billing_company' => [
266 'id' => 'billing_company',
267 'label' => esc_html__( 'Company name', 'shopbuilder' ),
268 'type' => 'checkbox',
269 'orientation' => 'vertical',
270 'value' => [ 'show', 'required' ],
271 'options' => [
272 [
273 'value' => 'show',
274 'label' => 'Show company name?',
275 ],
276 [
277 'value' => 'required',
278 'label' => 'Required Field',
279 ],
280 ],
281 // 'tab' => 'company',
282 ],
283
284 'billing_company_label' => [
285 'id' => 'billing_company_label',
286 'label' => esc_html__( 'Company label', 'shopbuilder' ),
287 'type' => 'text',
288 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
289 // 'tab' => 'company',
290 'dependency' => [
291 'rules' => [
292 [
293 'item' => 'general.billing_form.billing_company',
294 'value' => 'show',
295 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
296 ],
297 ],
298 ],
299 ],
300 'billing_company_placeholder' => [
301 'id' => 'billing_company_placeholder',
302 'label' => esc_html__( 'Billing company Placeholder', 'shopbuilder' ),
303 'type' => 'text',
304 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
305 // 'tab' => 'country',
306 'dependency' => [
307 'rules' => [
308 [
309 'item' => 'general.billing_form.billing_company',
310 'value' => 'show',
311 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
312 ],
313 ],
314 ],
315 ],
316
317 'billing_country' => [
318 'id' => 'billing_country',
319 'label' => esc_html__( 'Country', 'shopbuilder' ),
320 'type' => 'checkbox',
321 'orientation' => 'vertical',
322 'value' => [ 'show', 'required' ],
323 'options' => [
324 [
325 'value' => 'show',
326 'label' => 'Show Country?',
327 // 'disabled' => true,
328 ],
329 [
330 'value' => 'required',
331 'label' => 'Required Field',
332 // 'disabled' => true,
333 ],
334 ],
335 // 'tab' => 'country',
336 ],
337
338 'billing_country_label' => [
339 'id' => 'billing_country_label',
340 'label' => esc_html__( 'Country label', 'shopbuilder' ),
341 'type' => 'text',
342 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
343 // 'tab' => 'country',
344 'dependency' => [
345 'rules' => [
346 [
347 'item' => 'general.billing_form.billing_country',
348 'value' => 'show',
349 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
350 ],
351 ],
352 ],
353 ],
354
355 'billing_address_1' => [
356 'id' => 'billing_address_1',
357 'label' => esc_html__( 'Address 1', 'shopbuilder' ),
358 'type' => 'checkbox',
359 'orientation' => 'vertical',
360 'value' => [ 'show', 'required' ],
361 'options' => [
362 [
363 'value' => 'show',
364 'label' => 'Show Address field?',
365 ],
366 [
367 'value' => 'required',
368 'label' => 'Required Field',
369 ],
370 ],
371 // 'tab' => 'country',
372 ],
373
374 'billing_address_1_label' => [
375 'id' => 'billing_address_1_label',
376 'label' => esc_html__( 'Address 1 label', 'shopbuilder' ),
377 'type' => 'text',
378 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
379 // 'tab' => 'country',
380 'dependency' => [
381 'rules' => [
382 [
383 'item' => 'general.billing_form.billing_address_1',
384 'value' => 'show',
385 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
386 ],
387 ],
388 ],
389 ],
390 'billing_address_1_placeholder' => [
391 'id' => 'billing_address_1_placeholder',
392 'label' => esc_html__( 'Address 1 Placeholder', 'shopbuilder' ),
393 'type' => 'text',
394 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
395 // 'tab' => 'country',
396 'dependency' => [
397 'rules' => [
398 [
399 'item' => 'general.billing_form.billing_address_1',
400 'value' => 'show',
401 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
402 ],
403 ],
404 ],
405 ],
406
407 'billing_address_2' => [
408 'id' => 'billing_address_2',
409 'label' => esc_html__( 'Address 2', 'shopbuilder' ),
410 'type' => 'checkbox',
411 'orientation' => 'vertical',
412 'value' => [ 'show', 'required' ],
413 'options' => [
414 [
415 'value' => 'show',
416 'label' => 'Show Address field?',
417 ],
418 ],
419 'help' => esc_html__( 'if "Address 1" is hidden then this field also hides.', 'shopbuilder' ),
420 // 'tab' => 'country',
421 'dependency' => [
422 'rules' => [
423 [
424 'item' => 'general.billing_form.billing_address_1',
425 'value' => 'show',
426 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
427 ],
428 ],
429 ],
430 ],
431
432 'billing_address_2_label' => [
433 'id' => 'billing_address_2_label',
434 'label' => esc_html__( 'Address 2 label', 'shopbuilder' ),
435 'type' => 'text',
436 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
437 // 'tab' => 'country',
438 'dependency' => [
439 'rules' => [
440 [
441 'item' => 'general.billing_form.billing_address_1',
442 'value' => 'show',
443 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
444 ],
445 [
446 'item' => 'general.billing_form.billing_address_2',
447 'value' => 'show',
448 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
449 ],
450 ],
451 ],
452 ],
453 'billing_address_2_placeholder' => [
454 'id' => 'billing_address_2_placeholder',
455 'label' => esc_html__( 'Address 2 Placeholder', 'shopbuilder' ),
456 'type' => 'text',
457 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
458 // 'tab' => 'country',
459 'dependency' => [
460 'rules' => [
461 [
462 'item' => 'general.billing_form.billing_address_1',
463 'value' => 'show',
464 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
465 ],
466 [
467 'item' => 'general.billing_form.billing_address_2',
468 'value' => 'show',
469 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
470 ],
471 ],
472 ],
473 ],
474
475 'billing_city' => [
476 'id' => 'billing_city',
477 'label' => esc_html__( 'Town / City', 'shopbuilder' ),
478 'type' => 'checkbox',
479 'orientation' => 'vertical',
480 'value' => [ 'show', 'required' ],
481 'options' => [
482 [
483 'value' => 'show',
484 'label' => 'Show Town / City?',
485 ],
486 [
487 'value' => 'required',
488 'label' => 'Required Field',
489 ],
490 ],
491 // 'tab' => 'country',
492 ],
493 'billing_city_label' => [
494 'id' => 'billing_city_label',
495 'label' => esc_html__( 'Town / City label', 'shopbuilder' ),
496 'type' => 'text',
497 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
498 // 'tab' => 'country',
499 'dependency' => [
500 'rules' => [
501 [
502 'item' => 'general.billing_form.billing_city',
503 'value' => 'show',
504 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
505 ],
506 ],
507 ],
508 ],
509 'billing_city_placeholder' => [
510 'id' => 'billing_city_placeholder',
511 'label' => esc_html__( 'Billing city placeholder', 'shopbuilder' ),
512 'type' => 'text',
513 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
514 // 'tab' => 'country',
515 'dependency' => [
516 'rules' => [
517 [
518 'item' => 'general.billing_form.billing_city',
519 'value' => 'show',
520 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
521 ],
522 ],
523 ],
524 ],
525
526 'billing_state' => [
527 'id' => 'billing_state',
528 'label' => esc_html__( 'State', 'shopbuilder' ),
529 'type' => 'checkbox',
530 'orientation' => 'vertical',
531 'value' => [ 'show', 'required' ],
532 'options' => [
533 [
534 'value' => 'show',
535 'label' => 'Show State?',
536 ],
537 [
538 'value' => 'required',
539 'label' => 'Required Field',
540 ],
541 ],
542 // 'tab' => 'country',
543 ],
544
545 'billing_state_label' => [
546 'id' => 'billing_state_label',
547 'label' => esc_html__( 'State label', 'shopbuilder' ),
548 'type' => 'text',
549 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
550 // 'tab' => 'country',
551 'dependency' => [
552 'rules' => [
553 [
554 'item' => 'general.billing_form.billing_state',
555 'value' => 'show',
556 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
557 ],
558 ],
559 ],
560 ],
561
562 'billing_postcode' => [
563 'id' => 'billing_postcode',
564 'label' => esc_html__( 'Postcode / ZIP', 'shopbuilder' ),
565 'type' => 'checkbox',
566 'orientation' => 'vertical',
567 'value' => [ 'show', 'required' ],
568 'options' => [
569 [
570 'value' => 'show',
571 'label' => 'Show Postcode / ZIP?',
572 ],
573 [
574 'value' => 'required',
575 'label' => 'Required Field',
576 ],
577 ],
578 // 'tab' => 'country',
579 ],
580 'billing_postcode_label' => [
581 'id' => 'billing_postcode_label',
582 'label' => esc_html__( 'Postcode / ZIP label', 'shopbuilder' ),
583 'type' => 'text',
584 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
585 // 'tab' => 'country',
586 'dependency' => [
587 'rules' => [
588 [
589 'item' => 'general.billing_form.billing_postcode',
590 'value' => 'show',
591 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
592 ],
593 ],
594 ],
595 ],
596 'billing_postcode_placeholder' => [
597 'id' => 'billing_postcode_placeholder',
598 'label' => esc_html__( 'Postcode / ZIP placeholder', 'shopbuilder' ),
599 'type' => 'text',
600 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
601 // 'tab' => 'country',
602 'dependency' => [
603 'rules' => [
604 [
605 'item' => 'general.billing_form.billing_postcode',
606 'value' => 'show',
607 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
608 ],
609 ],
610 ],
611 ],
612
613 'billing_phone' => [
614 'id' => 'billing_phone',
615 'label' => esc_html__( 'Phone', 'shopbuilder' ),
616 'type' => 'checkbox',
617 'orientation' => 'vertical',
618 'value' => [ 'show', 'required' ],
619 'options' => [
620 [
621 'value' => 'show',
622 'label' => 'Show Phone Field?',
623 ],
624 [
625 'value' => 'required',
626 'label' => 'Required Field',
627 ],
628 ],
629 // 'tab' => 'country',
630 ],
631 'billing_phone_label' => [
632 'id' => 'billing_phone_label',
633 'label' => esc_html__( 'Phone field label', 'shopbuilder' ),
634 'type' => 'text',
635 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
636 // 'tab' => 'country',
637 'dependency' => [
638 'rules' => [
639 [
640 'item' => 'general.billing_form.billing_phone',
641 'value' => 'show',
642 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
643 ],
644 ],
645 ],
646 ],
647 'billing_phone_placeholder' => [
648 'id' => 'billing_phone_placeholder',
649 'label' => esc_html__( 'Phone field placeholder', 'shopbuilder' ),
650 'type' => 'text',
651 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
652 // 'tab' => 'country',
653 'dependency' => [
654 'rules' => [
655 [
656 'item' => 'general.billing_form.billing_phone',
657 'value' => 'show',
658 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
659 ],
660 ],
661 ],
662 ],
663
664 'billing_email' => [
665 'id' => 'billing_email',
666 'label' => esc_html__( 'Email address', 'shopbuilder' ),
667 'type' => 'checkbox',
668 'orientation' => 'vertical',
669 'value' => [ 'show', 'required' ],
670 'options' => [
671 [
672 'value' => 'show',
673 'label' => 'Show Email address Field?',
674 ],
675 [
676 'value' => 'required',
677 'label' => 'Required Field',
678 ],
679 ],
680 // 'tab' => 'country',
681 ],
682 'billing_email_label' => [
683 'id' => 'billing_email_label',
684 'label' => esc_html__( 'Email address field label', 'shopbuilder' ),
685 'type' => 'text',
686 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
687 // 'tab' => 'country',
688 'dependency' => [
689 'rules' => [
690 [
691 'item' => 'general.billing_form.billing_email',
692 'value' => 'show',
693 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
694 ],
695 ],
696 ],
697 ],
698 'billing_email_placeholder' => [
699 'id' => 'billing_email_placeholder',
700 'label' => esc_html__( 'Email address field placeholder', 'shopbuilder' ),
701 'type' => 'text',
702 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
703 // 'tab' => 'country',
704 'dependency' => [
705 'rules' => [
706 [
707 'item' => 'general.billing_form.billing_email',
708 'value' => 'show',
709 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
710 ],
711 ],
712 ],
713 ],
714 ],
715 /*
716 // 'tabs' => [
717 // 'general' => [
718 // 'title' => esc_html__( 'General', 'shopbuilder' ),
719 // ],
720 // 'name' => [
721 // 'title' => esc_html__( 'Name', 'shopbuilder' ),
722 // ],
723 // 'company' => [
724 // 'title' => esc_html__( 'Company', 'shopbuilder' ),
725 // ],
726 // 'country' => [
727 // 'title' => esc_html__( 'Country', 'shopbuilder' ),
728 // ],
729 // ],
730 */
731 ]
732 ),
733 'shipping_form' => apply_filters(
734 'rtsb/module/shipping_form/options',
735 [
736 'id' => 'shipping_form',
737 'category' => 'checkout',
738 'title' => esc_html__( 'Shipping Form Settings', 'shopbuilder' ),
739 'package' => 'free',
740 'active_field' => [
741 'label' => esc_html__( 'Enable Shipping form settings?', 'shopbuilder' ),
742 'help' => esc_html__( 'Switch on to Shipping form settings.', 'shopbuilder' ),
743 ],
744 'fields' => [
745 'shipping_first_name' => [
746 'id' => 'shipping_first_name',
747 'label' => esc_html__( 'First name', 'shopbuilder' ),
748 'type' => 'checkbox',
749 'orientation' => 'vertical',
750 'value' => [ 'show', 'required' ],
751 'options' => [
752 [
753 'value' => 'show',
754 'label' => 'Show First name?',
755 ],
756 [
757 'value' => 'required',
758 'label' => 'Required Field',
759 ],
760 ],
761 // 'tab' => 'name',
762 ],
763 'shipping_first_name_label' => [
764 'id' => 'shipping_first_name_label',
765 'label' => esc_html__( 'First name Label', 'shopbuilder' ),
766 'type' => 'text',
767 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
768 // 'tab' => 'name',
769 'dependency' => [
770 'rules' => [
771 [
772 'item' => 'general.shipping_form.shipping_first_name',
773 'value' => 'show',
774 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
775 ],
776 ],
777 ],
778 ],
779 'shipping_first_name_placeholder' => [
780 'id' => 'shipping_first_name_placeholder',
781 'label' => esc_html__( 'First name Placeholder', 'shopbuilder' ),
782 'type' => 'text',
783 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
784 // 'tab' => 'country',
785 'dependency' => [
786 'rules' => [
787 [
788 'item' => 'general.shipping_form.shipping_first_name',
789 'value' => 'show',
790 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
791 ],
792 ],
793 ],
794 ],
795
796 'shipping_last_name' => [
797 'id' => 'shipping_last_name',
798 'label' => esc_html__( 'Last name', 'shopbuilder' ),
799 'type' => 'checkbox',
800 'orientation' => 'vertical',
801 'value' => [ 'show', 'required' ],
802 'options' => [
803 [
804 'value' => 'show',
805 'label' => 'Show Last name?',
806 ],
807 [
808 'value' => 'required',
809 'label' => 'Required Field',
810 ],
811 ],
812 // 'tab' => 'name',
813 ],
814
815 'shipping_last_name_label' => [
816 'id' => 'shipping_last_name_label',
817 'label' => esc_html__( 'Last name label', 'shopbuilder' ),
818 'type' => 'text',
819 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
820 // 'tab' => 'name',
821 'dependency' => [
822 'rules' => [
823 [
824 'item' => 'general.shipping_form.shipping_last_name',
825 'value' => 'show',
826 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
827 ],
828 ],
829 ],
830 ],
831 'shipping_last_name_placeholder' => [
832 'id' => 'shipping_last_name_placeholder',
833 'label' => esc_html__( 'Last name Placeholder', 'shopbuilder' ),
834 'type' => 'text',
835 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
836 // 'tab' => 'country',
837 'dependency' => [
838 'rules' => [
839 [
840 'item' => 'general.shipping_form.shipping_last_name',
841 'value' => 'show',
842 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
843 ],
844 ],
845 ],
846 ],
847
848 'shipping_company' => [
849 'id' => 'shipping_company',
850 'label' => esc_html__( 'Company name', 'shopbuilder' ),
851 'type' => 'checkbox',
852 'orientation' => 'vertical',
853 'value' => [ 'show', 'required' ],
854 'options' => [
855 [
856 'value' => 'show',
857 'label' => 'Show company name?',
858 ],
859 [
860 'value' => 'required',
861 'label' => 'Required Field',
862 ],
863 ],
864 // 'tab' => 'company',
865 ],
866
867 'shipping_company_label' => [
868 'id' => 'shipping_company_label',
869 'label' => esc_html__( 'Company label', 'shopbuilder' ),
870 'type' => 'text',
871 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
872 // 'tab' => 'company',
873 'dependency' => [
874 'rules' => [
875 [
876 'item' => 'general.shipping_form.shipping_company',
877 'value' => 'show',
878 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
879 ],
880 ],
881 ],
882 ],
883 'shipping_company_placeholder' => [
884 'id' => 'shipping_company_placeholder',
885 'label' => esc_html__( 'Shipping company Placeholder', 'shopbuilder' ),
886 'type' => 'text',
887 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
888 // 'tab' => 'country',
889 'dependency' => [
890 'rules' => [
891 [
892 'item' => 'general.shipping_form.shipping_company',
893 'value' => 'show',
894 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
895 ],
896 ],
897 ],
898 ],
899
900 'shipping_country' => [
901 'id' => 'shipping_country',
902 'label' => esc_html__( 'Country', 'shopbuilder' ),
903 'type' => 'checkbox',
904 'orientation' => 'vertical',
905 'value' => [ 'show', 'required' ],
906 'options' => [
907 [
908 'value' => 'show',
909 'label' => 'Show Country?',
910 // 'disabled' => true,
911 ],
912 [
913 'value' => 'required',
914 'label' => 'Required Field',
915 // 'disabled' => true,
916 ],
917 ],
918 // 'tab' => 'country',
919 ],
920
921 'shipping_country_label' => [
922 'id' => 'shipping_country_label',
923 'label' => esc_html__( 'Country label', 'shopbuilder' ),
924 'type' => 'text',
925 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
926 'dependency' => [
927 'rules' => [
928 [
929 'item' => 'general.shipping_form.shipping_country',
930 'value' => 'show',
931 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
932 ],
933 ],
934 ],
935 ],
936
937 'shipping_address_1' => [
938 'id' => 'shipping_address_1',
939 'label' => esc_html__( 'Address 1', 'shopbuilder' ),
940 'type' => 'checkbox',
941 'orientation' => 'vertical',
942 'value' => [ 'show', 'required' ],
943 'options' => [
944 [
945 'value' => 'show',
946 'label' => 'Show Address field?',
947 ],
948 [
949 'value' => 'required',
950 'label' => 'Required Field',
951 ],
952 ],
953 // 'tab' => 'country',
954 ],
955
956 'shipping_address_1_label' => [
957 'id' => 'shipping_address_1_label',
958 'label' => esc_html__( 'Address 1 label', 'shopbuilder' ),
959 'type' => 'text',
960 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
961 // 'tab' => 'country',
962 'dependency' => [
963 'rules' => [
964 [
965 'item' => 'general.shipping_form.shipping_address_1',
966 'value' => 'show',
967 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
968 ],
969 ],
970 ],
971 ],
972 'shipping_address_1_placeholder' => [
973 'id' => 'shipping_address_1_placeholder',
974 'label' => esc_html__( 'Address 1 Placeholder', 'shopbuilder' ),
975 'type' => 'text',
976 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
977 // 'tab' => 'country',
978 'dependency' => [
979 'rules' => [
980 [
981 'item' => 'general.shipping_form.shipping_address_1',
982 'value' => 'show',
983 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
984 ],
985 ],
986 ],
987 ],
988
989 'shipping_address_2' => [
990 'id' => 'shipping_address_2',
991 'label' => esc_html__( 'Address 2', 'shopbuilder' ),
992 'type' => 'checkbox',
993 'orientation' => 'vertical',
994 'value' => [ 'show', 'required' ],
995 'options' => [
996 [
997 'value' => 'show',
998 'label' => 'Show Address field?',
999 ],
1000 ],
1001 'help' => esc_html__( 'if "Address 1" is hidden then this field also hides.', 'shopbuilder' ),
1002 // 'tab' => 'country',
1003 'dependency' => [
1004 'rules' => [
1005 [
1006 'item' => 'general.shipping_form.shipping_address_1',
1007 'value' => 'show',
1008 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
1009 ],
1010 ],
1011 ],
1012 ],
1013
1014 'shipping_address_2_label' => [
1015 'id' => 'shipping_address_2_label',
1016 'label' => esc_html__( 'Address 2 label', 'shopbuilder' ),
1017 'type' => 'text',
1018 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
1019 // 'tab' => 'country',
1020 'dependency' => [
1021 'rules' => [
1022 [
1023 'item' => 'general.shipping_form.shipping_address_1',
1024 'value' => 'show',
1025 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
1026 ],
1027 [
1028 'item' => 'general.shipping_form.shipping_address_2',
1029 'value' => 'show',
1030 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
1031 ],
1032 ],
1033 ],
1034 ],
1035 'shipping_address_2_placeholder' => [
1036 'id' => 'shipping_address_2_placeholder',
1037 'label' => esc_html__( 'Address 2 Placeholder', 'shopbuilder' ),
1038 'type' => 'text',
1039 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
1040 // 'tab' => 'country',
1041 'dependency' => [
1042 'rules' => [
1043 [
1044 'item' => 'general.shipping_form.shipping_address_1',
1045 'value' => 'show',
1046 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
1047 ],
1048 [
1049 'item' => 'general.shipping_form.shipping_address_2',
1050 'value' => 'show',
1051 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
1052 ],
1053 ],
1054 ],
1055 ],
1056
1057 'shipping_city' => [
1058 'id' => 'shipping_city',
1059 'label' => esc_html__( 'Town / City', 'shopbuilder' ),
1060 'type' => 'checkbox',
1061 'orientation' => 'vertical',
1062 'value' => [ 'show', 'required' ],
1063 'options' => [
1064 [
1065 'value' => 'show',
1066 'label' => 'Show Town / City?',
1067 ],
1068 [
1069 'value' => 'required',
1070 'label' => 'Required Field',
1071 ],
1072 ],
1073 // 'tab' => 'country',
1074 ],
1075 'shipping_city_label' => [
1076 'id' => 'shipping_city_label',
1077 'label' => esc_html__( 'Town / City label', 'shopbuilder' ),
1078 'type' => 'text',
1079 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
1080 // 'tab' => 'country',
1081 'dependency' => [
1082 'rules' => [
1083 [
1084 'item' => 'general.shipping_form.shipping_city',
1085 'value' => 'show',
1086 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
1087 ],
1088 ],
1089 ],
1090 ],
1091 'shipping_city_placeholder' => [
1092 'id' => 'shipping_city_placeholder',
1093 'label' => esc_html__( 'Shipping city placeholder', 'shopbuilder' ),
1094 'type' => 'text',
1095 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
1096 // 'tab' => 'country',
1097 'dependency' => [
1098 'rules' => [
1099 [
1100 'item' => 'general.shipping_form.shipping_city',
1101 'value' => 'show',
1102 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
1103 ],
1104 ],
1105 ],
1106 ],
1107
1108 'shipping_state' => [
1109 'id' => 'shipping_state',
1110 'label' => esc_html__( 'State', 'shopbuilder' ),
1111 'type' => 'checkbox',
1112 'orientation' => 'vertical',
1113 'value' => [ 'show', 'required' ],
1114 'options' => [
1115 [
1116 'value' => 'show',
1117 'label' => 'Show State?',
1118 ],
1119 [
1120 'value' => 'required',
1121 'label' => 'Required Field',
1122 ],
1123 ],
1124 // 'tab' => 'country',
1125 ],
1126
1127 'shipping_state_label' => [
1128 'id' => 'shipping_state_label',
1129 'label' => esc_html__( 'State label', 'shopbuilder' ),
1130 'type' => 'text',
1131 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
1132 // 'tab' => 'country',
1133 'dependency' => [
1134 'rules' => [
1135 [
1136 'item' => 'general.shipping_form.shipping_state',
1137 'value' => 'show',
1138 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
1139 ],
1140 ],
1141 ],
1142 ],
1143
1144 'shipping_postcode' => [
1145 'id' => 'shipping_postcode',
1146 'label' => esc_html__( 'Postcode / ZIP', 'shopbuilder' ),
1147 'type' => 'checkbox',
1148 'orientation' => 'vertical',
1149 'value' => [ 'show', 'required' ],
1150 'options' => [
1151 [
1152 'value' => 'show',
1153 'label' => 'Show Postcode / ZIP?',
1154 ],
1155 [
1156 'value' => 'required',
1157 'label' => 'Required Field',
1158 ],
1159 ],
1160 // 'tab' => 'country',
1161 ],
1162 'shipping_postcode_label' => [
1163 'id' => 'shipping_postcode_label',
1164 'label' => esc_html__( 'Postcode / ZIP label', 'shopbuilder' ),
1165 'type' => 'text',
1166 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
1167 // 'tab' => 'country',
1168 'dependency' => [
1169 'rules' => [
1170 [
1171 'item' => 'general.shipping_form.shipping_postcode',
1172 'value' => 'show',
1173 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
1174 ],
1175 ],
1176 ],
1177 ],
1178 'shipping_postcode_placeholder' => [
1179 'id' => 'shipping_postcode_placeholder',
1180 'label' => esc_html__( 'Postcode / ZIP placeholder', 'shopbuilder' ),
1181 'type' => 'text',
1182 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
1183 // 'tab' => 'country',
1184 'dependency' => [
1185 'rules' => [
1186 [
1187 'item' => 'general.shipping_form.shipping_postcode',
1188 'value' => 'show',
1189 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
1190 ],
1191 ],
1192 ],
1193 ],
1194
1195 // 'shipping_phone' => [
1196 // 'id' => 'shipping_phone',
1197 // 'label' => esc_html__( 'Phone', 'shopbuilder' ),
1198 // 'type' => 'checkbox',
1199 // 'orientation' => 'vertical',
1200 // 'value' => [ 'show', 'required' ],
1201 // 'options' => [
1202 // [
1203 // 'value' => 'show',
1204 // 'label' => 'Show Phone Field?',
1205 // ],
1206 // [
1207 // 'value' => 'required',
1208 // 'label' => 'Required Field',
1209 // ],
1210 // ],
1211 // // 'tab' => 'country',
1212 // ],
1213 // 'shipping_phone_label' => [
1214 // 'id' => 'shipping_phone_label',
1215 // 'label' => esc_html__( 'Phone field label', 'shopbuilder' ),
1216 // 'type' => 'text',
1217 // 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
1218 // // 'tab' => 'country',
1219 // 'dependency' => [
1220 // 'rules' => [
1221 // [
1222 // 'item' => 'general.shipping_form.shipping_phone',
1223 // 'value' => 'show',
1224 // 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
1225 // ],
1226 // ],
1227 // ],
1228 // ],
1229 // 'shipping_phone_placeholder' => [
1230 // 'id' => 'shipping_phone_placeholder',
1231 // 'label' => esc_html__( 'Phone field placeholder', 'shopbuilder' ),
1232 // 'type' => 'text',
1233 // 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
1234 // // 'tab' => 'country',
1235 // 'dependency' => [
1236 // 'rules' => [
1237 // [
1238 // 'item' => 'general.shipping_form.shipping_phone',
1239 // 'value' => 'show',
1240 // 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
1241 // ],
1242 // ],
1243 // ],
1244 // ],
1245
1246 // 'shipping_email' => [
1247 // 'id' => 'shipping_email',
1248 // 'label' => esc_html__( 'Email address', 'shopbuilder' ),
1249 // 'type' => 'checkbox',
1250 // 'orientation' => 'vertical',
1251 // 'value' => [ 'show', 'required' ],
1252 // 'options' => [
1253 // [
1254 // 'value' => 'show',
1255 // 'label' => 'Show Email address Field?',
1256 // ],
1257 // [
1258 // 'value' => 'required',
1259 // 'label' => 'Required Field',
1260 // ],
1261 // ],
1262 // // 'tab' => 'country',
1263 // ],
1264 // 'shipping_email_label' => [
1265 // 'id' => 'shipping_email_label',
1266 // 'label' => esc_html__( 'Email address field label', 'shopbuilder' ),
1267 // 'type' => 'text',
1268 // 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
1269 // // 'tab' => 'country',
1270 // 'dependency' => [
1271 // 'rules' => [
1272 // [
1273 // 'item' => 'general.shipping_form.shipping_email',
1274 // 'value' => 'show',
1275 // 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
1276 // ],
1277 // ],
1278 // ],
1279 // ],
1280 // 'shipping_email_placeholder' => [
1281 // 'id' => 'shipping_email_placeholder',
1282 // 'label' => esc_html__( 'Email address field placeholder', 'shopbuilder' ),
1283 // 'type' => 'text',
1284 // 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
1285 // // 'tab' => 'country',
1286 // 'dependency' => [
1287 // 'rules' => [
1288 // [
1289 // 'item' => 'general.shipping_form.shipping_email',
1290 // 'value' => 'show',
1291 // 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
1292 // ],
1293 // ],
1294 // ],
1295 // ],
1296 ],
1297 ]
1298 ),
1299 ];
1300
1301 return apply_filters( 'rtsb/core/general_settings/raw_list', $list );
1302 }
1303 }
1304