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

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

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