1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
<?php
global $fields;
/** General Settings **/
$fields['settings_general']['general'][] = array(
'id' => WC_QD_DB.'redirect_user',
'type' => 'select',
'label' => __( 'Redirect User To', WC_QD_TXT),
'desc' => __( 'After Donation Added To Cart',WC_QD_TXT),
'size ' => 'small',
'options' => array('cart' => __('Cart Page',WC_QD_TXT) , 'checkout' => __('Checkout Page',WC_QD_TXT)),
'attr' => array('class' => 'wc-enhanced-select','style' => 'width:auto;max-width:35%;')
);
/** General Settings **/
$fields['settings_general']['general'][] = array(
'id' => WC_QD_DB.'already_exist_redirect_user',
'type' => 'select',
'label' => __( 'Donation Exist Redirect', WC_QD_TXT),
'desc' => __( 'Redirect User When Donation Already Exist In Cart',WC_QD_TXT),
'size ' => 'small',
'options' => array('cart' => __('Cart Page',WC_QD_TXT) , 'checkout' => __('Checkout Page',WC_QD_TXT)),
'attr' => array('class' => 'wc-enhanced-select','style' => 'width:auto;max-width:35%;')
);
$fields['settings_general']['general'][] = array(
'label' => __( 'Donation Payment Gateway', WC_QD_TXT),
'desc' => __( 'Select Payment gateway for users to pay for donation',WC_QD_TXT),
'id' => WC_QD_DB.'payment_gateway',
'type' => 'select',
'attr' => array('class' => 'wc-enhanced-select','style' => 'width:auto;max-width:35%;','multiple'=> 'multiple'),
'multiple' => true,
'options' => WC_QD()->f()->get_admin_pay_gate()
);
/** Message Settings **/
$fields['settings_message']['message'][] = array(
'desc' => sprintf(__( '<span> Add <code>%s</code> To Get Ented Amount By User.</span> <br/>
<span> Add <code>%s</code> To Get Minimum Required Amount From Selected Project </span> <br/>
<span> Add <code>%s</code> To Get Minimum Required Amount From Selected Project </span>',WC_QD_TXT),'{donation_amount}','{min_amount}','{max_amount}'),
'id' => WC_QD_DB.'empty_donation_msg_1',
'attr' => array('style' => 'min-width:50%; width:auto;max-width:75%;'),
'type' => 'content'
);
$fields['settings_message']['message'][] = array(
'label' => __( 'Donation Conflict', WC_QD_TXT),
'desc' => __( 'Custom Message To Show When User Trying To Add Donation With Other Products',WC_QD_TXT),
'id' => WC_QD_DB.'donation_with_other_products',
'attr' => array('style' => 'min-width:50%; width:auto;max-width:75%;'),
'type' => 'textarea'
);
$fields['settings_message']['message'][] = array(
'label' => __( 'Empty Donation Amount', WC_QD_TXT),
'desc' => __( 'Custom Message To Show When Empty Donation Entered',WC_QD_TXT),
'id' => WC_QD_DB.'empty_donation_msg',
'attr' => array('style' => 'min-width:50%; width:auto;max-width:75%;'),
'type' => 'textarea'
);
$fields['settings_message']['message'][] = array(
'label' => __( 'Donation Already Exist', WC_QD_TXT),
'desc' => __( 'Custom Message To Show When User Trying To Add Another Donation To Cart',WC_QD_TXT),
'id' => WC_QD_DB.'donation_already_exist',
'attr' => array('style' => 'min-width:50%; width:auto;max-width:75%;'),
'type' => 'textarea',
);
$fields['settings_message']['message'][] = array(
'label' => __( 'Invalid Donation Amount', WC_QD_TXT),
'desc' => __( 'Custom Message To Show When Invalid Donation Entered',WC_QD_TXT),
'id' => WC_QD_DB.'invalid_donation_msg',
'attr' => array('style' => 'min-width:50%; width:auto;max-width:75%;'),
'type' => 'textarea'
);
$fields['settings_message']['message'][] = array(
'label' => __( 'Minimum Required Donation Amount', WC_QD_TXT),
'desc' => __( 'Custom Message To Show When Minimum Required Donation Not Entered',WC_QD_TXT),
'id' => WC_QD_DB.'min_rda_msg',
'attr' => array('style' => 'min-width:50%; width:auto;max-width:75%;'),
'type' => 'textarea'
);
$fields['settings_message']['message'][] = array(
'label' =>__( 'Maximum Required Donation Amount', WC_QD_TXT),
'desc' => __( 'Custom Message To Show When Maximum Required Donation Not Entered ',WC_QD_TXT),
'id' => WC_QD_DB.'max_rda_msg',
'attr' => array('style' => 'min-width:50%; width:auto;max-width:75%;'),
'type' => 'textarea'
);
/** Shortcode Settings **/
$fields['settings_shortcode']['shortcode'][] = array(
'id' => WC_QD_DB.'default_render_type',
'type' => 'select',
'label' => __( 'Pre Selected Project Name', WC_QD_TXT),
'desc' => __( 'default project render type',WC_QD_TXT),
'size ' => 'small',
'options' => array('select' => __('Select Box',WC_QD_TXT), 'radio' => __('Radio Button',WC_QD_TXT)),
'attr' => array('class' => 'wc-enhanced-select','style' => 'width:auto;max-width:35%;')
);
$fields['settings_shortcode']['shortcode'][] = array(
'id' => WC_QD_DB.'shortcode_show_errors',
'type' => 'select',
'label' => __( 'Show Errors', WC_QD_TXT),
'desc' => __( 'Set to hide errors when <code> wc_print_notice</code> called before loading dontion form',WC_QD_TXT),
'size ' => 'small',
'options' => array('true' => __('Show Errors',WC_QD_TXT), 'false' => __('Hide Errors',WC_QD_TXT)),
'attr' => array('class' => 'wc-enhanced-select','style' => 'width:auto;max-width:35%;')
);
$fields['settings_shortcode']['shortcode'][] = array(
'id' => WC_QD_DB.'pre_selected_project',
'type' => 'select',
'label' => __( 'Pre Selected Project Name', WC_QD_TXT),
'desc' => __( 'this value will be selected in donation project box',WC_QD_TXT),
'size ' => 'small',
'options' => WC_QD()->f()->get_porject_list(),
'attr' => array('class' => 'wc-enhanced-select','style' => 'width:auto;max-width:35%;')
);
$fields['settings_shortcode']['shortcode'][] = array(
'id' => WC_QD_DB.'pre_defined_amount',
'type' => 'textarea',
'label' => __( 'Pre Defined Project Amount', WC_QD_TXT),
'desc' => __( 'Enter Donation Amount Like <code> 10|20|30|40 </code>',WC_QD_TXT),
'size ' => 'small',
'attr' => array('style' => 'min-width:35%; width:auto;max-width:75%;')
);