PluginProbe
Welcart e-Commerce / 1.4.0
Welcart e-Commerce v1.4.0
2.12.4 2.12.3 2.11.35 2.12.2 2.12.1 2.11.34 2.11.33 2.11.32 2.11.31 2.11.30 1.3.16 1.3.17 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 1.3.8 1.3.9 1.4.0 1.4.1 1.4.10 1.4.11 1.4.12 All 292 releases
usc-e-shop / includes / order_list.php

order_list.php in Welcart e-Commerce 1.4.0, at includes/order_list.php

896 lines 46.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 require_once( USCES_PLUGIN_DIR . "/classes/orderList.class.php" );
3 global $wpdb;
4
5 $tableName = $wpdb->prefix . "usces_order";
6 $arr_column = array(
7 __('ID', 'usces') => 'ID',
8 __('Order number', 'usces') => 'deco_id',
9 __('date', 'usces') => 'date',
10 __('membership number', 'usces') => 'mem_id',
11 __('name', 'usces') => 'name',
12 __('Region', 'usces') => 'pref',
13 __('shipping option', 'usces') => 'delivery_method',
14 __('Amount', 'usces').'('.__(usces_crcode( 'return' ), 'usces').')' => 'total_price',
15 __('payment method', 'usces') => 'payment_name',
16 __('transfer statement', 'usces') => 'receipt_status',
17 __('Processing', 'usces') => 'order_status',
18 apply_filters('usces_filter_admin_modified_label', __('shpping date', 'usces') ) => 'order_modified');
19 $arr_column = apply_filters( 'usces_filter_order_list_column', $arr_column );
20
21 $DT = new dataList($tableName, $arr_column);
22 $res = $DT->MakeTable();
23 $arr_search = $DT->GetSearchs();
24 $arr_status = apply_filters( 'usces_filter_management_status', get_option('usces_management_status') );
25 $arr_header = $DT->GetListheaders();
26 $dataTableNavigation = $DT->GetDataTableNavigation();
27 $rows = $DT->rows;
28 $status = $DT->get_action_status();
29 $message = $DT->get_action_message();
30 //$pref = get_option('usces_pref');
31 //20110331ysk start
32 //$pref = $usces->options['province'];
33 $pref = array();
34 $target_market = $this->options['system']['target_market'];
35 foreach((array)$target_market as $country) {
36 $prefs = get_usces_states($country);
37 if(is_array($prefs) and 0 < count($prefs)) {
38 $pos = strpos($prefs[0], '--');
39 if($pos !== false) array_shift($prefs);
40 foreach((array)$prefs as $state) {
41 $pref[] = $state;
42 }
43 }
44 }
45 //20110331ysk end
46 $payment_name = array();
47 $payments = usces_get_system_option( 'usces_payment_method', 'sort' );
48 foreach ( (array)$payments as $id => $array ) {
49 $payment_name[$id] = $array['name'];
50 }
51 foreach((array)$arr_status as $key => $value){
52 if($key == 'noreceipt' || $key == 'receipted' || $key == 'pending'){
53 $receipt_status[$key] = $value;
54 }else{
55 $order_status[$key] = $value;
56 }
57 }
58 $order_status['new'] = __('new order', 'usces');
59 $curent_url = urlencode(USCES_ADMIN_URL . '?' . $_SERVER['QUERY_STRING']);
60
61 //20100908ysk start
62 $csod_meta = usces_has_custom_field_meta('order');
63 $cscs_meta = usces_has_custom_field_meta('customer');
64 $csde_meta = usces_has_custom_field_meta('delivery');
65 $usces_opt_order = get_option('usces_opt_order');
66 $chk_pro = ( isset($usces_opt_order['chk_pro']) ) ? $usces_opt_order['chk_pro'] : array();
67 $chk_ord = ( isset($usces_opt_order['chk_ord']) ) ? $usces_opt_order['chk_ord'] : array();
68 //20100908ysk end
69 //20110411ysk start
70 $applyform = usces_get_apply_addressform($this->options['system']['addressform']);
71 //20110411ysk end
72 ?>
73 <script type="text/javascript">
74 jQuery(function($){
75 <?php if($status == 'success'){ ?>
76 $("#anibox").animate({ backgroundColor: "#ECFFFF" }, 2000);
77 <?php }else if($status == 'caution'){ ?>
78 $("#anibox").animate({ backgroundColor: "#FFF5CE" }, 2000);
79 <?php }else if($status == 'error'){ ?>
80 $("#anibox").animate({ backgroundColor: "#FFE6E6" }, 2000);
81 <?php } ?>
82
83 // $("#aAdditionalURLs").click(function () {
84 // $("#AdditionalURLs").toggle();
85 // });
86
87 $("input[name='allcheck']").click(function () {
88 if( $(this).attr("checked") ){
89 $("input[name*='listcheck']").attr({checked: true});
90 }else{
91 $("input[name*='listcheck']").attr({checked: false});
92 }
93 });
94
95 $("#searchselect").change(function () {
96 operation.change_search_field();
97 });
98
99 $("#searchselectsku").change(function () {
100 operation.change_search_sku_field();
101 });
102
103 $("#changeselect").change(function () {
104 operation.change_collective_field();
105 });
106
107 $("#collective_change").click(function () {
108 if( $("#changeselect option:selected").val() == 'none' ) {
109 $("#orderlistaction").val('');
110 return false;
111 }
112 if( $("input[name*='listcheck']:checked").length == 0 ) {
113 alert("<?php _e('Choose the data.', 'usces'); ?>");
114 $("#orderlistaction").val('');
115 return false;
116 }
117 var coll = $("#changeselect").val();
118 var mes = '';
119 if( coll == 'order_reciept' ){
120 mes = <?php echo sprintf(__("'Transfer status of the items which you have checked will be changed in to ' + %s + '. %sDo you agree?'", 'usces'),
121 '$("select\[name=\"change\[word\]\[order_reciept\]\"\] option:selected").html()',
122 '\n\n'); ?>;
123 }else if( coll == 'order_status' ){
124 mes = <?php echo sprintf(__("'Data status which you have cheked will be changed in to ' + %s + '. %sDo you agree?'", 'usces'),
125 '$("select\[name=\"change\[word\]\[order_status\]\"\] option:selected").html()',
126 '\n\n'); ?>;
127 }else if(coll == 'delete'){
128 mes = '<?php _e('Are you sure of deleting all the checked data in bulk?', 'usces'); ?>';
129 //}else{
130 // $("#orderlistaction").val('');
131 // return false;
132 }
133 if( mes != '' ) {
134 if( !confirm(mes) ){
135 $("#orderlistaction").val('');
136 return false;
137 }
138 }
139 <?php do_action( 'usces_action_order_list_collective_change_js' ); ?>
140 $("#orderlistaction").val('collective');
141 //return true;
142 $('#form_tablesearch').submit();
143 });
144
145 operation = {
146 change_search_field :function (){
147
148 var label = '';
149 var html = '';
150 var column = $("#searchselect").val();
151
152 if( column == 'ID' ) {
153 label = '<?php _e('key words', 'usces'); ?>';
154 html = '<input name="search[word][ID]" type="text" value="<?php echo esc_attr(isset($arr_search['word']['ID']) ? $arr_search['word']['ID'] : ''); ?>" class="searchword" maxlength="50" />';
155 }else if( column == 'deco_id' ) {
156 label = '<?php _e('key words', 'usces'); ?>';
157 html = '<input name="search[word][deco_id]" type="text" value="<?php echo esc_attr(isset($arr_search['word']['deco_id']) ? $arr_search['word']['deco_id'] : ''); ?>" class="searchword" maxlength="50" />';
158 }else if( column == 'date' ) {
159 label = '<?php _e('key words', 'usces'); ?>';
160 html = '<input name="search[word][date]" type="text" value="<?php echo esc_attr(isset($arr_search['word']['date']) ? $arr_search['word']['date'] : ''); ?>" class="searchword" maxlength="50" />';
161 }else if( column == 'mem_id' ) {
162 label = '<?php _e('key words', 'usces'); ?>';
163 html = '<input name="search[word][mem_id]" type="text" value="<?php echo esc_attr(isset($arr_search['word']['mem_id']) ? $arr_search['word']['mem_id'] : ''); ?>" class="searchword" maxlength="50" />';
164 }else if( column == 'name' ) {
165 label = '<?php _e('key words', 'usces'); ?>';
166 html = '<input name="search[word][name]" type="text" value="<?php echo esc_attr(isset($arr_search['word']['name']) ? $arr_search['word']['name'] : ''); ?>" class="searchword" maxlength="50" />';
167 }else if( column == 'order_modified' ) {
168 label = '<?php _e('key words', 'usces'); ?>';
169 html = '<input name="search[word][order_modified]" type="text" value="<?php echo esc_attr(isset($arr_search['word']['order_modified']) ? $arr_search['word']['order_modified'] : ''); ?>" class="searchword" maxlength="50" />';
170 }else if( column == 'pref' ) {
171 label = '';
172 html = '<select name="search[word][pref]" class="searchselect">';
173 <?php foreach((array)$pref as $pkey => $pvalue){
174 if( isset($arr_search['word']['pref']) && $pvalue == $arr_search['word']['pref']){
175 $pselected = ' selected="selected"';
176 }else{
177 $pselected = '';
178 }
179 ?>
180 html += '<option value="<?php echo esc_attr($pvalue); ?>"<?php echo $pselected ?>><?php echo esc_html($pvalue); ?></option>';
181 <?php } ?>
182 html += '</select>';
183 }else if( column == 'delivery_method' ) {
184 label = '';
185 html = '<select name="search[word][delivery_method]" class="searchselect">';
186 <?php foreach((array)$this->options['delivery_method'] as $dkey => $dvalue){
187 if( isset($arr_search['word']['delivery_method']) && $dvalue['id'] == $arr_search['word']['delivery_method']){
188 $dselected = ' selected="selected"';
189 }else{
190 $dselected = '';
191 }
192 ?>
193 html += '<option value="<?php echo esc_attr($dvalue['id']); ?>"<?php echo $dselected ?>><?php echo esc_html($dvalue['name']); ?></option>';
194 <?php } ?>
195 html += '</select>';
196 }else if( column == 'payment_name' ) {
197 label = '';
198 html = '<select name="search[word][payment_name]" class="searchselect">';
199 <?php foreach((array)$payment_name as $pnkey => $pnvalue){
200 if( isset($arr_search['word']['payment_name']) && $pnvalue == $arr_search['word']['payment_name']){
201 $pnselected = ' selected="selected"';
202 }else{
203 $pnselected = '';
204 }
205 ?>
206 html += '<option value="<?php echo esc_attr($pnvalue); ?>"<?php echo $pnselected ?>><?php echo esc_html($pnvalue); ?></option>';
207 <?php } ?>
208 html += '</select>';
209 }else if( column == 'receipt_status' ) {
210 label = '';
211 html = '<select name="search[word][receipt_status]" class="searchselect">';
212 <?php foreach((array)$receipt_status as $rkey => $rvalue){
213 if( isset($arr_search['word']['receipt_status']) && $rvalue == $arr_search['word']['receipt_status']){
214 $rselected = ' selected="selected"';
215 }else{
216 $rselected = '';
217 }
218 ?>
219 html += '<option value="<?php echo esc_attr($rvalue); ?>"<?php echo $rselected ?>><?php echo esc_html($rvalue); ?></option>';
220 <?php } ?>
221 html += '</select>';
222 }else if( column == 'order_status' ) {
223 label = '';
224 html = '<select name="search[word][order_status]" class="searchselect">';
225 <?php foreach((array)$order_status as $okey => $ovalue){
226 if( isset($arr_search['word']['order_status']) && $ovalue == $arr_search['word']['order_status']){
227 $oselected = ' selected="selected"';
228 }else{
229 $oselected = '';
230 }
231 ?>
232 html += '<option value="<?php echo esc_attr($ovalue); ?>"<?php echo $oselected ?>><?php echo esc_html($ovalue); ?></option>';
233 <?php } ?>
234 html += '</select>';
235 }
236
237 $("#searchlabel").html( label );
238 $("#searchfield").html( html );
239
240 },
241
242 change_search_sku_field :function (){
243
244 var label = '';
245 var html = '';
246 var column = $("#searchselectsku").val();
247
248 if( column == 'item_code' ) {
249 label = '<?php _e('key words', 'usces'); ?>';
250 html = '<input name="search[skuword][item_code]" type="text" value="<?php echo esc_attr(isset($arr_search['skuword']['item_code']) ? $arr_search['skuword']['item_code'] : ''); ?>" class="searchword" maxlength="50" />';
251 }else if( column == 'item_name' ) {
252 label = '<?php _e('key words', 'usces'); ?>';
253 html = '<input name="search[skuword][item_name]" type="text" value="<?php echo esc_attr(isset($arr_search['skuword']['item_name']) ? $arr_search['skuword']['item_name'] : ''); ?>" class="searchword" maxlength="50" />';
254 }
255
256 $("#searchlabelsku").html( label );
257 $("#searchfieldsku").html( html );
258
259 },
260
261 change_collective_field :function (){
262
263 var label = '';
264 var html = '';
265 var column = $("#changeselect").val();
266
267 if( column == 'order_reciept' ) {
268 label = '';
269 html = '<select name="change[word][order_reciept]" class="searchselect">';
270 <?php foreach((array)$receipt_status as $orkey => $orvalue){ ?>
271 html += '<option value="<?php echo esc_attr($orkey); ?>"><?php echo esc_html($orvalue); ?></option>';
272 <?php } ?>
273 html += '</select>';
274 }else if( column == 'order_status' ) {
275 label = '';
276 html = '<select name="change[word][order_status]" class="ksearchselect">';
277 <?php foreach((array)$order_status as $oskey => $osvalue){ ?>
278 html += '<option value="<?php echo esc_attr($oskey); ?>"><?php echo esc_html($osvalue); ?></option>';
279 <?php } ?>
280 html += '</select>';
281 }else if( column == 'delete' ) {
282 label = '';
283 html = '';
284 }
285
286 $("#changelabel").html( label );
287 $("#changefield").html( html );
288
289 }
290 };
291 <?php echo apply_filters('usces_filter_order_list_page_js', ''); ?>
292 });
293
294 function toggleVisibility(id) {
295 var e = document.getElementById(id);
296 if(e.style.display == 'block') {
297 e.style.display = 'none';
298 document.getElementById("searchSwitchStatus").value = 'OFF';
299 } else {
300 e.style.display = 'block';
301 document.getElementById("searchSwitchStatus").value = 'ON';
302 document.getElementById("searchVisiLink").style.display = 'none';
303 }
304 };
305
306 function deleteconfirm(order_id){
307 if(confirm(<?php _e("'Are you sure of deleting an order number ' + order_id + ' ?'", 'usces'); ?>)){
308 return true;
309 }else{
310 return false;
311 }
312 }
313
314 jQuery(document).ready(function($){
315 $("table#mainDataTable tr:even").addClass("rowSelection_even");
316 $("table#mainDataTable tr").hover(function() {
317 $(this).addClass("rowSelection_hilight");
318 },
319 function() {
320 $(this).removeClass("rowSelection_hilight");
321 });
322 if( $("#searchSwitchStatus").val() == 'OFF'){
323 $("#searchBox").css("display", "none");
324 $("#searchVisiLink").html('<?php _e('Show the Operation field', 'usces'); ?>');
325 } else {
326 $("#searchBox").css("display", "block");
327 $("#searchVisiLink").css("display", "none");
328 }
329
330 operation.change_search_field();
331 operation.change_search_sku_field();
332
333 //20100908ysk start
334 $("#dlProductListDialog").dialog({
335 bgiframe: true,
336 autoOpen: false,
337 height: 400,
338 width: 700,
339 resizable: true,
340 modal: true,
341 buttons: {
342 '<?php _e('close', 'usces'); ?>': function() {
343 $(this).dialog('close');
344 }
345 },
346 close: function() {
347 }
348 });
349 $('#dl_pro').click(function() {
350 //20120123ysk start 0000385
351 //var args = "&searchf[column]="+$(':input[name="search[column]"]').val()
352 // +"&search[word]["+$("#searchselect").val()+"]="+$(':input[name="search[word]['+$("#searchselect").val()+']"]').val()
353 // +"&search[period]="+$(':input[name="search[period]"]').val()
354 // +"&searchSwitchStatus="+$(':input[name="searchSwitchStatus"]').val()
355 // +"&ftype="+$(':input[name="ftype_pro[]"]:checked').val();
356 var args = "&search[column]="+$(':input[name="search[column]"]').val()
357 +"&search[sku]="+$(':input[name="search[sku]"]').val()
358 +"&search[word]["+$("#searchselect").val()+"]="+$(':input[name="search[word]['+$("#searchselect").val()+']"]').val()
359 +"&search[skuword]["+$("#searchselectsku").val()+"]="+$(':input[name="search[skuword]['+$("#searchselectsku").val()+']"]').val()
360 +"&search[period]="+$(':input[name="search[period]"]').val()
361 +"&searchSwitchStatus="+$(':input[name="searchSwitchStatus"]').val()
362 +"&ftype=csv";
363 //20120123ysk end
364 $(".check_product").each(function(i) {
365 if($(this).attr('checked')) {
366 args += '&check['+$(this).val()+']=on';
367 }
368 });
369 location.href = "<?php echo USCES_ADMIN_URL; ?>?page=usces_orderlist&order_action=dlproductlist&noheader=true"+args;
370 });
371 $('#dl_productlist').click(function() {
372 $('#dlProductListDialog').dialog('open');
373 });
374
375 $("#dlOrderListDialog").dialog({
376 bgiframe: true,
377 autoOpen: false,
378 height: 600,
379 width: 700,
380 resizable: true,
381 modal: true,
382 buttons: {
383 '<?php _e('close', 'usces'); ?>': function() {
384 $(this).dialog('close');
385 }
386 },
387 close: function() {
388 }
389 });
390 $('#dl_ord').click(function() {
391 //20120123ysk start 0000385
392 //var args = "&search[column]="+$(':input[name="search[column]"]').val()
393 // +"&search[word]["+$("#searchselect").val()+"]="+$(':input[name="search[word]['+$("#searchselect").val()+']"]').val()
394 // +"&search[period]="+$(':input[name="search[period]"]').val()
395 // +"&searchSwitchStatus="+$(':input[name="searchSwitchStatus"]').val()
396 // +"&ftype="+$(':input[name="ftype_ord[]"]:checked').val();
397 var args = "&search[column]="+$(':input[name="search[column]"]').val()
398 +"&search[sku]="+$(':input[name="search[sku]"]').val()
399 +"&search[word]["+$("#searchselect").val()+"]="+$(':input[name="search[word]['+$("#searchselect").val()+']"]').val()
400 +"&search[skuword]["+$("#searchselectsku").val()+"]="+$(':input[name="search[skuword]['+$("#searchselectsku").val()+']"]').val()
401 +"&search[period]="+$(':input[name="search[period]"]').val()
402 +"&searchSwitchStatus="+$(':input[name="searchSwitchStatus"]').val()
403 +"&ftype=csv";
404 //20120123ysk end
405 $(".check_order").each(function(i) {
406 if($(this).attr('checked')) {
407 args += '&check['+$(this).val()+']=on';
408 }
409 });
410 location.href = "<?php echo USCES_ADMIN_URL; ?>?page=usces_orderlist&order_action=dlorderlist&noheader=true"+args;
411 });
412 $('#dl_orderlist').click(function() {
413 $('#dlOrderListDialog').dialog('open');
414 });
415 <?php do_action('usces_action_order_list_document_ready_js'); ?>
416 //20100908ysk end
417 });
418 </script>
419
420 <div class="wrap">
421 <div class="usces_admin">
422 <form action="<?php echo USCES_ADMIN_URL.'?page=usces_orderlist'; ?>" method="post" name="tablesearch" id="form_tablesearch">
423
424 <h2>Welcart Management <?php _e('Order List','usces'); ?></h2>
425 <p class="version_info">Version <?php echo USCES_VERSION; ?></p>
426 <div id="aniboxStatus" class="<?php echo $status; ?>">
427 <div id="anibox" class="clearfix">
428 <img src="<?php echo USCES_PLUGIN_URL; ?>/images/list_message_<?php echo $status; ?>.gif" />
429 <div class="mes" id="info_massage"><?php echo $message; ?></div>
430 </div>
431 </div>
432
433 <div id="datatable">
434 <div id="tablenavi"><?php echo $dataTableNavigation ?></div>
435
436 <div id="tablesearch">
437 <div id="searchBox">
438 <table id="search_table">
439 <tr>
440 <td><?php _e('search fields', 'usces'); ?></td>
441 <td><select name="search[column]" class="searchselect" id="searchselect">
442 <option value="none"> </option>
443 <?php foreach ((array)$arr_column as $key => $value):
444 if($value == $arr_search['column']){
445 $selected = ' selected="selected"';
446 }else{
447 $selected = '';
448 }
449 if($value == 'total_price') continue;
450 ?>
451 <option value="<?php echo esc_attr($value); ?>"<?php echo $selected ?>><?php echo esc_html($key); ?></option>
452 <?php endforeach; ?>
453 </select></td>
454 <td id="searchlabel"></td>
455 <td id="searchfield"></td>
456 <td rowspan="2"><input name="searchIn" type="submit" class="searchbutton" value="<?php _e('Search', 'usces'); ?>" />
457 <input name="searchOut" type="submit" class="searchbutton" value="<?php _e('Cancellation', 'usces'); ?>" />
458 <input name="searchSwitchStatus" id="searchSwitchStatus" type="hidden" value="<?php echo esc_attr($DT->searchSwitchStatus); ?>" />
459 </td>
460 </tr>
461 <td><?php _e('search fields', 'usces'); ?></td>
462 <td><select name="search[sku]" class="searchselect" id="searchselectsku">
463 <option value="none"> </option>
464 <option value="item_code"<?php echo ( 'item_code' == $arr_search['sku'] ? ' selected="selected"' : '') ?>><?php _e('item code', 'usces'); ?></option>
465 <option value="item_name"<?php echo ( 'item_name' == $arr_search['sku'] ? ' selected="selected"' : '') ?>><?php _e('item name', 'usces'); ?></option>
466 </select>
467 </td>
468 <td id="searchlabelsku"></td>
469 <td id="searchfieldsku"></td>
470 <tr>
471 </tr>
472 </table>
473 <table id="period_table">
474 <tr>
475 <?php echo apply_filters( 'usces_filter_order_list_period_table', '' ); ?>
476 <td><?php _e('Period', 'usces'); ?></td>
477 <td><select name="search[period]" class="searchselect">
478 <?php foreach ((array)$DT->arr_period as $key => $value):
479 if($key == $arr_search['period']){
480 $selected = ' selected="selected"';
481 }else{
482 $selected = '';
483 }
484 ?>
485 <option value="<?php echo esc_attr($key); ?>"<?php echo $selected ?>><?php echo esc_html($value); ?></option>
486 <?php endforeach; ?>
487 </select></td>
488 </tr>
489 </table>
490 <table id="change_table">
491 <tr>
492 <td><?php _e('Oparation in bulk', 'usces'); ?></td>
493 <td><select name="allchange[column]" class="searchselect" id="changeselect">
494 <option value="none"> </option>
495 <option value="order_reciept"><?php _e('Edit the receiving money status', 'usces'); ?></option>
496 <option value="order_status"><?php _e('Edit of status process', 'usces'); ?></option>
497 <option value="delete"><?php _e('Delete in bulk', 'usces'); ?></option>
498 <?php echo apply_filters( 'usces_filter_allchange_column', '' ); ?>
499 </select></td>
500 <td id="changelabel"></td>
501 <td id="changefield"></td>
502 <td><input name="collective_change" type="button" class="searchbutton" id="collective_change" value="<?php _e('start', 'usces'); ?>" />
503 </td>
504 </tr>
505 </table>
506 <input name="collective" id="orderlistaction" type="hidden" />
507 <!--20100908ysk start-->
508 <table id="dl_list_table">
509 <tr>
510 <?php echo apply_filters('usces_filter_dl_list_table', ''); ?>
511 <td><input type="button" id="dl_productlist" class="searchbutton" value="<?php _e('Download Product List', 'usces'); ?>" /></td>
512 <td><input type="button" id="dl_orderlist" class="searchbutton" value="<?php _e('Download Order List', 'usces'); ?>" /></td>
513 </tr>
514 </table>
515 <!--20100908ysk end-->
516 </div>
517 <?php do_action( 'usces_action_order_list_searchbox' ); ?>
518 </div>
519
520 <table id="mainDataTable" cellspacing="1">
521 <?php
522 //20120612ysk start 0000501
523 $list_header = '<th scope="col"><input name="allcheck" type="checkbox" value="" /></th>';
524 foreach( (array)$arr_header as $value ) {
525 $list_header .= '<th scope="col">'.$value.'</th>';
526 }
527 $list_header .= '<th scope="col">&nbsp;</th>';
528 //20120612ysk end
529 ?>
530 <tr>
531 <?php echo apply_filters('usces_filter_order_list_header', $list_header, $arr_header);//20120612ysk 0000501 ?>
532 </tr>
533 <?php foreach ( (array)$rows as $array ) : ?>
534 <?php
535 //20120612ysk start 0000501
536 $list_detail = '<td align="center"><input name="listcheck[]" type="checkbox" value="'.$array['ID'].'" /></td>';
537 foreach( (array)$array as $key => $value ) {
538 if( WCUtils::is_blank($value) ) $value = '&nbsp;';
539 if( $key === 'ID' || $key === 'deco_id' ) {
540 $list_detail .= '<td><a href="'.USCES_ADMIN_URL.'?page=usces_orderlist&order_action=edit&order_id='.$array['ID'].'&usces_referer='.$curent_url.'">'.esc_html($value).'</a></td>';
541 } elseif( $key === 'date' ) {
542 $list_detail .= '<td>'.esc_html($value).'</td>';
543 } elseif( $key === 'mem_id' ) {
544 if( WCUtils::is_zero($value) ) $value = '&nbsp;';
545 $list_detail .= '<td>'.esc_html($value).'</td>';
546 } elseif( $key === 'name' ) {
547 switch( $applyform ) {
548 case 'JP':
549 $list_detail .= '<td>'.esc_html($value).'</td>';
550 break;
551 case 'US':
552 default:
553 $names = explode(' ', $value);
554 $list_detail .= '<td>'.esc_html($names[1].' '.$names[0]).'</td>';
555 }
556 } elseif( $key === 'pref' ) {
557 if( $value == __('-- Select --','usces') ) {
558 $list_detail .= '<td>&nbsp;</td>';
559 } else {
560 $list_detail .= '<td>'.esc_html($value).'</td>';
561 }
562 } elseif( $key === 'delivery_method' ) {
563 if( -1 != $value ) {
564 $delivery_method_index = $this->get_delivery_method_index($value);
565 $value = ( isset( $this->options['delivery_method'][$delivery_method_index]['name'] ) ) ? $this->options['delivery_method'][$delivery_method_index]['name'] : '&nbsp;';
566 } else {
567 $value = '&nbsp;';
568 }
569 $list_detail .= '<td class="green">'.esc_html($value).'</td>';
570 } elseif( $key === 'total_price' ) {
571 $list_detail .= '<td class="price">'.usces_crform( $value, true, false, 'return' ).'</td>';
572 } elseif( $key === 'payment_name' ) {
573 if( $value == '#none#' ) {
574 $list_detail .= '<td>&nbsp;</td>';
575 } else {
576 $list_detail .= '<td>'.esc_html($value).'</td>';
577 }
578 } elseif( $key === 'receipt_status' ) {
579 if( $value == __('unpaid', 'usces') ) {
580 $list_detail .= '<td class="red">'.esc_html($value).'</td>';
581 } elseif( $value == 'Pending' ) {
582 $list_detail .= '<td class="red">'.esc_html($value).'</td>';
583 } elseif( $value == __('payment confirmed', 'usces') ) {
584 $list_detail .= '<td class="green">'.esc_html($value).'</td>';
585 } else {
586 $list_detail .= '<td>'.esc_html($value).'</td>';
587 }
588 } elseif( $key === 'order_status' ) {
589 if( $value == __('It has sent it out.', 'usces') ) {
590 $list_detail .= '<td class="green">'.esc_html($value).'</td>';
591 } else {
592 $list_detail .= '<td>'.esc_html($value).'</td>';
593 }
594 } elseif( $key === 'order_modified' ) {
595 $list_detail .= '<td>'.esc_html($value).'</td>';
596 }
597 }
598 $list_detail .= '<td><a href="'.USCES_ADMIN_URL.'?page=usces_orderlist&order_action=delete&order_id='.$array['ID'].'" onclick="return deleteconfirm(\''.$array['ID'].'\');"><span style="color:#FF0000; font-size:9px;">'.__('Delete', 'usces').'</span></a></td>';
599 //20120612ysk end
600 ?>
601 <tr<?php echo apply_filters('usces_filter_order_list_detail_trclass', '', $array); ?>>
602 <?php echo apply_filters('usces_filter_order_list_detail', $list_detail, $array, $curent_url);//20120612ysk 0000501 ?>
603 </tr>
604 <?php endforeach; ?>
605 </table>
606
607 </div>
608 [memory peak usage] <?php echo round(memory_get_peak_usage()/1048576, 1); ?>Mb
609
610 <!--20100908ysk start-->
611 <div id="dlProductListDialog" title="<?php _e('Download Product List', 'usces'); ?>">
612 <p><?php _e('Select the item you want, please press the download.', 'usces'); ?></p>
613 <fieldset>
614 <input type="button" id="dl_pro" value="<?php _e('Download', 'usces'); ?>" />
615 </fieldset>
616 <fieldset><legend><?php _e('Header Information', 'usces'); ?></legend>
617 <label for="chk_pro[ID]"><input type="checkbox" class="check_product" id="chk_pro[ID]" value="ID" checked disabled /><?php _e('ID', 'usces'); ?></label>
618 <label for="chk_pro[deco_id]"><input type="checkbox" class="check_product" id="chk_pro[deco_id]" value="deco_id" checked disabled /><?php _e('order number', 'usces'); ?></label>
619 <label for="chk_pro[date]"><input type="checkbox" class="check_product" id="chk_pro[date]" value="date"<?php usces_checked($chk_pro, 'date'); ?> /><?php _e('order date', 'usces'); ?></label>
620 <label for="chk_pro[mem_id]"><input type="checkbox" class="check_product" id="chk_pro[mem_id]" value="mem_id"<?php usces_checked($chk_pro, 'mem_id'); ?> /><?php _e('membership number', 'usces'); ?></label>
621 <label for="chk_pro[name]"><input type="checkbox" class="check_product" id="chk_pro[name]" value="name"<?php usces_checked($chk_pro, 'name'); ?> /><?php _e('name', 'usces'); ?></label>
622 <label for="chk_pro[delivery_method]"><input type="checkbox" class="check_product" id="chk_pro[delivery_method]" value="delivery_method"<?php usces_checked($chk_pro, 'delivery_method'); ?> /><?php _e('shipping option','usces'); ?></label>
623 <label for="chk_pro[shipping_date]"><input type="checkbox" class="check_product" id="chk_pro[shipping_date]" value="shipping_date"<?php usces_checked($chk_pro, 'shipping_date'); ?> /><?php _e('shpping date', 'usces'); ?></label>
624 <?php do_action( 'usces_action_chk_pro_head', $chk_pro ); ?>
625 </fieldset>
626 <fieldset><legend><?php _e('Product Information', 'usces'); ?></legend>
627 <label for="chk_pro[item_code]"><input type="checkbox" class="check_product" id="chk_pro[item_code]" value="item_code" checked disabled /><?php _e('item code', 'usces'); ?></label>
628 <label for="chk_pro[sku_code]"><input type="checkbox" class="check_product" id="chk_pro[sku_code]" value="sku_code" checked disabled /><?php _e('SKU code', 'usces'); ?></label>
629 <label for="chk_pro[item_name]"><input type="checkbox" class="check_product" id="chk_pro[item_name]" value="item_name"<?php usces_checked($chk_pro, 'item_name'); ?> /><?php _e('item name', 'usces'); ?></label>
630 <label for="chk_pro[sku_name]"><input type="checkbox" class="check_product" id="chk_pro[sku_name]" value="sku_name"<?php usces_checked($chk_pro, 'sku_name'); ?> /><?php _e('SKU display name ', 'usces'); ?></label>
631 <label for="chk_pro[options]"><input type="checkbox" class="check_product" id="chk_pro[options]" value="options"<?php usces_checked($chk_pro, 'options'); ?> /><?php _e('options for items', 'usces'); ?></label>
632 <label for="chk_pro[quantity]"><input type="checkbox" class="check_product" id="chk_pro[quantity]" value="quantity" checked disabled /><?php _e('Quantity','usces'); ?></label>
633 <label for="chk_pro[price]"><input type="checkbox" class="check_product" id="chk_pro[price]" value="price" checked disabled /><?php _e('Unit price','usces'); ?></label>
634 <label for="chk_pro[unit]"><input type="checkbox" class="check_product" id="chk_pro[unit]" value="unit"<?php usces_checked($chk_pro, 'unit'); ?> /><?php _e('unit', 'usces'); ?></label>
635 <?php do_action( 'usces_action_chk_pro_detail', $chk_pro ); ?>
636 </fieldset>
637 </div>
638 <div id="dlOrderListDialog" title="<?php _e('Download Order List', 'usces'); ?>">
639 <p><?php _e('Select the item you want, please press the download.', 'usces'); ?></p>
640 <fieldset>
641 <input type="button" id="dl_ord" value="<?php _e('Download', 'usces'); ?>" />
642 </fieldset>
643 <fieldset><legend><?php _e('Customer Information', 'usces'); ?></legend>
644 <label for="chk_ord[ID]"><input type="checkbox" class="check_order" id="chk_ord[ID]" value="ID" checked disabled /><?php _e('ID', 'usces'); ?></label>
645 <label for="chk_ord[deco_id]"><input type="checkbox" class="check_order" id="chk_ord[deco_id]" value="deco_id" checked disabled /><?php _e('Order number', 'usces'); ?></label>
646 <label for="chk_ord[date]"><input type="checkbox" class="check_order" id="chk_ord[date]" value="date" checked disabled /><?php _e('order date', 'usces'); ?></label>
647 <label for="chk_ord[mem_id]"><input type="checkbox" class="check_order" id="chk_ord[mem_id]" value="mem_id"<?php usces_checked($chk_ord, 'mem_id'); ?> /><?php _e('membership number', 'usces'); ?></label>
648 <label for="chk_ord[email]"><input type="checkbox" class="check_order" id="chk_ord[email]" value="email"<?php usces_checked($chk_ord, 'email'); ?> /><?php _e('e-mail', 'usces'); ?></label>
649 <?php
650 if(!empty($cscs_meta)) {
651 foreach($cscs_meta as $key => $entry) {
652 if($entry['position'] == 'name_pre') {
653 //20110208ysk start
654 $cscs_key = 'cscs_'.$key;
655 //$checked = ($chk_ord[$entry['name']] == 1) ? ' checked' : '';
656 //$checked = ($chk_ord[$cscs_key] == 1) ? ' checked' : '';
657 $checked = usces_checked( $chk_ord, $cscs_key, 'return' );
658 $name = esc_attr($entry['name']);
659 //echo '<label for="chk_ord['.$name.']"><input type="checkbox" class="check_order" id="chk_ord['.$name.']" value="'.$name.'"'.$checked.' />'.$name.'</label>';
660 echo '<label for="chk_ord['.$cscs_key.']"><input type="checkbox" class="check_order" id="chk_ord['.$cscs_key.']" value="'.$cscs_key.'"'.$checked.' />'.$name.'</label>'."\n";//20111116ysk 0000302
661 //20110208ysk end
662 }
663 }
664 }
665 //20110411ysk start
666 ?>
667 <label for="chk_ord[name]"><input type="checkbox" class="check_order" id="chk_ord[name]" value="name" checked disabled /><?php _e('name', 'usces'); ?></label>
668 <?php
669 switch($applyform) {
670 case 'JP':
671 ?>
672 <label for="chk_ord[kana]"><input type="checkbox" class="check_order" id="chk_ord[kana]" value="kana"<?php usces_checked($chk_ord, 'kana'); ?> /><?php _e('furigana', 'usces'); ?></label>
673 <?php
674 break;
675 }
676 //20110411ysk end
677
678 if(!empty($cscs_meta)) {
679 foreach($cscs_meta as $key => $entry) {
680 if($entry['position'] == 'name_after') {
681 //20110208ysk start
682 $cscs_key = 'cscs_'.$key;
683 //$checked = ($chk_ord[$entry['name']] == 1) ? ' checked' : '';
684 //$checked = ($chk_ord[$cscs_key] == 1) ? ' checked' : '';
685 $checked = usces_checked( $chk_ord, $cscs_key, 'return' );
686 $name = esc_attr($entry['name']);
687 //echo '<label for="chk_ord['.$name.']"><input type="checkbox" class="check_order" id="chk_ord['.$name.']" value="'.$name.'"'.$checked.' />'.$name.'</label>';
688 echo '<label for="chk_ord['.$cscs_key.']"><input type="checkbox" class="check_order" id="chk_ord['.$cscs_key.']" value="'.$cscs_key.'"'.$checked.' />'.$name.'</label>'."\n";//20111116ysk 0000302
689 //20110208ysk end
690 }
691 }
692 }
693
694 //20110411ysk start
695 switch($applyform) {
696 case 'JP':
697 ?>
698 <label for="chk_ord[zip]"><input type="checkbox" class="check_order" id="chk_ord[zip]" value="zip"<?php usces_checked($chk_ord, 'zip'); ?> /><?php _e('Zip/Postal Code', 'usces'); ?></label>
699 <label for="chk_ord[country]"><input type="checkbox" class="check_order" id="chk_ord[country]" value="country"<?php usces_checked($chk_ord, 'country'); ?> /><?php _e('Country', 'usces'); ?></label>
700 <label for="chk_ord[pref]"><input type="checkbox" class="check_order" id="chk_ord[pref]" value="pref"<?php usces_checked($chk_ord, 'pref'); ?> /><?php _e('Province', 'usces'); ?></label>
701 <label for="chk_ord[address1]"><input type="checkbox" class="check_order" id="chk_ord[address1]" value="address1"<?php usces_checked($chk_ord, 'address1'); ?> /><?php _e('city', 'usces'); ?></label>
702 <label for="chk_ord[address2]"><input type="checkbox" class="check_order" id="chk_ord[address2]" value="address2"<?php usces_checked($chk_ord, 'address2'); ?> /><?php _e('numbers', 'usces'); ?></label>
703 <label for="chk_ord[address3]"><input type="checkbox" class="check_order" id="chk_ord[address3]" value="address3"<?php usces_checked($chk_ord, 'address3'); ?> /><?php _e('building name', 'usces'); ?></label>
704 <label for="chk_ord[tel]"><input type="checkbox" class="check_order" id="chk_ord[tel]" value="tel"<?php usces_checked($chk_ord, 'tel'); ?> /><?php _e('Phone number', 'usces'); ?></label>
705 <label for="chk_ord[fax]"><input type="checkbox" class="check_order" id="chk_ord[fax]" value="fax"<?php usces_checked($chk_ord, 'fax'); ?> /><?php _e('FAX number', 'usces'); ?></label>
706 <?php
707 break;
708 case 'US':
709 default:
710 ?>
711 <label for="chk_ord[address2]"><input type="checkbox" class="check_order" id="chk_ord[address2]" value="address2"<?php usces_checked($chk_ord, 'address2'); ?> /><?php _e('Address Line1', 'usces'); ?></label>
712 <label for="chk_ord[address3]"><input type="checkbox" class="check_order" id="chk_ord[address3]" value="address3"<?php usces_checked($chk_ord, 'address3'); ?> /><?php _e('Address Line2', 'usces'); ?></label>
713 <label for="chk_ord[address1]"><input type="checkbox" class="check_order" id="chk_ord[address1]" value="address1"<?php usces_checked($chk_ord, 'address1'); ?> /><?php _e('city', 'usces'); ?></label>
714 <label for="chk_ord[pref]"><input type="checkbox" class="check_order" id="chk_ord[pref]" value="pref"<?php usces_checked($chk_ord, 'pref'); ?> /><?php _e('State', 'usces'); ?></label>
715 <label for="chk_ord[country]"><input type="checkbox" class="check_order" id="chk_ord[country]" value="country"<?php usces_checked($chk_ord, 'country'); ?> /><?php _e('Country', 'usces'); ?></label>
716 <label for="chk_ord[zip]"><input type="checkbox" class="check_order" id="chk_ord[zip]" value="zip"<?php usces_checked($chk_ord, 'zip'); ?> /><?php _e('Zip', 'usces'); ?></label>
717 <label for="chk_ord[tel]"><input type="checkbox" class="check_order" id="chk_ord[tel]" value="tel"<?php usces_checked($chk_ord, 'tel'); ?> /><?php _e('Phone number', 'usces'); ?></label>
718 <label for="chk_ord[fax]"><input type="checkbox" class="check_order" id="chk_ord[fax]" value="fax"<?php usces_checked($chk_ord, 'fax'); ?> /><?php _e('FAX number', 'usces'); ?></label>
719 <?php
720 break;
721 }
722 //20110411ysk end
723
724 if(!empty($cscs_meta)) {
725 foreach($cscs_meta as $key => $entry) {
726 if($entry['position'] == 'fax_after') {
727 //20110208ysk start
728 $cscs_key = 'cscs_'.$key;
729 //$checked = ($chk_ord[$entry['name']] == 1) ? ' checked' : '';
730 //$checked = ($chk_ord[$cscs_key] == 1) ? ' checked' : '';
731 $checked = usces_checked( $chk_ord, $cscs_key, 'return' );
732 $name = esc_attr($entry['name']);
733 //echo '<label for="chk_ord['.$name.']"><input type="checkbox" class="check_order" id="chk_ord['.$name.']" value="'.$name.'"'.$checked.' />'.$name.'</label>';
734 echo '<label for="chk_ord['.$cscs_key.']"><input type="checkbox" class="check_order" id="chk_ord['.$cscs_key.']" value="'.$cscs_key.'"'.$checked.' />'.$name.'</label>'."\n";//20111116ysk 0000302
735 //20110208ysk end
736 }
737 }
738 }
739 ?>
740 <?php do_action( 'usces_action_chk_ord_customer', $chk_ord ); ?>
741 </fieldset>
742 <fieldset><legend><?php _e('Shipping address information', 'usces'); ?></legend>
743 <?php
744 if(!empty($csde_meta)) {
745 foreach($csde_meta as $key => $entry) {
746 if($entry['position'] == 'name_pre') {
747 //20110208ysk start
748 $csde_key = 'csde_'.$key;
749 //$checked = ($chk_ord[$entry['name']] == 1) ? ' checked' : '';
750 //$checked = ($chk_ord[$csde_key] == 1) ? ' checked' : '';
751 $checked = usces_checked( $chk_ord, $csde_key, 'return' );
752 $name = esc_attr($entry['name']);
753 //echo '<label for="chk_ord['.$name.']"><input type="checkbox" class="check_order" id="chk_ord['.$name.']" value="'.$name.'"'.$checked.' />'.$name.'</label>';
754 echo '<label for="chk_ord['.$csde_key.']"><input type="checkbox" class="check_order" id="chk_ord['.$csde_key.']" value="'.$csde_key.'"'.$checked.' />'.$name.'</label>'."\n";//20111116ysk 0000302
755 //20110208ysk end
756 }
757 }
758 }
759 //20110411ysk start
760 ?>
761 <label for="chk_ord[delivery_name]"><input type="checkbox" class="check_order" id="chk_ord[delivery_name]" value="delivery_name"<?php usces_checked($chk_ord, 'delivery_name'); ?> /><?php _e('name', 'usces'); ?></label>
762 <?php
763 switch($applyform) {
764 case 'JP':
765 ?>
766 <label for="chk_ord[delivery_kana]"><input type="checkbox" class="check_order" id="chk_ord[delivery_kana]" value="delivery_kana"<?php usces_checked($chk_ord, 'delivery_kana'); ?> /><?php _e('furigana', 'usces'); ?></label>
767 <?php
768 break;
769 }
770 //20110411ysk end
771
772 if(!empty($csde_meta)) {
773 foreach($csde_meta as $key => $entry) {
774 if($entry['position'] == 'name_after') {
775 //20110208ysk start
776 $csde_key = 'csde_'.$key;
777 //$checked = ($chk_ord[$entry['name']] == 1) ? ' checked' : '';
778 //$checked = ($chk_ord[$csde_key] == 1) ? ' checked' : '';
779 $checked = usces_checked( $chk_ord, $csde_key, 'return' );
780 $name = esc_attr($entry['name']);
781 //echo '<label for="chk_ord['.$name.']"><input type="checkbox" class="check_order" id="chk_ord['.$name.']" value="'.$name.'"'.$checked.' />'.$name.'</label>';
782 echo '<label for="chk_ord['.$csde_key.']"><input type="checkbox" class="check_order" id="chk_ord['.$csde_key.']" value="'.$csde_key.'"'.$checked.' />'.$name.'</label>'."\n";//20111116ysk 0000302
783 //20110208ysk end
784 }
785 }
786 }
787
788 //20110411ysk start
789 switch($applyform) {
790 case 'JP':
791 ?>
792 <label for="chk_ord[delivery_zip]"><input type="checkbox" class="check_order" id="chk_ord[delivery_zip]" value="delivery_zip"<?php usces_checked($chk_ord, 'delivery_zip'); ?> /><?php _e('Zip/Postal Code', 'usces'); ?></label>
793 <label for="chk_ord[delivery_country]"><input type="checkbox" class="check_order" id="chk_ord[delivery_country]" value="delivery_country"<?php usces_checked($chk_ord, 'delivery_country'); ?> /><?php _e('Country', 'usces'); ?></label>
794 <label for="chk_ord[delivery_pref]"><input type="checkbox" class="check_order" id="chk_ord[delivery_pref]" value="delivery_pref"<?php usces_checked($chk_ord, 'delivery_pref'); ?> /><?php _e('Province', 'usces'); ?></label>
795 <label for="chk_ord[delivery_address1]"><input type="checkbox" class="check_order" id="chk_ord[delivery_address1]" value="delivery_address1"<?php usces_checked($chk_ord, 'delivery_address1'); ?> /><?php _e('city', 'usces'); ?></label>
796 <label for="chk_ord[delivery_address2]"><input type="checkbox" class="check_order" id="chk_ord[delivery_address2]" value="delivery_address2"<?php usces_checked($chk_ord, 'delivery_address2'); ?> /><?php _e('numbers', 'usces'); ?></label>
797 <label for="chk_ord[delivery_address3]"><input type="checkbox" class="check_order" id="chk_ord[delivery_address3]" value="delivery_address3"<?php usces_checked($chk_ord, 'delivery_address3'); ?> /><?php _e('building name', 'usces'); ?></label>
798 <label for="chk_ord[delivery_tel]"><input type="checkbox" class="check_order" id="chk_ord[delivery_tel]" value="delivery_tel"<?php usces_checked($chk_ord, 'delivery_tel'); ?> /><?php _e('Phone number', 'usces'); ?></label>
799 <label for="chk_ord[delivery_fax]"><input type="checkbox" class="check_order" id="chk_ord[delivery_fax]" value="delivery_fax"<?php usces_checked($chk_ord, 'delivery_fax'); ?> /><?php _e('FAX number', 'usces'); ?></label>
800 <?php
801 break;
802 case 'US':
803 default:
804 ?>
805 <label for="chk_ord[delivery_address2]"><input type="checkbox" class="check_order" id="chk_ord[delivery_address2]" value="delivery_address2"<?php usces_checked($chk_ord, 'delivery_address2'); ?> /><?php _e('Address Line1', 'usces'); ?></label>
806 <label for="chk_ord[delivery_address3]"><input type="checkbox" class="check_order" id="chk_ord[delivery_address3]" value="delivery_address3"<?php usces_checked($chk_ord, 'delivery_address3'); ?> /><?php _e('Address Line2', 'usces'); ?></label>
807 <label for="chk_ord[delivery_address1]"><input type="checkbox" class="check_order" id="chk_ord[delivery_address1]" value="delivery_address1"<?php usces_checked($chk_ord, 'delivery_address1'); ?> /><?php _e('city', 'usces'); ?></label>
808 <label for="chk_ord[delivery_pref]"><input type="checkbox" class="check_order" id="chk_ord[delivery_pref]" value="delivery_pref"<?php usces_checked($chk_ord, 'delivery_pref'); ?> /><?php _e('State', 'usces'); ?></label>
809 <label for="chk_ord[delivery_country]"><input type="checkbox" class="check_order" id="chk_ord[delivery_country]" value="delivery_country"<?php usces_checked($chk_ord, 'delivery_country'); ?> /><?php _e('Country', 'usces'); ?></label>
810 <label for="chk_ord[delivery_zip]"><input type="checkbox" class="check_order" id="chk_ord[delivery_zip]" value="delivery_zip"<?php usces_checked($chk_ord, 'delivery_zip'); ?> /><?php _e('Zip', 'usces'); ?></label>
811 <label for="chk_ord[delivery_tel]"><input type="checkbox" class="check_order" id="chk_ord[delivery_tel]" value="delivery_tel"<?php usces_checked($chk_ord, 'delivery_tel'); ?> /><?php _e('Phone number', 'usces'); ?></label>
812 <label for="chk_ord[delivery_fax]"><input type="checkbox" class="check_order" id="chk_ord[delivery_fax]" value="delivery_fax"<?php usces_checked($chk_ord, 'delivery_fax'); ?> /><?php _e('FAX number', 'usces'); ?></label>
813 <?php
814 break;
815 }
816 //20110411ysk end
817
818 if(!empty($csde_meta)) {
819 foreach($csde_meta as $key => $entry) {
820 if($entry['position'] == 'fax_after') {
821 //20110208ysk start
822 $csde_key = 'csde_'.$key;
823 //$checked = ($chk_ord[$entry['name']] == 1) ? ' checked' : '';
824 //$checked = ($chk_ord[$csde_key] == 1) ? ' checked' : '';
825 $checked = usces_checked( $chk_ord, $csde_key, 'return' );
826 $name = esc_attr($entry['name']);
827 //echo '<label for="chk_ord['.$name.']"><input type="checkbox" class="check_order" id="chk_ord['.$name.']" value="'.$name.'"'.$checked.' />'.$name.'</label>';
828 echo '<label for="chk_ord['.$csde_key.']"><input type="checkbox" class="check_order" id="chk_ord['.$csde_key.']" value="'.$csde_key.'"'.$checked.' />'.$name.'</label>'."\n";//20111116ysk 0000302
829 //20110208ysk end
830 }
831 }
832 }
833 ?>
834 <?php do_action( 'usces_action_chk_ord_delivery', $chk_ord ); ?>
835 </fieldset>
836 <fieldset><legend><?php _e('Order Infomation', 'usces'); ?></legend>
837 <label for="chk_ord[shipping_date]"><input type="checkbox" class="check_order" id="chk_ord[shipping_date]" value="shipping_date"<?php usces_checked($chk_ord, 'shipping_date'); ?> /><?php _e('shpping date', 'usces'); ?></label>
838 <label for="chk_ord[peyment_method]"><input type="checkbox" class="check_order" id="chk_ord[peyment_method]" value="peyment_method"<?php usces_checked($chk_ord, 'peyment_method'); ?> /><?php _e('payment method','usces'); ?></label>
839 <label for="chk_ord[delivery_method]"><input type="checkbox" class="check_order" id="chk_ord[delivery_method]" value="delivery_method"<?php usces_checked($chk_ord, 'delivery_method'); ?> /><?php _e('shipping option','usces'); ?></label>
840 <!--20101208ysk start-->
841 <label for="chk_ord[delivery_date]"><input type="checkbox" class="check_order" id="chk_ord[delivery_date]" value="delivery_date"<?php usces_checked($chk_ord, 'delivery_date'); ?> /><?php _e('Delivery date','usces'); ?></label>
842 <!--20101208ysk end-->
843 <label for="chk_ord[delivery_time]"><input type="checkbox" class="check_order" id="chk_ord[delivery_time]" value="delivery_time"<?php usces_checked($chk_ord, 'delivery_time'); ?> /><?php _e('delivery time','usces'); ?></label>
844 <label for="chk_ord[delidue_date]"><input type="checkbox" class="check_order" id="chk_ord[delidue_date]" value="delidue_date"<?php usces_checked($chk_ord, 'delidue_date'); ?> /><?php _e('Shipping date', 'usces'); ?></label>
845 <label for="chk_ord[status]"><input type="checkbox" class="check_order" id="chk_ord[status]" value="status"<?php usces_checked($chk_ord, 'status'); ?> /><?php _e('Status', 'usces'); ?></label>
846 <label for="chk_ord[total_amount]"><input type="checkbox" class="check_order" id="chk_ord[total_amount]" value="total_amount" checked disabled /><?php _e('Total Amount', 'usces'); ?></label>
847 <label for="chk_ord[getpoint]"><input type="checkbox" class="check_order" id="chk_ord[getpoint]" value="getpoint"<?php usces_checked($chk_ord, 'getpoint'); ?> /><?php _e('granted points', 'usces'); ?></label>
848 <label for="chk_ord[usedpoint]"><input type="checkbox" class="check_order" id="chk_ord[usedpoint]" value="usedpoint"<?php usces_checked($chk_ord, 'usedpoint'); ?> /><?php _e('Used points', 'usces'); ?></label>
849 <label for="chk_ord[discount]"><input type="checkbox" class="check_order" id="chk_ord[discount]" value="discount" checked disabled /><?php _e('Disnount', 'usces'); ?></label>
850 <label for="chk_ord[shipping_charge]"><input type="checkbox" class="check_order" id="chk_ord[shipping_charge]" value="shipping_charge" checked disabled /><?php _e('Shipping', 'usces'); ?></label>
851 <label for="chk_ord[cod_fee]"><input type="checkbox" class="check_order" id="chk_ord[cod_fee]" value="cod_fee" checked disabled /><?php echo apply_filters('usces_filter_cod_label', __('COD fee', 'usces')); ?></label>
852 <label for="chk_ord[tax]"><input type="checkbox" class="check_order" id="chk_ord[tax]" value="tax" checked disabled /><?php _e('consumption tax', 'usces'); ?></label>
853 <label for="chk_ord[note]"><input type="checkbox" class="check_order" id="chk_ord[note]" value="note"<?php usces_checked($chk_ord, 'note'); ?> /><?php _e('Notes', 'usces'); ?></label>
854 <?php
855 if(!empty($csod_meta)) {
856 foreach($csod_meta as $key => $entry) {
857 //20110208ysk start
858 $csod_key = 'csod_'.$key;
859 //$checked = ($chk_ord[$entry['name']] == 1) ? ' checked' : '';
860 //$checked = (isset($chk_ord[$csod_key]) && $chk_ord[$csod_key] == 1) ? ' checked' : '';
861 $checked = usces_checked( $chk_ord, $csod_key, 'return' );
862 $name = esc_attr($entry['name']);
863 //echo '<label for="chk_ord['.$name.']"><input type="checkbox" class="check_order" id="chk_ord['.$name.']" value="'.$name.'"'.$checked.' />'.$name.'</label>';
864 echo '<label for="chk_ord['.$csod_key.']"><input type="checkbox" class="check_order" id="chk_ord['.$csod_key.']" value="'.$csod_key.'"'.$checked.' />'.$name.'</label>'."\n";//20111116ysk 0000302
865 //20110208ysk end
866 }
867 }
868 ?>
869 <?php do_action( 'usces_action_chk_ord_order', $chk_ord ); ?>
870 </fieldset>
871 </div>
872 <!--20100908ysk end-->
873 <?php echo apply_filters('usces_filter_order_list_footer', '');//20120612ysk 0000501 ?>
874
875 <!--<div class="chui">
876 <h3>受注詳細画面(作成中)について</h3>
877 <p>各行の受注番号をクリックすると受注詳細画面が表示されます。受注詳細画面では注文商品の追加、修正、削除など受注に関する�
878 �ての�
879 報を編集することができま、問い合わせや電話での変更依頼に対応します。</p>
880 <p>「見積り」ステイタスを利用することで見積りをメール送信できます。見積書印刷でFAX対応も可能です。注文をいただいた場合は「受注」ステイタスに変更することで、見積りの�
881 容がそのまま受注データとなります。</p>
882 <p>その他のステイタスには銀行振り込みの場合の「�
883 �金」ステイタス、発送完了した場合の「完了」、注文の「キャンセル」などがあり、各業務の終了後にステイタスを変更することを習�
884 �付ければ、複数の�
885 当�
886 での業務もスムーズに行うことができます。</p>
887 </div>
888 -->
889 </form>
890 <?php do_action( 'usces_action_order_list_footer' ); ?>
891 </div><!--usces_admin-->
892 </div><!--wrap-->
893 <script type="text/javascript">
894 // rowSelection("mainDataTable");
895 </script>
896