5720 |
daniel |
1 |
<?php
|
|
|
2 |
|
|
|
3 |
/**
|
|
|
4 |
* User: Daschmi (daschmi@dsachmi.de)
|
|
|
5 |
* Date: 06.08.2016
|
|
|
6 |
* Time: 13:45
|
|
|
7 |
*/
|
7173 |
daniel |
8 |
|
5720 |
daniel |
9 |
?>
|
5922 |
hartmut |
10 |
<div id="wpsg_produkte_table">
|
7179 |
daniel |
11 |
|
|
|
12 |
<?php echo wpsg_drawForm_AdminboxStart(__('Bestelldaten', 'wpsg')); ?>
|
|
|
13 |
|
|
|
14 |
<div id="wpsg_product_table_wrap">
|
7173 |
daniel |
15 |
<?php $this->render(WPSG_PATH_VIEW.'order/product_table.phtml'); ?>
|
|
|
16 |
</div>
|
6350 |
hartmut |
17 |
|
7179 |
daniel |
18 |
<script type="text/javascript">
|
|
|
19 |
|
|
|
20 |
var WPSG_BE_Pay_Ship = {
|
|
|
21 |
|
|
|
22 |
changeShippingPayment: function (id, oid) {
|
|
|
23 |
|
|
|
24 |
jQuery('#wpsg_shipping_dialog .modal-body').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
|
|
|
25 |
jQuery('#wpsg_shipping_dialog').modal( { } ).modal('show');
|
|
|
26 |
|
|
|
27 |
jQuery.ajax( {
|
|
|
28 |
url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=view&subaction=editPayShipping&edit_id=<?php echo $_REQUEST['edit_id']; ?>&noheader=1',
|
|
|
29 |
success: function(data) {
|
|
|
30 |
|
|
|
31 |
jQuery('#wpsg_shipping_dialog .modal-body').html(data);
|
|
|
32 |
|
|
|
33 |
}
|
|
|
34 |
} );
|
|
|
35 |
|
|
|
36 |
return false;
|
|
|
37 |
|
|
|
38 |
}, // function changeShipping(id, oid)
|
|
|
39 |
|
|
|
40 |
/**
|
|
|
41 |
* Ändern der Versanddaten im Backend
|
|
|
42 |
*/
|
|
|
43 |
updateShippingPayment: function() {
|
|
|
44 |
|
|
|
45 |
var data = {
|
|
|
46 |
submit: '1',
|
|
|
47 |
shipping_key: jQuery('#edit_shipping_type').val(),
|
|
|
48 |
shipping_price: jQuery('#edit_shipping_price').val(),
|
|
|
49 |
payment_key: jQuery('#edit_payment_type').val(),
|
|
|
50 |
payment_price: jQuery('#edit_payment_price').val()
|
|
|
51 |
};
|
|
|
52 |
|
|
|
53 |
jQuery('#wpsg_shipping_dialog').modal('hide');
|
|
|
54 |
|
|
|
55 |
jQuery('#wpsg_product_table_wrap').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
|
|
|
56 |
|
|
|
57 |
jQuery.ajax( {
|
|
|
58 |
url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=updateOrder&subaction=editPayShipping&edit_id=<?php echo $_REQUEST['edit_id']; ?>&noheader=1',
|
|
|
59 |
data: data,
|
|
|
60 |
success: function(data) {
|
|
|
61 |
|
|
|
62 |
jQuery('#wpsg_product_table_wrap').html(data.product_table);
|
|
|
63 |
|
|
|
64 |
}
|
|
|
65 |
} );
|
|
|
66 |
|
|
|
67 |
return false;
|
|
|
68 |
|
|
|
69 |
} // function dialogShippingOK()
|
|
|
70 |
|
|
|
71 |
}
|
|
|
72 |
|
|
|
73 |
var WPSG_BE_Product = {
|
|
|
74 |
|
|
|
75 |
addProduct: function() {
|
|
|
76 |
|
|
|
77 |
jQuery('#wpsg_product_dialog .modal-body').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
|
|
|
78 |
jQuery('#wpsg_product_dialog').modal( { } ).modal('show');
|
|
|
79 |
jQuery('#wpsg_product_dialog .btn-primary').prop('disabled', true);
|
|
|
80 |
|
|
|
81 |
jQuery.ajax( {
|
|
|
82 |
url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=view&subaction=addProduct&edit_id=<?php echo $_REQUEST['edit_id']; ?>&noheader=1',
|
|
|
83 |
success: function(data) {
|
|
|
84 |
|
|
|
85 |
jQuery('#wpsg_product_dialog .modal-body').html(data);
|
|
|
86 |
|
|
|
87 |
}
|
|
|
88 |
} );
|
|
|
89 |
|
|
|
90 |
return false;
|
|
|
91 |
|
|
|
92 |
},
|
|
|
93 |
|
|
|
94 |
remvoeProduct: function(order_product_id) {
|
|
|
95 |
|
|
|
96 |
jQuery('#wpsg_product_table_wrap').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
|
|
|
97 |
|
|
|
98 |
jQuery.ajax( {
|
|
|
99 |
url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=view&subaction=removeProduct&noheader=1&edit_id=<?php echo $_REQUEST['edit_id']; ?>',
|
|
|
100 |
data: {
|
|
|
101 |
order_product_id: order_product_id
|
|
|
102 |
},
|
|
|
103 |
success: function(data) {
|
|
|
104 |
|
|
|
105 |
jQuery('#wpsg_product_table_wrap').html(data.product_table);
|
|
|
106 |
|
|
|
107 |
}
|
|
|
108 |
} );
|
|
|
109 |
|
|
|
110 |
return false;
|
|
|
111 |
|
|
|
112 |
},
|
|
|
113 |
|
|
|
114 |
editProduct: function(order_product_id) {
|
|
|
115 |
|
|
|
116 |
jQuery('#wpsg_product_dialog .modal-body').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
|
|
|
117 |
jQuery('#wpsg_product_dialog').modal( { } ).modal('show');
|
|
|
118 |
jQuery('#wpsg_product_dialog .btn-primary').prop('disabled', true);
|
|
|
119 |
|
|
|
120 |
jQuery.ajax( {
|
|
|
121 |
url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=view&subaction=addProduct&edit_id=<?php echo $_REQUEST['edit_id']; ?>&noheader=1',
|
|
|
122 |
data: {
|
|
|
123 |
order_product_id: order_product_id
|
|
|
124 |
},
|
|
|
125 |
success: function(data) {
|
|
|
126 |
|
|
|
127 |
jQuery('#wpsg_product_dialog .modal-body').html(data);
|
|
|
128 |
|
|
|
129 |
}
|
|
|
130 |
} );
|
|
|
131 |
|
|
|
132 |
return false;
|
|
|
133 |
|
|
|
134 |
},
|
|
|
135 |
|
|
|
136 |
saveProduct: function() {
|
|
|
137 |
|
|
|
138 |
jQuery('#wpsg_product_dialog').modal('hide');
|
|
|
139 |
jQuery('#wpsg_product_table_wrap').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
|
|
|
140 |
|
|
|
141 |
jQuery.ajax( {
|
|
|
142 |
url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=view&subaction=addProduct&do=submit&edit_id=<?php echo $_REQUEST['edit_id']; ?>&noheader=1',
|
|
|
143 |
data: jQuery('#wpsg_product_add_form').serialize(),
|
|
|
144 |
success: function(data) {
|
|
|
145 |
|
|
|
146 |
jQuery('#wpsg_product_table_wrap').html(data.product_table);
|
|
|
147 |
|
|
|
148 |
}
|
|
|
149 |
} );
|
|
|
150 |
|
|
|
151 |
return false;
|
|
|
152 |
|
5922 |
hartmut |
153 |
}
|
7179 |
daniel |
154 |
|
|
|
155 |
}
|
|
|
156 |
|
|
|
157 |
var WPSG_BE_Voucher = {
|
|
|
158 |
|
|
|
159 |
editVoucher: function() {
|
|
|
160 |
|
|
|
161 |
jQuery('#wpsg_voucher_dialog .modal-body').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
|
|
|
162 |
jQuery('#wpsg_voucher_dialog').modal( { } ).modal('show');
|
|
|
163 |
|
|
|
164 |
jQuery.ajax( {
|
|
|
165 |
url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=view&subaction=editVoucher&edit_id=<?php echo $_REQUEST['edit_id']; ?>&noheader=1',
|
|
|
166 |
success: function(data) {
|
|
|
167 |
|
|
|
168 |
jQuery('#wpsg_voucher_dialog .modal-body').html(data);
|
|
|
169 |
|
|
|
170 |
}
|
|
|
171 |
} );
|
|
|
172 |
|
|
|
173 |
return false;
|
|
|
174 |
|
|
|
175 |
},
|
|
|
176 |
|
|
|
177 |
removeVoucher: function() {
|
|
|
178 |
|
|
|
179 |
jQuery('#wpsg_product_table_wrap').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
|
|
|
180 |
|
|
|
181 |
jQuery.ajax( {
|
|
|
182 |
url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=view&subaction=editVoucher&do=remove&edit_id=<?php echo $_REQUEST['edit_id']; ?>&noheader=1',
|
|
|
183 |
success: function(data) {
|
|
|
184 |
|
|
|
185 |
jQuery('#wpsg_product_table_wrap').html(data.product_table);
|
|
|
186 |
|
|
|
187 |
}
|
|
|
188 |
} );
|
|
|
189 |
|
|
|
190 |
return false;
|
|
|
191 |
|
|
|
192 |
},
|
|
|
193 |
|
|
|
194 |
saveVoucher: function() {
|
|
|
195 |
|
|
|
196 |
jQuery('#wpsg_voucher_dialog').modal('hide');
|
|
|
197 |
jQuery('#wpsg_product_table_wrap').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
|
|
|
198 |
|
|
|
199 |
jQuery.ajax( {
|
|
|
200 |
url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=view&subaction=editVoucher&do=submit&edit_id=<?php echo $_REQUEST['edit_id']; ?>&noheader=1',
|
|
|
201 |
data: jQuery('#wpsg_be_voucher_form').serialize(),
|
|
|
202 |
success: function(data) {
|
|
|
203 |
|
|
|
204 |
jQuery('#wpsg_product_table_wrap').html(data.product_table);
|
|
|
205 |
|
|
|
206 |
}
|
|
|
207 |
} );
|
|
|
208 |
|
|
|
209 |
return false;
|
|
|
210 |
|
5922 |
hartmut |
211 |
}
|
7179 |
daniel |
212 |
|
|
|
213 |
}
|
|
|
214 |
|
|
|
215 |
var WPSG_BE_Discount = {
|
|
|
216 |
|
|
|
217 |
editDiscount: function() {
|
|
|
218 |
|
|
|
219 |
jQuery('#wpsg_discount_dialog .modal-body').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
|
|
|
220 |
jQuery('#wpsg_discount_dialog').modal( { } ).modal('show');
|
|
|
221 |
|
|
|
222 |
jQuery.ajax( {
|
|
|
223 |
url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=view&subaction=editDiscount&edit_id=<?php echo $_REQUEST['edit_id']; ?>&noheader=1',
|
|
|
224 |
success: function(data) {
|
|
|
225 |
|
|
|
226 |
jQuery('#wpsg_discount_dialog .modal-body').html(data);
|
|
|
227 |
|
|
|
228 |
}
|
|
|
229 |
} );
|
|
|
230 |
|
|
|
231 |
return false;
|
|
|
232 |
|
|
|
233 |
},
|
|
|
234 |
|
|
|
235 |
removeDiscount: function() {
|
|
|
236 |
|
|
|
237 |
jQuery('#wpsg_product_table_wrap').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
|
|
|
238 |
|
|
|
239 |
jQuery.ajax( {
|
|
|
240 |
url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=view&subaction=editDiscount&do=remove&edit_id=<?php echo $_REQUEST['edit_id']; ?>&noheader=1',
|
|
|
241 |
success: function(data) {
|
|
|
242 |
|
|
|
243 |
jQuery('#wpsg_product_table_wrap').html(data.product_table);
|
|
|
244 |
|
|
|
245 |
}
|
|
|
246 |
} );
|
|
|
247 |
|
|
|
248 |
return false;
|
|
|
249 |
|
|
|
250 |
},
|
|
|
251 |
|
|
|
252 |
saveDiscount: function() {
|
|
|
253 |
|
|
|
254 |
jQuery('#wpsg_discount_dialog').modal('hide');
|
|
|
255 |
jQuery('#wpsg_product_table_wrap').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
|
|
|
256 |
|
|
|
257 |
jQuery.ajax( {
|
|
|
258 |
url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=view&subaction=editDiscount&do=submit&edit_id=<?php echo $_REQUEST['edit_id']; ?>&noheader=1',
|
|
|
259 |
data: jQuery('#wpsg_be_discount_form').serialize(),
|
|
|
260 |
success: function(data) {
|
|
|
261 |
|
|
|
262 |
jQuery('#wpsg_product_table_wrap').html(data.product_table);
|
|
|
263 |
|
|
|
264 |
}
|
|
|
265 |
} );
|
|
|
266 |
|
|
|
267 |
return false;
|
|
|
268 |
|
|
|
269 |
}
|
|
|
270 |
|
|
|
271 |
}
|
6350 |
hartmut |
272 |
|
7179 |
daniel |
273 |
var WPSG_BE_Mail = {
|
|
|
274 |
|
|
|
275 |
sendCustomerMail: function(order_id) {
|
5922 |
hartmut |
276 |
|
7179 |
daniel |
277 |
jQuery.ajax( {
|
|
|
278 |
url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=view&subaction=sendMail&do=customer&edit_id=<?php echo $_REQUEST['edit_id']; ?>&noheader=1',
|
|
|
279 |
data: jQuery('#wpsg_be_discount_form').serialize(),
|
|
|
280 |
success: function(data) { alert(data); }
|
|
|
281 |
} );
|
6846 |
hartmut |
282 |
|
7179 |
daniel |
283 |
return false;
|
6846 |
hartmut |
284 |
|
|
|
285 |
}
|
7179 |
daniel |
286 |
|
|
|
287 |
}
|
6846 |
hartmut |
288 |
|
7179 |
daniel |
289 |
</script>
|
6846 |
hartmut |
290 |
|
7179 |
daniel |
291 |
<?php wpsg_drawForm_AdminboxEnd(); ?>
|
5922 |
hartmut |
292 |
|
7179 |
daniel |
293 |
</div>
|
5922 |
hartmut |
294 |
|
7179 |
daniel |
295 |
<!-- Modaldialog für Gutscheine -->
|
|
|
296 |
<div class="modal fade" id="wpsg_voucher_dialog" tabindex="-1" role="dialog">
|
|
|
297 |
<div class="modal-dialog" role="document">
|
|
|
298 |
<div class="modal-content">
|
|
|
299 |
<div class="modal-header">
|
|
|
300 |
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
|
|
301 |
<h4 class="modal-title" id="myModalLabel"><?php echo __('Gutschein hinzufügen/bearbeiten', 'wpsg'); ?></h4>
|
|
|
302 |
</div>
|
|
|
303 |
<div class="modal-body"></div>
|
|
|
304 |
<div class="modal-footer">
|
|
|
305 |
<button type="button" class="btn btn-default" data-dismiss="modal">Abbrechen</button>
|
|
|
306 |
<button type="button" class="btn btn-primary" data-dismiss="modal" onclick="return WPSG_BE_Voucher.saveVoucher();">OK</button>
|
|
|
307 |
</div>
|
|
|
308 |
</div>
|
|
|
309 |
</div>
|
5922 |
hartmut |
310 |
</div>
|
|
|
311 |
|
7173 |
daniel |
312 |
<!-- Modaldialog für Rabatt -->
|
|
|
313 |
<div class="modal fade" id="wpsg_discount_dialog" tabindex="-1" role="dialog">
|
|
|
314 |
<div class="modal-dialog" role="document">
|
|
|
315 |
<div class="modal-content">
|
|
|
316 |
<div class="modal-header">
|
|
|
317 |
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
|
|
318 |
<h4 class="modal-title" id="myModalLabel"><?php echo __('Rabatt hinzufügen/bearbeiten', 'wpsg'); ?></h4>
|
|
|
319 |
</div>
|
|
|
320 |
<div class="modal-body"></div>
|
|
|
321 |
<div class="modal-footer">
|
|
|
322 |
<button type="button" class="btn btn-default" data-dismiss="modal">Abbrechen</button>
|
|
|
323 |
<button type="button" class="btn btn-primary" data-dismiss="modal" onclick="return WPSG_BE_Discount.saveDiscount();">OK</button>
|
|
|
324 |
</div>
|
|
|
325 |
</div>
|
|
|
326 |
</div>
|
|
|
327 |
</div>
|
5934 |
hartmut |
328 |
|
|
|
329 |
<!-- Modaldialog für Produkte -->
|
|
|
330 |
<div class="modal fade" id="wpsg_product_dialog" tabindex="-1" role="dialog">
|
|
|
331 |
<div class="modal-dialog" role="document">
|
|
|
332 |
<div class="modal-content">
|
|
|
333 |
<div class="modal-header">
|
|
|
334 |
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
7173 |
daniel |
335 |
<h4 class="modal-title" id="myModalLabel"><?php echo __('Produkt hinzufügen/bearbeiten', 'wpsg'); ?></h4>
|
5934 |
hartmut |
336 |
</div>
|
7173 |
daniel |
337 |
<div class="modal-body"></div>
|
5934 |
hartmut |
338 |
<div class="modal-footer">
|
|
|
339 |
<button type="button" class="btn btn-default" data-dismiss="modal">Abbrechen</button>
|
7173 |
daniel |
340 |
<button type="button" class="btn btn-primary" data-dismiss="modal" onclick="return WPSG_BE_Product.saveProduct();">OK</button>
|
5934 |
hartmut |
341 |
</div>
|
|
|
342 |
</div>
|
|
|
343 |
</div>
|
|
|
344 |
</div>
|
|
|
345 |
|
7173 |
daniel |
346 |
<!-- Modaldialog für Versandart / Zahlungsart -->
|
5934 |
hartmut |
347 |
<div class="modal fade" id="wpsg_shipping_dialog" tabindex="-1" role="dialog">
|
|
|
348 |
<div class="modal-dialog" role="document">
|
|
|
349 |
<div class="modal-content">
|
|
|
350 |
<div class="modal-header">
|
|
|
351 |
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
|
|
352 |
<h4 class="modal-title" id="myModalLabel"><?php echo __('Versandart', 'wpsg'); ?></h4>
|
|
|
353 |
</div>
|
7173 |
daniel |
354 |
<div class="modal-body"></div>
|
5934 |
hartmut |
355 |
<div class="modal-footer">
|
|
|
356 |
<button type="button" class="btn btn-default" data-dismiss="modal">Abbrechen</button>
|
7173 |
daniel |
357 |
<button type="button" class="btn btn-primary" data-dismiss="modal" onclick="return WPSG_BE_Pay_Ship.updateShippingPayment();">OK</button>
|
5934 |
hartmut |
358 |
</div>
|
|
|
359 |
</div>
|
|
|
360 |
</div>
|
|
|
361 |
</div>
|
|
|
362 |
|