| 1 |
<?php |
| 2 |
/** |
| 3 |
* Order List Page. |
| 4 |
* - New type |
| 5 |
* |
| 6 |
* @package Welcart |
| 7 |
*/ |
| 8 |
|
| 9 |
global $usces_settings; |
| 10 |
|
| 11 |
require_once USCES_PLUGIN_DIR . '/classes/orderList2.class.php'; |
| 12 |
|
| 13 |
// phpcs:disable |
| 14 |
$DT = new WlcOrderList(); |
| 15 |
$arr_column = $DT->get_column(); |
| 16 |
$res = $DT->MakeTable(); |
| 17 |
|
| 18 |
$arr_search = $DT->GetSearchs(); |
| 19 |
$arr_header = $DT->GetListheaders(); |
| 20 |
$dataTableNavigation = $DT->GetDataTableNavigation(); |
| 21 |
$arr_mail_print_fields = get_option( 'usces_order_mail_print_fields' ); |
| 22 |
$rows = $DT->rows; |
| 23 |
$status = apply_filters( 'usces_order_list_action_status', $DT->get_action_status() ); |
| 24 |
$message = apply_filters( 'usces_order_list_action_message', $DT->get_action_message() ); |
| 25 |
// phpcs:enable |
| 26 |
|
| 27 |
$usces_admin_path = ''; |
| 28 |
$admin_perse = explode( '/', $_SERVER['REQUEST_URI'] ); // phpcs:ignore |
| 29 |
$apct = count( $admin_perse ) - 1; |
| 30 |
for ( $ap = 0; $ap < $apct; $ap++ ) { |
| 31 |
$usces_admin_path .= $admin_perse[ $ap ] . '/'; |
| 32 |
} |
| 33 |
$list_option = get_option( 'usces_orderlist_option' ); |
| 34 |
$management_status = apply_filters( 'usces_filter_management_status', get_option( 'usces_management_status' ) ); |
| 35 |
$usces_country = $usces_settings['country']; |
| 36 |
$pref = array(); |
| 37 |
$target_market = $this->options['system']['target_market']; |
| 38 |
|
| 39 |
$order_list_delete_link = ( isset( $this->options['system']['order_list_delete_link'] ) ) ? $this->options['system']['order_list_delete_link'] : 0; |
| 40 |
|
| 41 |
foreach ( (array) $target_market as $country ) { |
| 42 |
$prefs = get_usces_states( $country ); |
| 43 |
$prefs_count = count( $prefs ); |
| 44 |
if ( is_array( $prefs ) && 0 < $prefs_count ) { |
| 45 |
$pos = strpos( $prefs[0], '--' ); |
| 46 |
if ( false !== $pos ) { |
| 47 |
array_shift( $prefs ); |
| 48 |
} |
| 49 |
foreach ( (array) $prefs as $state ) { |
| 50 |
$pref[] = $state; |
| 51 |
} |
| 52 |
} |
| 53 |
} |
| 54 |
$payment_name = array(); |
| 55 |
$payments = usces_get_system_option( 'usces_payment_method', 'sort' ); |
| 56 |
foreach ( (array) $payments as $id => $payment ) { // phpcs:ignore |
| 57 |
$payment_name[ $id ] = $payment['name']; |
| 58 |
} |
| 59 |
foreach ( (array) $management_status as $key => $value ) { |
| 60 |
if ( 'noreceipt' == $key || 'receipted' == $key || 'pending' == $key ) { |
| 61 |
$receipt_status[ $key ] = $value; |
| 62 |
} elseif ( 'adminorder' == $key || 'estimate' == $key ) { |
| 63 |
$estimate_status[ $key ] = $value; |
| 64 |
$estimate_status['frontorder'] = __( 'Order', 'usces' ); |
| 65 |
} else { |
| 66 |
$process_status[ $key ] = $value; |
| 67 |
$process_status['neworder'] = __( 'new order', 'usces' ); |
| 68 |
} |
| 69 |
} |
| 70 |
$curent_url = urlencode( esc_url( USCES_ADMIN_URL . '?' . $_SERVER['QUERY_STRING'] ) ); // phpcs:ignore |
| 71 |
$csod_meta = usces_has_custom_field_meta( 'order' ); |
| 72 |
$cscs_meta = usces_has_custom_field_meta( 'customer' ); |
| 73 |
$csde_meta = usces_has_custom_field_meta( 'delivery' ); |
| 74 |
$usces_opt_order = get_option( 'usces_opt_order' ); |
| 75 |
$usces_opt_order = apply_filters( 'usces_filter_opt_order', $usces_opt_order ); |
| 76 |
$chk_pro = ( isset( $usces_opt_order['chk_pro'] ) ) ? $usces_opt_order['chk_pro'] : array(); |
| 77 |
$chk_ord = ( isset( $usces_opt_order['chk_ord'] ) ) ? $usces_opt_order['chk_ord'] : array(); |
| 78 |
$applyform = usces_get_apply_addressform( $this->options['system']['addressform'] ); |
| 79 |
$settlement_backup = ( isset( $this->options['system']['settlement_backup'] ) ) ? $this->options['system']['settlement_backup'] : 0; |
| 80 |
$settlement_notice = get_option( 'usces_settlement_notice' ); |
| 81 |
$orderPeriod = isset( $_COOKIE['orderPeriod'] ) ? $_COOKIE['orderPeriod'] : ''; // phpcs:ignore |
| 82 |
if ( empty( $orderPeriod ) ) { // phpcs:ignore |
| 83 |
$period = array( |
| 84 |
'period' => 0, |
| 85 |
'start' => '', |
| 86 |
'end' => '', |
| 87 |
); |
| 88 |
} else { |
| 89 |
parse_str( $orderPeriod, $period ); // phpcs:ignore |
| 90 |
} |
| 91 |
if ( 0 == $period['period'] ) { |
| 92 |
$datepic_title = __( 'All of period', 'usces' ); |
| 93 |
} elseif ( 1 == $period['period'] ) { |
| 94 |
$datepic_title = __( 'This month', 'usces' ); |
| 95 |
} elseif ( 2 == $period['period'] ) { |
| 96 |
$datepic_title = __( 'Last month', 'usces' ); |
| 97 |
} else { |
| 98 |
$datepic_title = $period['start'] ? $period['start'] : __( 'first day', 'usces' ); |
| 99 |
$datepic_title .= ' ' . __( 'to', 'usces' ) . ' '; |
| 100 |
$datepic_title .= $period['end'] ? $period['end'] : __( 'today', 'usces' ); |
| 101 |
} |
| 102 |
|
| 103 |
$delivery_method = ( isset( $this->options['delivery_method'] ) ) ? $this->options['delivery_method'] : array(); |
| 104 |
|
| 105 |
$arr_mail_print_status = USCES_DATALIST_UPGRADE::get_value_print_mail(); |
| 106 |
|
| 107 |
?> |
| 108 |
<div class="wrap"> |
| 109 |
<div class="usces_admin"> |
| 110 |
<h1>Welcart Management <?php esc_html_e( 'Order List', 'usces' ); ?></h1> |
| 111 |
<p class="version_info">Version <?php echo esc_html( USCES_VERSION ); ?></p> |
| 112 |
<?php usces_admin_action_status( $status, $message ); ?> |
| 113 |
<div id="datepic_navi" class="datepic"> |
| 114 |
<div id="datepic_title"><span class="dashicons dashicons-calendar-alt"></span><?php echo esc_html( $datepic_title ); ?></div> |
| 115 |
<div id="datepic_form"> |
| 116 |
<p class="datepic_select_date"><input type="text" name="startdate" id="startdate" value="<?php echo esc_attr( $period['start'] ); ?>"><?php esc_html_e( ' - ', 'usces' ); ?><input type="text" name="enddate" id="enddate" value="<?php echo esc_attr( $period['end'] ); ?>"></p> |
| 117 |
<p class="datepic_all_date"> |
| 118 |
<select name="datepic_period" id="datepic_period" > |
| 119 |
<option value="0"<?php echo( '0' == $period['period'] ? ' selected="selected"' : '' ); ?>><?php esc_html_e( 'All of period', 'usces' ); ?></option> |
| 120 |
<option value="1"<?php echo( '1' == $period['period'] ? ' selected="selected"' : '' ); ?>><?php esc_html_e( 'This month', 'usces' ); ?></option> |
| 121 |
<option value="2"<?php echo( '2' == $period['period'] ? ' selected="selected"' : '' ); ?>><?php esc_html_e( 'Last month', 'usces' ); ?></option> |
| 122 |
<option value="3"<?php echo( '3' == $period['period'] ? ' selected="selected"' : '' ); ?>><?php esc_html_e( 'Specify', 'usces' ); ?></option> |
| 123 |
</select> |
| 124 |
</p> |
| 125 |
<p class="datepic_btn"><input type="button" name="apply_datepic" id="apply_datepic" class="button button-primary" value="<?php esc_attr_e( 'Apply' ); ?>"></p> |
| 126 |
<span id="period"></span> |
| 127 |
</div> |
| 128 |
</div> |
| 129 |
<?php do_action( 'usces_action_order_list_header' ); ?> |
| 130 |
|
| 131 |
<form action="<?php echo esc_url( USCES_ADMIN_URL . '?page=usces_orderlist' ); ?>" method="post" name="tablesearch" id="form_tablesearch"> |
| 132 |
<div id="datatable"> |
| 133 |
<div class="usces_tablenav usces_tablenav_top"> |
| 134 |
<?php wel_esc_script_e( $dataTableNavigation ); ?> |
| 135 |
<div id="searchVisiLink" class="screen-field"><?php esc_html_e( 'Show the Operation field', 'usces' ); ?><span class="dashicons dashicons-arrow-down"></span></div> |
| 136 |
<?php |
| 137 |
$url = admin_url( 'admin.php?page=usces_orderlist&refresh' ); |
| 138 |
$nonce_url = wp_nonce_url( $url, 'order_list', 'wc_nonce' ); |
| 139 |
?> |
| 140 |
<div class="refresh"><a href="<?php echo esc_url( $nonce_url ); ?>"><span class="dashicons dashicons-update"></span><?php esc_html_e( 'updates it to latest information', 'usces' ); ?></a></div> |
| 141 |
</div> |
| 142 |
|
| 143 |
<div id="tablesearch" class="usces_tablesearch"> |
| 144 |
<div id="searchBox"> |
| 145 |
|
| 146 |
|
| 147 |
<table class="search_table"> |
| 148 |
<tr> |
| 149 |
<td class="label"><?php esc_html_e( 'Order Search', 'usces' ); ?></td> |
| 150 |
<td> |
| 151 |
<div class="order_search_item search_item"> |
| 152 |
<p class="search_item_label"><?php esc_html_e( 'From order information', 'usces' ); ?></p> |
| 153 |
<p> |
| 154 |
<select name="search[order_column][0]" id="searchorderselect_0" class="searchselect"> |
| 155 |
<option value=""> </option> |
| 156 |
<?php |
| 157 |
foreach ( (array) $arr_column as $key => $value ) : |
| 158 |
if ( $key == $arr_search['order_column'][0] ) { |
| 159 |
$selected = ' selected="selected"'; |
| 160 |
} else { |
| 161 |
$selected = ''; |
| 162 |
} |
| 163 |
$attr_mail_print = ''; |
| 164 |
if ( array_key_exists( $key, $arr_mail_print_fields ) ) { |
| 165 |
$attr_mail_print = ' data-mailprint="' . $arr_mail_print_fields[$key]['type'] . '"'; |
| 166 |
} |
| 167 |
?> |
| 168 |
<option value="<?php echo esc_attr( $key ); ?>"<?php echo esc_attr( $selected ).$attr_mail_print; ?>><?php echo esc_html( $value ); ?></option> |
| 169 |
<?php |
| 170 |
endforeach; |
| 171 |
$arr_search['order_term'] = ( isset( $arr_search['order_term'] ) ) ? $arr_search['order_term'] : 'AND'; |
| 172 |
?> |
| 173 |
</select> |
| 174 |
<span id="searchorderword_0"> |
| 175 |
<input name="search[order_word][0]" type="text" value="<?php echo esc_attr( $arr_search['order_word'][0] ); ?>" class="regular-text" maxlength="50" /> |
| 176 |
<select name="search[order_word_term][0]" class="termselect"> |
| 177 |
<option value="contain"<?php echo ( 'contain' == $arr_search['order_word_term'][0] ? ' selected="selected"' : '' ); ?>><?php esc_html_e( 'Contain', 'usces' ); ?></option> |
| 178 |
<option value="notcontain"<?php echo ( 'notcontain' == $arr_search['order_word_term'][0] ? ' selected="selected"' : '' ); ?>><?php esc_html_e( 'Not Contain', 'usces' ); ?></option> |
| 179 |
<option value="equal"<?php echo ( 'equal' == $arr_search['order_word_term'][0] ? ' selected="selected"' : '' ); ?>><?php esc_html_e( 'Equal', 'usces' ); ?></option> |
| 180 |
<option value="morethan"<?php echo ( 'morethan' == $arr_search['order_word_term'][0] ? ' selected="selected"' : '' ); ?>><?php esc_html_e( 'More than', 'usces' ); ?></option> |
| 181 |
<option value="lessthan"<?php echo ( 'lessthan' == $arr_search['order_word_term'][0] ? ' selected="selected"' : '' ); ?>><?php esc_html_e( 'Less than', 'usces' ); ?></option> |
| 182 |
</select> |
| 183 |
</span> |
| 184 |
</p> |
| 185 |
<p> |
| 186 |
<select name="search[order_term]" class="termselect"> |
| 187 |
<option value="AND">AND</option> |
| 188 |
<option value="OR"<?php echo ( 'OR' == $arr_search['order_term'] ? ' selected="selected"' : '' ); ?>>OR</option> |
| 189 |
</select> |
| 190 |
</p> |
| 191 |
<p> |
| 192 |
<select name="search[order_column][1]" id="searchorderselect_1" class="searchselect"> |
| 193 |
<option value=""> </option> |
| 194 |
<?php |
| 195 |
foreach ( (array) $arr_column as $key => $value ) : |
| 196 |
if ( $key == $arr_search['order_column'][1] ) { |
| 197 |
$selected = ' selected="selected"'; |
| 198 |
} else { |
| 199 |
$selected = ''; |
| 200 |
} |
| 201 |
$attr_mail_print = ''; |
| 202 |
if ( array_key_exists( $key, $arr_mail_print_fields ) ) { |
| 203 |
$attr_mail_print = ' data-mailprint="' . $arr_mail_print_fields[$key]['type'] . '"'; |
| 204 |
} |
| 205 |
?> |
| 206 |
<option value="<?php echo esc_attr( $key ); ?>"<?php echo esc_attr( $selected ).$attr_mail_print; ?>><?php echo esc_html( $value ); ?></option> |
| 207 |
<?php |
| 208 |
endforeach; |
| 209 |
$arr_search['product_term'] = ( isset( $arr_search['product_term'] ) ) ? $arr_search['product_term'] : 'AND'; |
| 210 |
?> |
| 211 |
</select> |
| 212 |
<span id="searchorderword_1"> |
| 213 |
<input name="search[order_word][1]" type="text" value="<?php echo esc_attr( $arr_search['order_word'][1] ); ?>" class="regular-text" maxlength="50" /> |
| 214 |
<select name="search[order_word_term][1]" class="termselect"> |
| 215 |
<option value="contain"<?php echo ( 'contain' == $arr_search['order_word_term'][1] ? ' selected="selected"' : '' ); ?>><?php esc_html_e( 'Contain', 'usces' ); ?></option> |
| 216 |
<option value="notcontain"<?php echo ( 'notcontain' == $arr_search['order_word_term'][1] ? ' selected="selected"' : '' ); ?>><?php esc_html_e( 'Not Contain', 'usces' ); ?></option> |
| 217 |
<option value="equal"<?php echo ( 'equal' == $arr_search['order_word_term'][1] ? ' selected="selected"' : '' ); ?>><?php esc_html_e( 'Equal', 'usces' ); ?></option> |
| 218 |
<option value="morethan"<?php echo ( 'morethan' == $arr_search['order_word_term'][1] ? ' selected="selected"' : '' ); ?>><?php esc_html_e( 'More than', 'usces' ); ?></option> |
| 219 |
<option value="lessthan"<?php echo ( 'lessthan' == $arr_search['order_word_term'][1] ? ' selected="selected"' : '' ); ?>><?php esc_html_e( 'Less than', 'usces' ); ?></option> |
| 220 |
</select> |
| 221 |
</span> |
| 222 |
</p> |
| 223 |
</div> |
| 224 |
|
| 225 |
<div class="search_separate">AND</div> |
| 226 |
|
| 227 |
<div class="product_search_item search_item"> |
| 228 |
<p class="search_item_label"><?php esc_html_e( 'From product information', 'usces' ); ?></p> |
| 229 |
<p> |
| 230 |
<select name="search[product_column][0]" id="searchproductselect_0" class="searchselect"> |
| 231 |
<option value=""> </option> |
| 232 |
<option value="item_code"<?php echo( 'item_code' == $arr_search['product_column'][0] ? ' selected="selected"' : '' ); ?>><?php esc_html_e( 'item code', 'usces' ); ?></option> |
| 233 |
<option value="item_name"<?php echo( 'item_name' == $arr_search['product_column'][0] ? ' selected="selected"' : '' ); ?>><?php esc_html_e( 'item name', 'usces' ); ?></option> |
| 234 |
<option value="sku_code"<?php echo( 'sku_code' == $arr_search['product_column'][0] ? ' selected="selected"' : '' ); ?>><?php esc_html_e( 'SKU code', 'usces' ); ?></option> |
| 235 |
<option value="sku_name"<?php echo( 'sku_name' == $arr_search['product_column'][0] ? ' selected="selected"' : '' ); ?>><?php esc_html_e( 'SKU name', 'usces' ); ?></option> |
| 236 |
<option value="item_option"<?php echo( 'item_option' == $arr_search['product_column'][0] ? ' selected="selected"' : '' ); ?>><?php esc_html_e( 'options for items', 'usces' ); ?></option> |
| 237 |
</select> |
| 238 |
|
| 239 |
<span id="searchproductword_0"><input name="search[product_word][0]" type="text" value="<?php echo esc_attr( $arr_search['product_word'][0] ); ?>" class="regular-text" maxlength="50" /></span> |
| 240 |
</p> |
| 241 |
<p> |
| 242 |
<select name="search[product_term]" class="termselect"> |
| 243 |
<option value="AND">AND</option> |
| 244 |
<option value="OR"<?php echo ( 'OR' == $arr_search['product_term'] ? ' selected="selected"' : '' ); ?>>OR</option> |
| 245 |
</select> |
| 246 |
</p> |
| 247 |
<p> |
| 248 |
<select name="search[product_column][1]" id="searchproductselect_1" class="searchselect"> |
| 249 |
<option value=""> </option> |
| 250 |
<option value="item_code"<?php echo( 'item_code' == $arr_search['product_column'][1] ? ' selected="selected"' : '' ); ?>><?php esc_html_e( 'item code', 'usces' ); ?></option> |
| 251 |
<option value="item_name"<?php echo( 'item_name' == $arr_search['product_column'][1] ? ' selected="selected"' : '' ); ?>><?php esc_html_e( 'item name', 'usces' ); ?></option> |
| 252 |
<option value="sku_code"<?php echo( 'sku_code' == $arr_search['product_column'][1] ? ' selected="selected"' : '' ); ?>><?php esc_html_e( 'SKU code', 'usces' ); ?></option> |
| 253 |
<option value="sku_name"<?php echo( 'sku_name' == $arr_search['product_column'][1] ? ' selected="selected"' : '' ); ?>><?php esc_html_e( 'SKU name', 'usces' ); ?></option> |
| 254 |
<option value="item_option"<?php echo( 'item_option' == $arr_search['product_column'][1] ? ' selected="selected"' : '' ); ?>><?php esc_html_e( 'options for items', 'usces' ); ?></option> |
| 255 |
</select> |
| 256 |
|
| 257 |
<span id="searchproductword_1"><input name="search[product_word][1]" type="text" value="<?php echo esc_attr( $arr_search['product_word'][1] ); ?>" class="regular-text" maxlength="50" /></span> |
| 258 |
</p> |
| 259 |
</div> |
| 260 |
|
| 261 |
<div class="search_submit"> |
| 262 |
<input name="searchIn" type="submit" class="button button-primary" value="<?php esc_attr_e( 'Search', 'usces' ); ?>" /> |
| 263 |
<input name="searchOut" type="submit" class="button" value="<?php esc_attr_e( 'Cancellation', 'usces' ); ?>" /> |
| 264 |
</div> |
| 265 |
</td> |
| 266 |
</tr> |
| 267 |
<tr> |
| 268 |
<td class="label"><?php esc_html_e( 'Oparation in bulk', 'usces' ); ?></td> |
| 269 |
<td id="change_list_table"> |
| 270 |
<div> |
| 271 |
<select name="allchange[column]" class="searchselect" id="changeselect"> |
| 272 |
<option value=""> </option> |
| 273 |
<option value="receipt_status"><?php esc_html_e( 'Edit the receiving money status', 'usces' ); ?></option> |
| 274 |
<option value="estimate_status"><?php esc_html_e( 'Order type', 'usces' ); ?></option> |
| 275 |
<option value="process_status"><?php esc_html_e( 'Processing status', 'usces' ); ?></option> |
| 276 |
<option value="delete"><?php esc_html_e( 'Delete in bulk', 'usces' ); ?></option> |
| 277 |
<?php echo apply_filters( 'usces_filter_allchange_column', '' ); // phpcs:ignore ?> |
| 278 |
</select> |
| 279 |
<span id="changefield"></span> |
| 280 |
<input name="collective_change" type="button" class="button" id="collective_change" value="<?php esc_attr_e( 'Run updating', 'usces' ); ?>" /> |
| 281 |
<input name="collective" id="orderlistaction" type="hidden" /> |
| 282 |
</div> |
| 283 |
</td> |
| 284 |
</tr> |
| 285 |
<tr> |
| 286 |
<td class="label"><?php esc_html_e( 'Action', 'usces' ); ?></td> |
| 287 |
<td id="dl_list_table"> |
| 288 |
<div class="action_button"> |
| 289 |
<input type="button" id="dl_productlist" class="button" value="<?php esc_attr_e( 'Download Product List', 'usces' ); ?>" /> |
| 290 |
<input type="button" id="dl_orderlist" class="button" value="<?php esc_attr_e( 'Download Order List', 'usces' ); ?>" /> |
| 291 |
<?php |
| 292 |
if ( ! empty( $settlement_backup ) && 1 == $settlement_backup ) : |
| 293 |
?> |
| 294 |
<input type="button" id="settlementlog" class="button" value="<?php esc_attr_e( 'Settlement previous log list', 'usces' ); ?>" /> |
| 295 |
<?php |
| 296 |
endif; |
| 297 |
?> |
| 298 |
<?php |
| 299 |
if ( ! empty( $settlement_notice ) ) : |
| 300 |
?> |
| 301 |
<input type="button" id="settlement_errorlog" class="button" value="<?php esc_attr_e( 'Settlement error log list', 'usces' ); ?>" /> |
| 302 |
<?php |
| 303 |
endif; |
| 304 |
?> |
| 305 |
<?php do_action( 'usces_action_dl_list_table' ); ?> |
| 306 |
</div> |
| 307 |
</td> |
| 308 |
</tr> |
| 309 |
</table> |
| 310 |
|
| 311 |
<div<?php if ( has_action( 'usces_action_order_list_searchbox_bottom' ) ) echo ' class="searchbox_bottom"'; // phpcs:ignore ?>> |
| 312 |
<?php do_action( 'usces_action_order_list_searchbox_bottom' ); ?> |
| 313 |
</div> |
| 314 |
</div><!-- searchBox --> |
| 315 |
<?php do_action( 'usces_action_order_list_searchbox' ); ?> |
| 316 |
</div><!-- tablesearch --> |
| 317 |
|
| 318 |
<table id="mainDataTable" class="new-table order-new-table"> |
| 319 |
<?php |
| 320 |
$header_mail_print_fields = array(); |
| 321 |
$list_header = '<th scope="col"><input name="allcheck" type="checkbox" value="" /></th>'; |
| 322 |
foreach ( (array) $arr_header as $key => $value ) { |
| 323 |
if ( ! isset( $list_option['view_column'][ $key ] ) || ! $list_option['view_column'][ $key ] ) { |
| 324 |
continue; |
| 325 |
} |
| 326 |
if ( array_key_exists( $key, $arr_mail_print_fields ) ) { |
| 327 |
$header_mail_print_fields[$key] = $key; |
| 328 |
} |
| 329 |
$list_header .= '<th scope="col">' . $value . '</th>'; |
| 330 |
} |
| 331 |
|
| 332 |
$usces_serchproduct_column = array( 'item_code', 'item_name', 'sku_code', 'sku_name', 'item_option' ); |
| 333 |
if ( ( isset( $arr_search['product_column'] ) && in_array( $arr_search['product_column'][0], $usces_serchproduct_column ) && $arr_search['product_word'][0] != '' ) |
| 334 |
|| ( isset( $arr_search['product_column'] ) && in_array( $arr_search['product_column'][1], $usces_serchproduct_column ) && $arr_search['product_word'][1] != '' ) ) |
| 335 |
{ |
| 336 |
$list_header .= '<th scope="col">' . __( 'item code', 'usces' ) . '</th>'; |
| 337 |
$list_header .= '<th scope="col">' . __( 'item name', 'usces' ) . '</th>'; |
| 338 |
$list_header .= '<th scope="col">' . __( 'SKU code', 'usces' ) . '</th>'; |
| 339 |
$list_header .= '<th scope="col">' . __( 'SKU name', 'usces' ) . '</th>'; |
| 340 |
$list_header .= '<th scope="col">' . __( 'option name', 'usces' ) . '</th>'; |
| 341 |
$list_header .= '<th scope="col">' . __( 'option value', 'usces' ) . '</th>'; |
| 342 |
} |
| 343 |
|
| 344 |
if ( $order_list_delete_link ) { |
| 345 |
$list_header .= '<th scope="col"> </th>'; |
| 346 |
} |
| 347 |
|
| 348 |
?> |
| 349 |
<thead> |
| 350 |
<tr> |
| 351 |
<?php echo apply_filters( 'usces_filter_orderlist_header', $list_header, $arr_header ); // phpcs:ignore ?> |
| 352 |
</tr> |
| 353 |
</thead> |
| 354 |
<?php |
| 355 |
foreach ( (array) $rows as $data ) : |
| 356 |
if ( ! isset( $list_option['view_column']['admin_memo'] ) || ! $list_option['view_column']['admin_memo'] ) { |
| 357 |
$list_detail = '<td align="center"><input name="listcheck[]" type="checkbox" value="' . $data['ID'] . '" /></td>'; |
| 358 |
} else { |
| 359 |
$list_detail = '<td align="center" rowspan="2"><input name="listcheck[]" type="checkbox" value="' . $data['ID'] . '" /></td>'; |
| 360 |
} |
| 361 |
foreach ( (array) $data as $key => $value ) { |
| 362 |
|
| 363 |
if ( isset( $list_option['view_column'][ $key ] ) && ! $list_option['view_column'][ $key ] ) { |
| 364 |
continue; |
| 365 |
} |
| 366 |
if ( WCUtils::is_blank( $value ) ) { |
| 367 |
$value = ' '; |
| 368 |
} |
| 369 |
$tempkey = substr( $key, 0, 5 ); |
| 370 |
if ( in_array( $tempkey, array( 'csod_', 'cscs_', 'csde_' ) ) ) { |
| 371 |
$multi_value = wel_safe_maybe_unserialize( $value ); |
| 372 |
if ( is_array( $multi_value ) ) { |
| 373 |
$value = ''; |
| 374 |
foreach ( $multi_value as $str ) { |
| 375 |
$value .= $str . ' '; |
| 376 |
} |
| 377 |
trim( $value ); |
| 378 |
} |
| 379 |
} |
| 380 |
|
| 381 |
$detail = ''; |
| 382 |
switch ( $key ) { |
| 383 |
case 'admin_memo': |
| 384 |
$detail = ''; |
| 385 |
break; |
| 386 |
|
| 387 |
case 'ID': |
| 388 |
case 'deco_id': |
| 389 |
$detail = '<td><a href="' . USCES_ADMIN_URL . '?page=usces_orderlist&order_action=edit&order_id=' . $data['ID'] . '&wc_nonce=' . wp_create_nonce( 'order_edit' ) . '">' . esc_html( $value ) . '</a></td>'; |
| 390 |
break; |
| 391 |
|
| 392 |
case 'reg_id': |
| 393 |
if ( defined( 'WCEX_AUTO_DELIVERY' ) && version_compare( WCEX_AUTO_DELIVERY_VERSION, '1.4.0', '>=' ) ) { |
| 394 |
if ( ' ' == $value || '-' == $value ) { |
| 395 |
$detail = '<td>' . esc_html( $value ) . '</td>'; |
| 396 |
} else { |
| 397 |
$detail = '<td><a href="' . USCES_ADMIN_URL . '?page=usces_regularlist®ular_action=edit®ular_id=' . $value . '&usces_referer=' . $curent_url . '&wc_nonce=' . wp_create_nonce( 'regular_list' ) . '">' . esc_html( $value ) . '</a></td>'; |
| 398 |
} |
| 399 |
} |
| 400 |
break; |
| 401 |
|
| 402 |
case 'estimate_status': |
| 403 |
$e_status = ''; |
| 404 |
$e_status_class = ''; |
| 405 |
if ( $this->is_status( 'estimate', $value ) ) { |
| 406 |
$e_status = esc_html( $management_status['estimate'] ); |
| 407 |
} elseif ( $this->is_status( 'adminorder', $value ) ) { |
| 408 |
$e_status = esc_html( $management_status['adminorder'] ); |
| 409 |
} else { |
| 410 |
$e_status = esc_html( __( 'Order', 'usces' ) ); |
| 411 |
} |
| 412 |
$e_status = apply_filters( 'usces_filter_orderlist_estimate_status', $e_status, $value, $management_status, $data['ID'] ); |
| 413 |
$e_status_class = apply_filters( 'usces_filter_orderlist_estimate_status_class', $e_status_class, $value, $data['ID'] ); |
| 414 |
$detail = '<td' . $e_status_class . '>' . $e_status . '</td>'; |
| 415 |
break; |
| 416 |
|
| 417 |
case 'process_status': |
| 418 |
$p_status = ''; |
| 419 |
$p_status_class = ''; |
| 420 |
if ( $this->is_status( 'duringorder', $value ) ) { |
| 421 |
$p_status = esc_html( $management_status['duringorder'] ); |
| 422 |
} elseif ( $this->is_status( 'cancel', $value ) ) { |
| 423 |
$p_status = esc_html( $management_status['cancel'] ); |
| 424 |
} elseif ( $this->is_status( 'completion', $value ) ) { |
| 425 |
$p_status = esc_html( $management_status['completion'] ); |
| 426 |
$p_status_class = ' class="green"'; |
| 427 |
} else { |
| 428 |
$p_status = esc_html( __( 'new order', 'usces' ) ); |
| 429 |
} |
| 430 |
$p_status = apply_filters( 'usces_filter_orderlist_process_status', $p_status, $value, $management_status, $data['ID'] ); |
| 431 |
$p_status_class = apply_filters( 'usces_filter_orderlist_process_status_class', $p_status_class, $value, $data['ID'] ); |
| 432 |
$detail = '<td' . $p_status_class . '>' . $p_status . '</td>'; |
| 433 |
break; |
| 434 |
|
| 435 |
case 'delidue_date': |
| 436 |
case 'payment_name': |
| 437 |
if ( '#none#' == $value ) { |
| 438 |
$detail = '<td> </td>'; |
| 439 |
} else { |
| 440 |
$detail = '<td>' . esc_html( $value ) . '</td>'; |
| 441 |
} |
| 442 |
break; |
| 443 |
|
| 444 |
case 'receipt_status': |
| 445 |
$r_status = ''; |
| 446 |
$r_status_class = ''; |
| 447 |
if ( $this->is_status( 'noreceipt', $value ) ) { |
| 448 |
$r_status = esc_html( $management_status['noreceipt'] ); |
| 449 |
$r_status_class = ' class="red"'; |
| 450 |
} elseif ( $this->is_status( 'pending', $value ) ) { |
| 451 |
$r_status = esc_html( $management_status['pending'] ); |
| 452 |
$r_status_class = ' class="red"'; |
| 453 |
} elseif ( $this->is_status( 'receipted', $value ) ) { |
| 454 |
$r_status = esc_html( $management_status['receipted'] ); |
| 455 |
$r_status_class = ' class="green"'; |
| 456 |
} else { |
| 457 |
$r_status = ' '; |
| 458 |
} |
| 459 |
$r_status = apply_filters( 'usces_filter_orderlist_receipt_status', $r_status, $value, $management_status, $data['ID'] ); |
| 460 |
$r_status_class = apply_filters( 'usces_filter_orderlist_receipt_status_class', $r_status_class, $value, $data['ID'] ); |
| 461 |
$detail = '<td' . $r_status_class . '>' . $r_status . '</td>'; |
| 462 |
break; |
| 463 |
|
| 464 |
case 'item_total_price': |
| 465 |
case 'discount': |
| 466 |
case 'shipping_charge': |
| 467 |
case 'cod_fee': |
| 468 |
case 'tax': |
| 469 |
$detail = '<td class="price">' . usces_crform( $value, true, false, 'return' ) . '</td>'; |
| 470 |
break; |
| 471 |
case 'total_price': |
| 472 |
if ( 0 > $value ) { |
| 473 |
$value = 0; |
| 474 |
} |
| 475 |
$detail = '<td class="price">' . usces_crform( $value, true, false, 'return' ) . '</td>'; |
| 476 |
break; |
| 477 |
|
| 478 |
case 'deli_method': |
| 479 |
if ( -1 != $value ) { |
| 480 |
$delivery_method_index = $this->get_delivery_method_index( $value ); |
| 481 |
$deli_method = ( isset( $this->options['delivery_method'][ $delivery_method_index ]['name'] ) ) ? esc_html( $this->options['delivery_method'][ $delivery_method_index ]['name'] ) : ' '; |
| 482 |
$deli_method_class = apply_filters( 'usces_filter_orderlist_deli_method_class', '', $value, $delivery_method_index ); |
| 483 |
$detail = '<td' . $deli_method_class . '>' . $deli_method . '</td>'; |
| 484 |
} else { |
| 485 |
$detail = '<td> </td>'; |
| 486 |
} |
| 487 |
break; |
| 488 |
|
| 489 |
case 'deli_name': |
| 490 |
$deliinfo = wel_safe_unserialize( $value ); |
| 491 |
$deliname = $deliinfo['name1'] . $deliinfo['name2']; |
| 492 |
$deliname_class = apply_filters( 'usces_filter_orderlist_deliname_class', '', $deliinfo, $deliname ); |
| 493 |
if ( $deliname ) { |
| 494 |
$detail = '<td' . $deliname_class . '>' . esc_html( $deliinfo['name1'] . $deliinfo['name2'] ) . '( ' . esc_html( $deliinfo['pref'] ) . ')</td>'; |
| 495 |
} elseif ( isset( $deliinfo['delivery_flag'] ) && 2 == $deliinfo['delivery_flag'] ) { |
| 496 |
$detail = '<td' . $deliname_class . '>' . esc_html( __( 'Multiple destinations', 'usces' ) ) . '</td>'; |
| 497 |
} else { |
| 498 |
$detail = '<td> </td>'; |
| 499 |
} |
| 500 |
break; |
| 501 |
|
| 502 |
case 'mem_id': |
| 503 |
if ( WCUtils::is_zero( $value ) ) { |
| 504 |
$value = ' '; |
| 505 |
} |
| 506 |
$detail = '<td>' . esc_html( $value ) . '</td>'; |
| 507 |
break; |
| 508 |
|
| 509 |
case 'country': |
| 510 |
$detail = '<td>' . esc_html( $usces_country[ $value ] ) . '</td>'; |
| 511 |
break; |
| 512 |
|
| 513 |
case 'pref': |
| 514 |
if ( __( '-- Select --', 'usces' ) == $value || '-- Select --' == $value ) { |
| 515 |
$detail = '<td> </td>'; |
| 516 |
} else { |
| 517 |
$detail = '<td>' . esc_html( $value ) . '</td>'; |
| 518 |
} |
| 519 |
break; |
| 520 |
|
| 521 |
case 'note': |
| 522 |
$value = mb_substr( $value, 0, 15, 'UTF-8' ); |
| 523 |
$detail = '<td>' . esc_html( $value ) . '</td>'; |
| 524 |
break; |
| 525 |
|
| 526 |
case 'order_date': |
| 527 |
$detail = '<td>' . date_i18n( 'Y-m-d H:i', strtotime( $value ) ) . '</td>'; |
| 528 |
break; |
| 529 |
|
| 530 |
/* hide columns */ |
| 531 |
case 'reg_parent_id': |
| 532 |
break; |
| 533 |
|
| 534 |
case 'order_check': |
| 535 |
$p_status = ''; |
| 536 |
$value = wel_safe_maybe_unserialize( $value ); |
| 537 |
if ( ! is_array( $value ) ) { |
| 538 |
$value = array(); |
| 539 |
} |
| 540 |
foreach ( $header_mail_print_fields as $k_mp => $v_mp ) { |
| 541 |
$type_mps = $arr_mail_print_status[ $arr_mail_print_fields[ $k_mp ]['type'] ]; |
| 542 |
if( in_array( $k_mp, $value ) ) { |
| 543 |
$p_status .= '<td>'.$type_mps[1]['alias'].'</td>'; |
| 544 |
}else{ |
| 545 |
$p_status .= '<td>'.$type_mps[0]['alias'].'</td>'; |
| 546 |
} |
| 547 |
} |
| 548 |
$p_status = apply_filters( 'usces_filter_orderlist_order_check', $p_status, $value, $key ); |
| 549 |
$detail = $p_status; |
| 550 |
break; |
| 551 |
|
| 552 |
case 'tracking_number': |
| 553 |
if ( ! empty( $data['tracking_number'] ) ) { |
| 554 |
$delivery_company = $this->get_order_meta_value( 'delivery_company', $data['ID'] ); |
| 555 |
if ( false !== strpos( $data['tracking_number'], ',' ) ) { |
| 556 |
$tracking_number = explode( ',', $data['tracking_number'] ); |
| 557 |
$br = ''; |
| 558 |
$detail = '<td>'; |
| 559 |
foreach ( $tracking_number as $n ) { |
| 560 |
$delivery_company_url = ( ! empty( $n ) ) ? usces_get_delivery_company_url( $delivery_company, $n ) : ''; |
| 561 |
if ( ! empty( $delivery_company_url ) ) { |
| 562 |
$detail .= $br . '<a href="' . esc_url( $delivery_company_url ) . '" target="_blank">' . esc_html( $n ) . '</a>'; |
| 563 |
} elseif ( ! empty( $n ) ) { |
| 564 |
$detail .= $br . esc_html( $n ); |
| 565 |
} |
| 566 |
$br = '<br>'; |
| 567 |
} |
| 568 |
$detail .= '</td>'; |
| 569 |
} else { |
| 570 |
$delivery_company_url = usces_get_delivery_company_url( $delivery_company, $value ); |
| 571 |
if ( ! empty( $delivery_company_url ) ) { |
| 572 |
$detail = '<td><a href="' . esc_url( $delivery_company_url ) . '" target="_blank">' . esc_html( $data['tracking_number'] ) . '</a></td>'; |
| 573 |
} elseif ( ! empty( $data['tracking_number'] ) ) { |
| 574 |
$detail = '<td>' . esc_html( $data['tracking_number'] ) . '</td>'; |
| 575 |
} else { |
| 576 |
$detail = '<td>' . esc_html( $value ) . '</td>'; |
| 577 |
} |
| 578 |
} |
| 579 |
} else { |
| 580 |
$detail = '<td>' . esc_html( $value ) . '</td>'; |
| 581 |
} |
| 582 |
break; |
| 583 |
|
| 584 |
case 'meta_value': |
| 585 |
$value = wel_safe_maybe_unserialize( $value ); |
| 586 |
if ( is_array( $value ) ) { |
| 587 |
$opt_values = ''; |
| 588 |
foreach ( $value as $opt_value ) { |
| 589 |
$opt_values .= $opt_value . ','; |
| 590 |
} |
| 591 |
$opt_values = rtrim( $opt_values, ',' ); |
| 592 |
$detail = '<td>' . esc_html( $opt_values ) . '</td>'; |
| 593 |
} else { |
| 594 |
$detail = '<td>' . esc_html( $value ) . '</td>'; |
| 595 |
} |
| 596 |
break; |
| 597 |
|
| 598 |
default: |
| 599 |
$detail = '<td>' . esc_html( $value ) . '</td>'; |
| 600 |
} |
| 601 |
$list_detail .= apply_filters( 'usces_filter_orderlist_detail_value', $detail, $value, $key, $data['ID'] ); |
| 602 |
} |
| 603 |
|
| 604 |
if ( $order_list_delete_link ) { |
| 605 |
$list_detail .= '<td><a href="' . USCES_ADMIN_URL . '?page=usces_orderlist&order_action=delete&order_id=' . $data['ID'] . '&wc_nonce=' . wp_create_nonce( 'order_list' ) . '" onclick="return deleteconfirm(\'' . $data['ID'] . '\' );"><span style="color:#FF0000; font-size:9px;">' . __( 'Delete', 'usces' ) . '</span></a></td>'; |
| 606 |
} |
| 607 |
|
| 608 |
if ( defined( 'WCEX_AUTO_DELIVERY' ) && version_compare( WCEX_AUTO_DELIVERY_VERSION, '1.4.0', '>=' ) ) { |
| 609 |
$trclass = ( ! empty( $data['reg_parent_id'] ) ) ? ' class="regular_parent_order"' : ''; |
| 610 |
} else { |
| 611 |
$trclass = ''; |
| 612 |
} |
| 613 |
?> |
| 614 |
<tbody> |
| 615 |
<tr<?php echo apply_filters( 'usces_filter_orderlist_detail_trclass', $trclass, $data ); // phpcs:ignore ?>> |
| 616 |
<?php echo apply_filters( 'usces_filter_orderlist_detail', $list_detail, $data, $curent_url ); // phpcs:ignore ?> |
| 617 |
</tr> |
| 618 |
<?php |
| 619 |
if ( ! isset( $list_option['view_column']['admin_memo'] ) || ! $list_option['view_column']['admin_memo'] ) { |
| 620 |
$memo = ''; |
| 621 |
} else { |
| 622 |
$colspan = 0; |
| 623 |
foreach ( $list_option['view_column'] as $vkey => $vvalue ) { |
| 624 |
if ( $vvalue ) { |
| 625 |
$colspan++; |
| 626 |
} |
| 627 |
} |
| 628 |
$memo = $data['admin_memo']; |
| 629 |
$memo_class = empty( $memo ) ? 'passive' : 'active'; |
| 630 |
$memo = '<tr class="' . $memo_class . '"><td colspan="' . $colspan . '">' . esc_html( $memo ) . '</td></tr>'; |
| 631 |
echo apply_filters( 'usces_filter_orderlist_memo', $memo, $data, $curent_url ); // phpcs:ignore |
| 632 |
} |
| 633 |
?> |
| 634 |
</tbody> |
| 635 |
<?php |
| 636 |
endforeach; |
| 637 |
?> |
| 638 |
</table> |
| 639 |
<div class="usces_tablenav usces_tablenav_bottom" ><?php wel_esc_script_e( $dataTableNavigation ); ?></div> |
| 640 |
|
| 641 |
</div><!-- datatable --> |
| 642 |
<!-- [memory peak usage] <?php // echo round(memory_get_peak_usage()/1048576, 1); ?>Mb --> |
| 643 |
|
| 644 |
<div id="dlProductListDialog" title="<?php esc_attr_e( 'Download Product List', 'usces' ); ?>" style="display:none;"> |
| 645 |
<p><?php esc_html_e( 'Select the item you want, please press the download.', 'usces' ); ?></p> |
| 646 |
<input type="button" class="button" id="dl_pro" value="<?php esc_attr_e( 'Download', 'usces' ); ?>" /> |
| 647 |
<fieldset><legend><?php esc_html_e( 'Header Information', 'usces' ); ?></legend> |
| 648 |
<fieldset><legend><?php esc_html_e( 'Customer Information', 'usces' ); ?></legend> |
| 649 |
<label for="chk_pro[ID]"><input type="checkbox" class="check_pro" id="chk_pro[ID]" value="ID"<?php usces_checked( $chk_pro, 'ID' ); ?> /><?php esc_html_e( 'ID', 'usces' ); ?></label> |
| 650 |
<label for="chk_pro[deco_id]"><input type="checkbox" class="check_pro" id="chk_pro[deco_id]" value="deco_id"<?php usces_checked( $chk_pro, 'deco_id' ); ?> /><?php esc_html_e( 'Order number', 'usces' ); ?></label> |
| 651 |
<label for="chk_pro[date]"><input type="checkbox" class="check_pro" id="chk_pro[date]" value="date"<?php usces_checked( $chk_pro, 'date' ); ?> /><?php esc_html_e( 'order date', 'usces' ); ?></label> |
| 652 |
<label for="chk_pro[mem_id]"><input type="checkbox" class="check_pro" id="chk_pro[mem_id]" value="mem_id"<?php usces_checked( $chk_pro, 'mem_id' ); ?> /><?php esc_html_e( 'membership number', 'usces' ); ?></label> |
| 653 |
<label for="chk_pro[email]"><input type="checkbox" class="check_pro" id="chk_pro[email]" value="email"<?php usces_checked( $chk_pro, 'email' ); ?> /><?php esc_html_e( 'e-mail', 'usces' ); ?></label> |
| 654 |
<?php |
| 655 |
if ( ! empty( $cscs_meta ) ) { |
| 656 |
foreach ( $cscs_meta as $key => $entry ) { |
| 657 |
if ( 'name_pre' == $entry['position'] ) { |
| 658 |
$cscs_key = 'cscs_' . $key; |
| 659 |
$checked = usces_checked( $chk_pro, $cscs_key, 'return' ); |
| 660 |
$name = $entry['name']; |
| 661 |
echo '<label for="chk_pro[' . esc_attr( $cscs_key ) . ']"><input type="checkbox" class="check_pro" id="chk_pro[' . esc_attr( $cscs_key ) . ']" value="' . esc_attr( $cscs_key ) . '"' . esc_attr( $checked ) . ' />' . esc_html( $name ) . '</label>'; |
| 662 |
} |
| 663 |
} |
| 664 |
} |
| 665 |
?> |
| 666 |
<label for="chk_pro[name]"><input type="checkbox" class="check_pro" id="chk_pro[name]" value="name"<?php usces_checked( $chk_pro, 'name' ); ?> /><?php esc_html_e( 'name', 'usces' ); ?></label> |
| 667 |
<?php |
| 668 |
switch ( $applyform ) { |
| 669 |
case 'JP': |
| 670 |
?> |
| 671 |
<label for="chk_pro[kana]"><input type="checkbox" class="check_pro" id="chk_pro[kana]" value="kana"<?php usces_checked( $chk_pro, 'kana' ); ?> /><?php esc_html_e( 'furigana', 'usces' ); ?></label> |
| 672 |
<?php |
| 673 |
break; |
| 674 |
} |
| 675 |
|
| 676 |
if ( ! empty( $cscs_meta ) ) { |
| 677 |
foreach ( $cscs_meta as $key => $entry ) { |
| 678 |
if ( 'name_after' == $entry['position'] ) { |
| 679 |
$cscs_key = 'cscs_' . $key; |
| 680 |
$checked = usces_checked( $chk_pro, $cscs_key, 'return' ); |
| 681 |
$name = $entry['name']; |
| 682 |
echo '<label for="chk_pro[' . esc_attr( $cscs_key ) . ']"><input type="checkbox" class="check_pro" id="chk_pro[' . esc_attr( $cscs_key ) . ']" value="' . esc_attr( $cscs_key ) . '"' . esc_attr( $checked ) . ' />' . esc_html( $name ) . '</label>'; |
| 683 |
} |
| 684 |
} |
| 685 |
} |
| 686 |
|
| 687 |
switch ( $applyform ) { |
| 688 |
case 'JP': |
| 689 |
?> |
| 690 |
<label for="chk_pro[zip]"><input type="checkbox" class="check_pro" id="chk_pro[zip]" value="zip"<?php usces_checked( $chk_pro, 'zip' ); ?> /><?php esc_html_e( 'Zip/Postal Code', 'usces' ); ?></label> |
| 691 |
<label for="chk_pro[country]"><input type="checkbox" class="check_pro" id="chk_pro[country]" value="country"<?php usces_checked( $chk_pro, 'country' ); ?> /><?php esc_html_e( 'Country', 'usces' ); ?></label> |
| 692 |
<label for="chk_pro[pref]"><input type="checkbox" class="check_pro" id="chk_pro[pref]" value="pref"<?php usces_checked( $chk_pro, 'pref' ); ?> /><?php esc_html_e( 'Province', 'usces' ); ?></label> |
| 693 |
<label for="chk_pro[address1]"><input type="checkbox" class="check_pro" id="chk_pro[address1]" value="address1"<?php usces_checked( $chk_pro, 'address1' ); ?> /><?php esc_html_e( 'city', 'usces' ); ?></label> |
| 694 |
<label for="chk_pro[address2]"><input type="checkbox" class="check_pro" id="chk_pro[address2]" value="address2"<?php usces_checked( $chk_pro, 'address2' ); ?> /><?php esc_html_e( 'numbers', 'usces' ); ?></label> |
| 695 |
<label for="chk_pro[address3]"><input type="checkbox" class="check_pro" id="chk_pro[address3]" value="address3"<?php usces_checked( $chk_pro, 'address3' ); ?> /><?php esc_html_e( 'building name', 'usces' ); ?></label> |
| 696 |
<label for="chk_pro[tel]"><input type="checkbox" class="check_pro" id="chk_pro[tel]" value="tel"<?php usces_checked( $chk_pro, 'tel' ); ?> /><?php esc_html_e( 'Phone number', 'usces' ); ?></label> |
| 697 |
<label for="chk_pro[fax]"><input type="checkbox" class="check_pro" id="chk_pro[fax]" value="fax"<?php usces_checked( $chk_pro, 'fax' ); ?> /><?php esc_html_e( 'FAX number', 'usces' ); ?></label> |
| 698 |
<?php |
| 699 |
break; |
| 700 |
case 'US': |
| 701 |
default: |
| 702 |
?> |
| 703 |
<label for="chk_pro[address2]"><input type="checkbox" class="check_pro" id="chk_pro[address2]" value="address2"<?php usces_checked( $chk_pro, 'address2' ); ?> /><?php esc_html_e( 'Address Line1', 'usces' ); ?></label> |
| 704 |
<label for="chk_pro[address3]"><input type="checkbox" class="check_pro" id="chk_pro[address3]" value="address3"<?php usces_checked( $chk_pro, 'address3' ); ?> /><?php esc_html_e( 'Address Line2', 'usces' ); ?></label> |
| 705 |
<label for="chk_pro[address1]"><input type="checkbox" class="check_pro" id="chk_pro[address1]" value="address1"<?php usces_checked( $chk_pro, 'address1' ); ?> /><?php esc_html_e( 'city', 'usces' ); ?></label> |
| 706 |
<label for="chk_pro[pref]"><input type="checkbox" class="check_pro" id="chk_pro[pref]" value="pref"<?php usces_checked( $chk_pro, 'pref' ); ?> /><?php esc_html_e( 'State', 'usces' ); ?></label> |
| 707 |
<label for="chk_pro[country]"><input type="checkbox" class="check_pro" id="chk_pro[country]" value="country"<?php usces_checked( $chk_pro, 'country' ); ?> /><?php esc_html_e( 'Country', 'usces' ); ?></label> |
| 708 |
<label for="chk_pro[zip]"><input type="checkbox" class="check_pro" id="chk_pro[zip]" value="zip"<?php usces_checked( $chk_pro, 'zip' ); ?> /><?php esc_html_e( 'Zip', 'usces' ); ?></label> |
| 709 |
<label for="chk_pro[tel]"><input type="checkbox" class="check_pro" id="chk_pro[tel]" value="tel"<?php usces_checked( $chk_pro, 'tel' ); ?> /><?php esc_html_e( 'Phone number', 'usces' ); ?></label> |
| 710 |
<label for="chk_pro[fax]"><input type="checkbox" class="check_pro" id="chk_pro[fax]" value="fax"<?php usces_checked( $chk_pro, 'fax' ); ?> /><?php esc_html_e( 'FAX number', 'usces' ); ?></label> |
| 711 |
<?php |
| 712 |
break; |
| 713 |
} |
| 714 |
|
| 715 |
if ( ! empty( $cscs_meta ) ) { |
| 716 |
foreach ( $cscs_meta as $key => $entry ) { |
| 717 |
if ( 'fax_after' == $entry['position'] ) { |
| 718 |
$cscs_key = 'cscs_' . $key; |
| 719 |
$checked = usces_checked( $chk_pro, $cscs_key, 'return' ); |
| 720 |
$name = $entry['name']; |
| 721 |
echo '<label for="chk_pro[' . esc_attr( $cscs_key ) . ']"><input type="checkbox" class="check_pro" id="chk_pro[' . esc_attr( $cscs_key ) . ']" value="' . esc_attr( $cscs_key ) . '"' . esc_attr( $checked ) . ' />' . esc_html( $name ) . '</label>'; |
| 722 |
} |
| 723 |
} |
| 724 |
} |
| 725 |
?> |
| 726 |
<?php do_action( 'usces_action_chk_pro_customer', $chk_pro ); ?> |
| 727 |
</fieldset> |
| 728 |
<fieldset><legend><?php esc_html_e( 'Shipping address information', 'usces' ); ?></legend> |
| 729 |
<?php |
| 730 |
if ( ! empty( $csde_meta ) ) { |
| 731 |
foreach ( $csde_meta as $key => $entry ) { |
| 732 |
if ( 'name_pre' == $entry['position'] ) { |
| 733 |
$csde_key = 'csde_' . $key; |
| 734 |
$checked = usces_checked( $chk_pro, $csde_key, 'return' ); |
| 735 |
$name = $entry['name']; |
| 736 |
echo '<label for="chk_pro[' . esc_attr( $csde_key ) . ']"><input type="checkbox" class="check_pro" id="chk_pro[' . esc_attr( $csde_key ) . ']" value="' . esc_attr( $csde_key ) . '"' . esc_attr( $checked ) . ' />' . esc_html( $name ) . '</label>'; |
| 737 |
} |
| 738 |
} |
| 739 |
} |
| 740 |
?> |
| 741 |
<label for="chk_pro[delivery_name]"><input type="checkbox" class="check_pro" id="chk_pro[delivery_name]" value="delivery_name"<?php usces_checked( $chk_pro, 'delivery_name' ); ?> /><?php esc_html_e( 'name', 'usces' ); ?></label> |
| 742 |
<?php |
| 743 |
switch ( $applyform ) { |
| 744 |
case 'JP': |
| 745 |
?> |
| 746 |
<label for="chk_pro[delivery_kana]"><input type="checkbox" class="check_pro" id="chk_pro[delivery_kana]" value="delivery_kana"<?php usces_checked( $chk_pro, 'delivery_kana' ); ?> /><?php esc_html_e( 'furigana', 'usces' ); ?></label> |
| 747 |
<?php |
| 748 |
break; |
| 749 |
} |
| 750 |
|
| 751 |
if ( ! empty( $csde_meta ) ) { |
| 752 |
foreach ( $csde_meta as $key => $entry ) { |
| 753 |
if ( 'name_after' == $entry['position'] ) { |
| 754 |
$csde_key = 'csde_' . $key; |
| 755 |
$checked = usces_checked( $chk_pro, $csde_key, 'return' ); |
| 756 |
$name = $entry['name']; |
| 757 |
echo '<label for="chk_pro[' . esc_attr( $csde_key ) . ']"><input type="checkbox" class="check_pro" id="chk_pro[' . esc_attr( $csde_key ) . ']" value="' . esc_attr( $csde_key ) . '"' . esc_attr( $checked ) . ' />' . esc_html( $name ) . '</label>'; |
| 758 |
} |
| 759 |
} |
| 760 |
} |
| 761 |
|
| 762 |
switch ( $applyform ) { |
| 763 |
case 'JP': |
| 764 |
?> |
| 765 |
<label for="chk_pro[delivery_zip]"><input type="checkbox" class="check_pro" id="chk_pro[delivery_zip]" value="delivery_zip"<?php usces_checked( $chk_pro, 'delivery_zip' ); ?> /><?php esc_html_e( 'Zip/Postal Code', 'usces' ); ?></label> |
| 766 |
<label for="chk_pro[delivery_country]"><input type="checkbox" class="check_pro" id="chk_pro[delivery_country]" value="delivery_country"<?php usces_checked( $chk_pro, 'delivery_country' ); ?> /><?php esc_html_e( 'Country', 'usces' ); ?></label> |
| 767 |
<label for="chk_pro[delivery_pref]"><input type="checkbox" class="check_pro" id="chk_pro[delivery_pref]" value="delivery_pref"<?php usces_checked( $chk_pro, 'delivery_pref' ); ?> /><?php esc_html_e( 'Province', 'usces' ); ?></label> |
| 768 |
<label for="chk_pro[delivery_address1]"><input type="checkbox" class="check_pro" id="chk_pro[delivery_address1]" value="delivery_address1"<?php usces_checked( $chk_pro, 'delivery_address1' ); ?> /><?php esc_html_e( 'city', 'usces' ); ?></label> |
| 769 |
<label for="chk_pro[delivery_address2]"><input type="checkbox" class="check_pro" id="chk_pro[delivery_address2]" value="delivery_address2"<?php usces_checked( $chk_pro, 'delivery_address2' ); ?> /><?php esc_html_e( 'numbers', 'usces' ); ?></label> |
| 770 |
<label for="chk_pro[delivery_address3]"><input type="checkbox" class="check_pro" id="chk_pro[delivery_address3]" value="delivery_address3"<?php usces_checked( $chk_pro, 'delivery_address3' ); ?> /><?php esc_html_e( 'building name', 'usces' ); ?></label> |
| 771 |
<label for="chk_pro[delivery_tel]"><input type="checkbox" class="check_pro" id="chk_pro[delivery_tel]" value="delivery_tel"<?php usces_checked( $chk_pro, 'delivery_tel' ); ?> /><?php esc_html_e( 'Phone number', 'usces' ); ?></label> |
| 772 |
<label for="chk_pro[delivery_fax]"><input type="checkbox" class="check_pro" id="chk_pro[delivery_fax]" value="delivery_fax"<?php usces_checked( $chk_pro, 'delivery_fax' ); ?> /><?php esc_html_e( 'FAX number', 'usces' ); ?></label> |
| 773 |
<?php |
| 774 |
break; |
| 775 |
case 'US': |
| 776 |
default: |
| 777 |
?> |
| 778 |
<label for="chk_pro[delivery_address2]"><input type="checkbox" class="check_pro" id="chk_pro[delivery_address2]" value="delivery_address2"<?php usces_checked( $chk_pro, 'delivery_address2' ); ?> /><?php esc_html_e( 'Address Line1', 'usces' ); ?></label> |
| 779 |
<label for="chk_pro[delivery_address3]"><input type="checkbox" class="check_pro" id="chk_pro[delivery_address3]" value="delivery_address3"<?php usces_checked( $chk_pro, 'delivery_address3' ); ?> /><?php esc_html_e( 'Address Line2', 'usces' ); ?></label> |
| 780 |
<label for="chk_pro[delivery_address1]"><input type="checkbox" class="check_pro" id="chk_pro[delivery_address1]" value="delivery_address1"<?php usces_checked( $chk_pro, 'delivery_address1' ); ?> /><?php esc_html_e( 'city', 'usces' ); ?></label> |
| 781 |
<label for="chk_pro[delivery_pref]"><input type="checkbox" class="check_pro" id="chk_pro[delivery_pref]" value="delivery_pref"<?php usces_checked( $chk_pro, 'delivery_pref' ); ?> /><?php esc_html_e( 'State', 'usces' ); ?></label> |
| 782 |
<label for="chk_pro[delivery_country]"><input type="checkbox" class="check_pro" id="chk_pro[delivery_country]" value="delivery_country"<?php usces_checked( $chk_pro, 'delivery_country' ); ?> /><?php esc_html_e( 'Country', 'usces' ); ?></label> |
| 783 |
<label for="chk_pro[delivery_zip]"><input type="checkbox" class="check_pro" id="chk_pro[delivery_zip]" value="delivery_zip"<?php usces_checked( $chk_pro, 'delivery_zip' ); ?> /><?php esc_html_e( 'Zip', 'usces' ); ?></label> |
| 784 |
<label for="chk_pro[delivery_tel]"><input type="checkbox" class="check_pro" id="chk_pro[delivery_tel]" value="delivery_tel"<?php usces_checked( $chk_pro, 'delivery_tel' ); ?> /><?php esc_html_e( 'Phone number', 'usces' ); ?></label> |
| 785 |
<label for="chk_pro[delivery_fax]"><input type="checkbox" class="check_pro" id="chk_pro[delivery_fax]" value="delivery_fax"<?php usces_checked( $chk_pro, 'delivery_fax' ); ?> /><?php esc_html_e( 'FAX number', 'usces' ); ?></label> |
| 786 |
<?php |
| 787 |
break; |
| 788 |
} |
| 789 |
|
| 790 |
if ( ! empty( $csde_meta ) ) { |
| 791 |
foreach ( $csde_meta as $key => $entry ) { |
| 792 |
if ( 'fax_after' == $entry['position'] ) { |
| 793 |
$csde_key = 'csde_' . $key; |
| 794 |
$checked = usces_checked( $chk_pro, $csde_key, 'return' ); |
| 795 |
$name = $entry['name']; |
| 796 |
echo '<label for="chk_pro[' . esc_attr( $csde_key ) . ']"><input type="checkbox" class="check_pro" id="chk_pro[' . esc_attr( $csde_key ) . ']" value="' . esc_attr( $csde_key ) . '"' . esc_attr( $checked ) . ' />' . esc_html( $name ) . '</label>'; |
| 797 |
} |
| 798 |
} |
| 799 |
} |
| 800 |
?> |
| 801 |
<?php do_action( 'usces_action_chk_pro_delivery', $chk_pro ); ?> |
| 802 |
</fieldset> |
| 803 |
<fieldset><legend><?php esc_html_e( 'Order Infomation', 'usces' ); ?></legend> |
| 804 |
<label for="chk_pro[shipping_date]"><input type="checkbox" class="check_pro" id="chk_pro[shipping_date]" value="shipping_date"<?php usces_checked( $chk_pro, 'shipping_date' ); ?> /><?php esc_html_e( 'shpping date', 'usces' ); ?></label> |
| 805 |
<label for="chk_pro[peyment_method]"><input type="checkbox" class="check_pro" id="chk_pro[peyment_method]" value="peyment_method"<?php usces_checked( $chk_pro, 'peyment_method' ); ?> /><?php esc_html_e( 'payment method', 'usces' ); ?></label> |
| 806 |
<label for="chk_pro[wc_trans_id]"><input type="checkbox" class="check_pro" id="chk_pro[wc_trans_id]" value="wc_trans_id"<?php usces_checked( $chk_pro, 'wc_trans_id' ); ?> /><?php esc_html_e( 'Transaction ID', 'usces' ); ?></label> |
| 807 |
<label for="chk_pro[delivery_method]"><input type="checkbox" class="check_pro" id="chk_pro[delivery_method]" value="delivery_method"<?php usces_checked( $chk_pro, 'delivery_method' ); ?> /><?php esc_html_e( 'shipping option', 'usces' ); ?></label> |
| 808 |
<label for="chk_pro[delivery_date]"><input type="checkbox" class="check_pro" id="chk_pro[delivery_date]" value="delivery_date"<?php usces_checked( $chk_pro, 'delivery_date' ); ?> /><?php esc_html_e( 'Delivery date', 'usces' ); ?></label> |
| 809 |
<label for="chk_pro[delivery_time]"><input type="checkbox" class="check_pro" id="chk_pro[delivery_time]" value="delivery_time"<?php usces_checked( $chk_pro, 'delivery_time' ); ?> /><?php esc_html_e( 'delivery time', 'usces' ); ?></label> |
| 810 |
<label for="chk_pro[delidue_date]"><input type="checkbox" class="check_pro" id="chk_pro[delidue_date]" value="delidue_date"<?php usces_checked( $chk_pro, 'delidue_date' ); ?> /><?php esc_html_e( 'Shipping date', 'usces' ); ?></label> |
| 811 |
<label for="chk_pro[status]"><input type="checkbox" class="check_pro" id="chk_pro[status]" value="status"<?php usces_checked( $chk_pro, 'status' ); ?> /><?php esc_html_e( 'Status', 'usces' ); ?></label> |
| 812 |
<label for="chk_pro[tracking_number]"><input type="checkbox" class="check_pro" id="chk_pro[tracking_number]" value="tracking_number"<?php usces_checked( $chk_pro, 'tracking_number' ); ?> /><?php esc_html_e( 'Tracking number', 'usces' ); ?></label> |
| 813 |
<label for="chk_pro[total_amount]"><input type="checkbox" class="check_pro" id="chk_pro[total_amount]" value="total_amount"<?php usces_checked( $chk_pro, 'total_amount' ); ?> /><?php esc_html_e( 'Total Amount', 'usces' ); ?></label> |
| 814 |
<label for="chk_pro[item_total_amount]"><input type="checkbox" class="check_pro" id="chk_pro[item_total_amount]" value="item_total_amount"<?php usces_checked( $chk_pro, 'item_total_amount' ); ?> /><?php esc_html_e( 'total items', 'usces' ); ?></label> |
| 815 |
<?php if ( usces_is_member_system() && usces_is_member_system_point() ) : ?> |
| 816 |
<label for="chk_pro[getpoint]"><input type="checkbox" class="check_pro" id="chk_pro[getpoint]" value="getpoint"<?php usces_checked( $chk_pro, 'getpoint' ); ?> /><?php esc_html_e( 'granted points', 'usces' ); ?></label> |
| 817 |
<label for="chk_pro[usedpoint]"><input type="checkbox" class="check_pro" id="chk_pro[usedpoint]" value="usedpoint"<?php usces_checked( $chk_pro, 'usedpoint' ); ?> /><?php esc_html_e( 'Used points', 'usces' ); ?></label> |
| 818 |
<?php endif; ?> |
| 819 |
<label for="chk_pro[discount]"><input type="checkbox" class="check_pro" id="chk_pro[discount]" value="discount"<?php usces_checked( $chk_pro, 'discount' ); ?> /><?php esc_html_e( 'Discount', 'usces' ); ?></label> |
| 820 |
<label for="chk_pro[shipping_charge]"><input type="checkbox" class="check_pro" id="chk_pro[shipping_charge]" value="shipping_charge"<?php usces_checked( $chk_pro, 'shipping_charge' ); ?> /><?php esc_html_e( 'Shipping', 'usces' ); ?></label> |
| 821 |
<label for="chk_pro[cod_fee]"><input type="checkbox" class="check_pro" id="chk_pro[cod_fee]" value="cod_fee"<?php usces_checked( $chk_pro, 'cod_fee' ); ?> /><?php echo apply_filters( 'usces_filter_cod_label', __( 'COD fee', 'usces' ) ); // phpcs:ignore ?></label> |
| 822 |
<?php if ( usces_is_tax_display() ) : ?> |
| 823 |
<label for="chk_pro[tax]"><input type="checkbox" class="check_pro" id="chk_pro[tax]" value="tax"<?php usces_checked( $chk_pro, 'tax' ); ?> /><?php esc_html_e( 'consumption tax', 'usces' ); ?></label> |
| 824 |
<?php if ( usces_is_reduced_taxrate() ) : ?> |
| 825 |
<label for="chk_pro[subtotal_standard]"><input type="checkbox" class="check_pro" id="chk_pro[subtotal_standard]" value="subtotal_standard"<?php usces_checked( $chk_pro, 'subtotal_standard' ); ?> /><?php printf( __( "Applies to %s%%", 'usces' ), $this->options['tax_rate'] ); // phpcs:ignore ?></label> |
| 826 |
<label for="chk_pro[tax_standard]"><input type="checkbox" class="check_pro" id="chk_pro[tax_standard]" value="tax_standard"<?php usces_checked( $chk_pro, 'tax_standard' ); ?> /><?php printf( __( "%s%% consumption tax", 'usces' ), $this->options['tax_rate'] ); // phpcs:ignore ?></label> |
| 827 |
<label for="chk_pro[subtotal_reduced]"><input type="checkbox" class="check_pro" id="chk_pro[subtotal_reduced]" value="subtotal_reduced"<?php usces_checked( $chk_pro, 'subtotal_reduced' ); ?> /><?php printf( __( "Applies to %s%%", 'usces' ), $this->options['tax_rate_reduced'] ); // phpcs:ignore ?></label> |
| 828 |
<label for="chk_pro[tax_reduced]"><input type="checkbox" class="check_pro" id="chk_pro[tax_reduced]" value="tax_reduced"<?php usces_checked( $chk_pro, 'tax_reduced' ); ?> /><?php printf( __( "%s%% consumption tax", 'usces' ), $this->options['tax_rate_reduced'] ); // phpcs:ignore ?></label> |
| 829 |
<?php endif; ?> |
| 830 |
<?php endif; ?> |
| 831 |
<label for="chk_pro[note]"><input type="checkbox" class="check_pro" id="chk_pro[note]" value="note"<?php usces_checked( $chk_pro, 'note' ); ?> /><?php esc_html_e( 'Notes', 'usces' ); ?></label> |
| 832 |
<?php |
| 833 |
if ( ! empty( $csod_meta ) ) { |
| 834 |
foreach ( $csod_meta as $key => $entry ) { |
| 835 |
$csod_key = 'csod_' . $key; |
| 836 |
$checked = usces_checked( $chk_pro, $csod_key, 'return' ); |
| 837 |
$name = $entry['name']; |
| 838 |
echo '<label for="chk_pro[' . esc_attr( $csod_key ) . ']"><input type="checkbox" class="check_pro" id="chk_pro[' . esc_attr( $csod_key ) . ']" value="' . esc_attr( $csod_key ) . '"' . esc_attr( $checked ) . ' />' . esc_html( $name ) . '</label>'; |
| 839 |
} |
| 840 |
} |
| 841 |
?> |
| 842 |
<?php do_action( 'usces_action_chk_pro_order', $chk_pro ); ?> |
| 843 |
</fieldset> |
| 844 |
</fieldset> |
| 845 |
<fieldset><legend><?php esc_html_e( 'Product Information', 'usces' ); ?></legend> |
| 846 |
<label for="chk_pro[item_code]"><input type="checkbox" class="check_pro" id="chk_pro[item_code]" value="item_code"<?php usces_checked( $chk_pro, 'item_code' ); ?> /><?php esc_html_e( 'item code', 'usces' ); ?></label> |
| 847 |
<label for="chk_pro[sku_code]"><input type="checkbox" class="check_pro" id="chk_pro[sku_code]" value="sku_code"<?php usces_checked( $chk_pro, 'sku_code' ); ?> /><?php esc_html_e( 'SKU code', 'usces' ); ?></label> |
| 848 |
<label for="chk_pro[item_name]"><input type="checkbox" class="check_pro" id="chk_pro[item_name]" value="item_name"<?php usces_checked( $chk_pro, 'item_name' ); ?> /><?php esc_html_e( 'item name', 'usces' ); ?></label> |
| 849 |
<label for="chk_pro[sku_name]"><input type="checkbox" class="check_pro" id="chk_pro[sku_name]" value="sku_name"<?php usces_checked( $chk_pro, 'sku_name' ); ?> /><?php esc_html_e( 'SKU display name ', 'usces' ); ?></label> |
| 850 |
<label for="chk_pro[options]"><input type="checkbox" class="check_pro" id="chk_pro[options]" value="options"<?php usces_checked( $chk_pro, 'options' ); ?> /><?php esc_html_e( 'options for items', 'usces' ); ?></label> |
| 851 |
<label for="chk_pro[quantity]"><input type="checkbox" class="check_pro" id="chk_pro[quantity]" value="quantity"<?php usces_checked( $chk_pro, 'quantity' ); ?> /><?php esc_html_e( 'Quantity', 'usces' ); ?></label> |
| 852 |
<label for="chk_pro[price]"><input type="checkbox" class="check_pro" id="chk_pro[price]" value="price"<?php usces_checked( $chk_pro, 'price' ); ?> /><?php esc_html_e( 'Unit price', 'usces' ); ?></label> |
| 853 |
<label for="chk_pro[unit]"><input type="checkbox" class="check_pro" id="chk_pro[unit]" value="unit"<?php usces_checked( $chk_pro, 'unit' ); ?> /><?php esc_html_e( 'unit', 'usces' ); ?></label> |
| 854 |
<?php do_action( 'usces_action_chk_pro_detail', $chk_pro ); ?> |
| 855 |
</fieldset> |
| 856 |
<fieldset><legend><?php esc_html_e( 'Admin Information', 'usces' ); ?></legend> |
| 857 |
<label for="chk_pro[admin_memo]"><input type="checkbox" class="check_pro" id="chk_pro[admin_memo]" value="admin_memo"<?php usces_checked( $chk_pro, 'admin_memo' ); ?> /><?php esc_html_e( 'Admin Note', 'usces' ); ?></label> |
| 858 |
<?php do_action( 'usces_action_chk_pro_memo', $chk_pro ); ?> |
| 859 |
</fieldset> |
| 860 |
</div> |
| 861 |
|
| 862 |
<div id="dlOrderListDialog" title="<?php esc_attr_e( 'Download Order List', 'usces' ); ?>" style="display:none;"> |
| 863 |
<p><?php esc_html_e( 'Select the item you want, please press the download.', 'usces' ); ?></p> |
| 864 |
<input type="button" class="button" id="dl_ord" value="<?php esc_attr_e( 'Download', 'usces' ); ?>" /> |
| 865 |
<fieldset><legend><?php esc_html_e( 'Customer Information', 'usces' ); ?></legend> |
| 866 |
<label for="chk_ord[ID]"><input type="checkbox" class="check_order" id="chk_ord[ID]" value="ID"<?php usces_checked( $chk_pro, 'ID' ); ?> /><?php esc_html_e( 'ID', 'usces' ); ?></label> |
| 867 |
<label for="chk_ord[deco_id]"><input type="checkbox" class="check_order" id="chk_ord[deco_id]" value="deco_id"<?php usces_checked( $chk_pro, 'deco_id' ); ?> /><?php esc_html_e( 'Order number', 'usces' ); ?></label> |
| 868 |
<label for="chk_ord[date]"><input type="checkbox" class="check_order" id="chk_ord[date]" value="date"<?php usces_checked( $chk_pro, 'date' ); ?> /><?php esc_html_e( 'order date', 'usces' ); ?></label> |
| 869 |
<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 esc_html_e( 'membership number', 'usces' ); ?></label> |
| 870 |
<label for="chk_ord[email]"><input type="checkbox" class="check_order" id="chk_ord[email]" value="email"<?php usces_checked( $chk_ord, 'email' ); ?> /><?php esc_html_e( 'e-mail', 'usces' ); ?></label> |
| 871 |
<?php |
| 872 |
if ( ! empty( $cscs_meta ) ) { |
| 873 |
foreach ( $cscs_meta as $key => $entry ) { |
| 874 |
if ( 'name_pre' == $entry['position'] ) { |
| 875 |
$cscs_key = 'cscs_' . $key; |
| 876 |
$checked = usces_checked( $chk_ord, $cscs_key, 'return' ); |
| 877 |
$name = $entry['name']; |
| 878 |
echo '<label for="chk_ord[' . esc_attr( $cscs_key ) . ']"><input type="checkbox" class="check_order" id="chk_ord[' . esc_attr( $cscs_key ) . ']" value="' . esc_attr( $cscs_key ) . '"' . esc_attr( $checked ) . ' />' . esc_html( $name ) . '</label>'; |
| 879 |
} |
| 880 |
} |
| 881 |
} |
| 882 |
?> |
| 883 |
<label for="chk_ord[name]"><input type="checkbox" class="check_order" id="chk_ord[name]" value="name"<?php usces_checked( $chk_ord, 'name' ); ?> /><?php esc_html_e( 'name', 'usces' ); ?></label> |
| 884 |
<?php |
| 885 |
switch ( $applyform ) { |
| 886 |
case 'JP': |
| 887 |
?> |
| 888 |
<label for="chk_ord[kana]"><input type="checkbox" class="check_order" id="chk_ord[kana]" value="kana"<?php usces_checked( $chk_ord, 'kana' ); ?> /><?php esc_html_e( 'furigana', 'usces' ); ?></label> |
| 889 |
<?php |
| 890 |
break; |
| 891 |
} |
| 892 |
|
| 893 |
if ( ! empty( $cscs_meta ) ) { |
| 894 |
foreach ( $cscs_meta as $key => $entry ) { |
| 895 |
if ( 'name_after' == $entry['position'] ) { |
| 896 |
$cscs_key = 'cscs_' . $key; |
| 897 |
$checked = usces_checked( $chk_ord, $cscs_key, 'return' ); |
| 898 |
$name = $entry['name']; |
| 899 |
echo '<label for="chk_ord[' . esc_attr( $cscs_key ) . ']"><input type="checkbox" class="check_order" id="chk_ord[' . esc_attr( $cscs_key ) . ']" value="' . esc_attr( $cscs_key ) . '"' . esc_attr( $checked ) . ' />' . esc_html( $name ) . '</label>'; |
| 900 |
} |
| 901 |
} |
| 902 |
} |
| 903 |
|
| 904 |
switch ( $applyform ) { |
| 905 |
case 'JP': |
| 906 |
?> |
| 907 |
<label for="chk_ord[zip]"><input type="checkbox" class="check_order" id="chk_ord[zip]" value="zip"<?php usces_checked( $chk_ord, 'zip' ); ?> /><?php esc_html_e( 'Zip/Postal Code', 'usces' ); ?></label> |
| 908 |
<label for="chk_ord[country]"><input type="checkbox" class="check_order" id="chk_ord[country]" value="country"<?php usces_checked( $chk_ord, 'country' ); ?> /><?php esc_html_e( 'Country', 'usces' ); ?></label> |
| 909 |
<label for="chk_ord[pref]"><input type="checkbox" class="check_order" id="chk_ord[pref]" value="pref"<?php usces_checked( $chk_ord, 'pref' ); ?> /><?php esc_html_e( 'Province', 'usces' ); ?></label> |
| 910 |
<label for="chk_ord[address1]"><input type="checkbox" class="check_order" id="chk_ord[address1]" value="address1"<?php usces_checked( $chk_ord, 'address1' ); ?> /><?php esc_html_e( 'city', 'usces' ); ?></label> |
| 911 |
<label for="chk_ord[address2]"><input type="checkbox" class="check_order" id="chk_ord[address2]" value="address2"<?php usces_checked( $chk_ord, 'address2' ); ?> /><?php esc_html_e( 'numbers', 'usces' ); ?></label> |
| 912 |
<label for="chk_ord[address3]"><input type="checkbox" class="check_order" id="chk_ord[address3]" value="address3"<?php usces_checked( $chk_ord, 'address3' ); ?> /><?php esc_html_e( 'building name', 'usces' ); ?></label> |
| 913 |
<label for="chk_ord[tel]"><input type="checkbox" class="check_order" id="chk_ord[tel]" value="tel"<?php usces_checked( $chk_ord, 'tel' ); ?> /><?php esc_html_e( 'Phone number', 'usces' ); ?></label> |
| 914 |
<label for="chk_ord[fax]"><input type="checkbox" class="check_order" id="chk_ord[fax]" value="fax"<?php usces_checked( $chk_ord, 'fax' ); ?> /><?php esc_html_e( 'FAX number', 'usces' ); ?></label> |
| 915 |
<?php |
| 916 |
break; |
| 917 |
case 'US': |
| 918 |
default: |
| 919 |
?> |
| 920 |
<label for="chk_ord[address2]"><input type="checkbox" class="check_order" id="chk_ord[address2]" value="address2"<?php usces_checked( $chk_ord, 'address2' ); ?> /><?php esc_html_e( 'Address Line1', 'usces' ); ?></label> |
| 921 |
<label for="chk_ord[address3]"><input type="checkbox" class="check_order" id="chk_ord[address3]" value="address3"<?php usces_checked( $chk_ord, 'address3' ); ?> /><?php esc_html_e( 'Address Line2', 'usces' ); ?></label> |
| 922 |
<label for="chk_ord[address1]"><input type="checkbox" class="check_order" id="chk_ord[address1]" value="address1"<?php usces_checked( $chk_ord, 'address1' ); ?> /><?php esc_html_e( 'city', 'usces' ); ?></label> |
| 923 |
<label for="chk_ord[pref]"><input type="checkbox" class="check_order" id="chk_ord[pref]" value="pref"<?php usces_checked( $chk_ord, 'pref' ); ?> /><?php esc_html_e( 'State', 'usces' ); ?></label> |
| 924 |
<label for="chk_ord[country]"><input type="checkbox" class="check_order" id="chk_ord[country]" value="country"<?php usces_checked( $chk_ord, 'country' ); ?> /><?php esc_html_e( 'Country', 'usces' ); ?></label> |
| 925 |
<label for="chk_ord[zip]"><input type="checkbox" class="check_order" id="chk_ord[zip]" value="zip"<?php usces_checked( $chk_ord, 'zip' ); ?> /><?php esc_html_e( 'Zip', 'usces' ); ?></label> |
| 926 |
<label for="chk_ord[tel]"><input type="checkbox" class="check_order" id="chk_ord[tel]" value="tel"<?php usces_checked( $chk_ord, 'tel' ); ?> /><?php esc_html_e( 'Phone number', 'usces' ); ?></label> |
| 927 |
<label for="chk_ord[fax]"><input type="checkbox" class="check_order" id="chk_ord[fax]" value="fax"<?php usces_checked( $chk_ord, 'fax' ); ?> /><?php esc_html_e( 'FAX number', 'usces' ); ?></label> |
| 928 |
<?php |
| 929 |
break; |
| 930 |
} |
| 931 |
|
| 932 |
if ( ! empty( $cscs_meta ) ) { |
| 933 |
foreach ( $cscs_meta as $key => $entry ) { |
| 934 |
if ( 'fax_after' == $entry['position'] ) { |
| 935 |
$cscs_key = 'cscs_' . $key; |
| 936 |
$checked = usces_checked( $chk_ord, $cscs_key, 'return' ); |
| 937 |
$name = $entry['name']; |
| 938 |
echo '<label for="chk_ord[' . esc_attr( $cscs_key ) . ']"><input type="checkbox" class="check_order" id="chk_ord[' . esc_attr( $cscs_key ) . ']" value="' . esc_attr( $cscs_key ) . '"' . esc_attr( $checked ) . ' />' . esc_html( $name ) . '</label>'; |
| 939 |
} |
| 940 |
} |
| 941 |
} |
| 942 |
?> |
| 943 |
<?php do_action( 'usces_action_chk_ord_customer', $chk_ord ); ?> |
| 944 |
</fieldset> |
| 945 |
<fieldset><legend><?php esc_html_e( 'Shipping address information', 'usces' ); ?></legend> |
| 946 |
<?php |
| 947 |
if ( ! empty( $csde_meta ) ) { |
| 948 |
foreach ( $csde_meta as $key => $entry ) { |
| 949 |
if ( 'name_pre' == $entry['position'] ) { |
| 950 |
$csde_key = 'csde_' . $key; |
| 951 |
$checked = usces_checked( $chk_ord, $csde_key, 'return' ); |
| 952 |
$name = $entry['name']; |
| 953 |
echo '<label for="chk_ord[' . esc_attr( $csde_key ) . ']"><input type="checkbox" class="check_order" id="chk_ord[' . esc_attr( $csde_key ) . ']" value="' . esc_attr( $csde_key ) . '"' . esc_attr( $checked ) . ' />' . esc_html( $name ) . '</label>'; |
| 954 |
} |
| 955 |
} |
| 956 |
} |
| 957 |
?> |
| 958 |
<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 esc_html_e( 'name', 'usces' ); ?></label> |
| 959 |
<?php |
| 960 |
switch ( $applyform ) { |
| 961 |
case 'JP': |
| 962 |
?> |
| 963 |
<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 esc_html_e( 'furigana', 'usces' ); ?></label> |
| 964 |
<?php |
| 965 |
break; |
| 966 |
} |
| 967 |
|
| 968 |
if ( ! empty( $csde_meta ) ) { |
| 969 |
foreach ( $csde_meta as $key => $entry ) { |
| 970 |
if ( 'name_after' == $entry['position'] ) { |
| 971 |
$csde_key = 'csde_' . $key; |
| 972 |
$checked = usces_checked( $chk_ord, $csde_key, 'return' ); |
| 973 |
$name = $entry['name']; |
| 974 |
echo '<label for="chk_ord[' . esc_attr( $csde_key ) . ']"><input type="checkbox" class="check_order" id="chk_ord[' . esc_attr( $csde_key ) . ']" value="' . esc_attr( $csde_key ) . '"' . esc_attr( $checked ) . ' />' . esc_html( $name ) . '</label>'; |
| 975 |
} |
| 976 |
} |
| 977 |
} |
| 978 |
|
| 979 |
switch ( $applyform ) { |
| 980 |
case 'JP': |
| 981 |
?> |
| 982 |
<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 esc_html_e( 'Zip/Postal Code', 'usces' ); ?></label> |
| 983 |
<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 esc_html_e( 'Country', 'usces' ); ?></label> |
| 984 |
<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 esc_html_e( 'Province', 'usces' ); ?></label> |
| 985 |
<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 esc_html_e( 'city', 'usces' ); ?></label> |
| 986 |
<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 esc_html_e( 'numbers', 'usces' ); ?></label> |
| 987 |
<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 esc_html_e( 'building name', 'usces' ); ?></label> |
| 988 |
<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 esc_html_e( 'Phone number', 'usces' ); ?></label> |
| 989 |
<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 esc_html_e( 'FAX number', 'usces' ); ?></label> |
| 990 |
<?php |
| 991 |
break; |
| 992 |
case 'US': |
| 993 |
default: |
| 994 |
?> |
| 995 |
<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 esc_html_e( 'Address Line1', 'usces' ); ?></label> |
| 996 |
<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 esc_html_e( 'Address Line2', 'usces' ); ?></label> |
| 997 |
<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 esc_html_e( 'city', 'usces' ); ?></label> |
| 998 |
<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 esc_html_e( 'State', 'usces' ); ?></label> |
| 999 |
<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 esc_html_e( 'Country', 'usces' ); ?></label> |
| 1000 |
<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 esc_html_e( 'Zip', 'usces' ); ?></label> |
| 1001 |
<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 esc_html_e( 'Phone number', 'usces' ); ?></label> |
| 1002 |
<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 esc_html_e( 'FAX number', 'usces' ); ?></label> |
| 1003 |
<?php |
| 1004 |
break; |
| 1005 |
} |
| 1006 |
|
| 1007 |
if ( ! empty( $csde_meta ) ) { |
| 1008 |
foreach ( $csde_meta as $key => $entry ) { |
| 1009 |
if ( 'fax_after' == $entry['position'] ) { |
| 1010 |
$csde_key = 'csde_' . $key; |
| 1011 |
$checked = usces_checked( $chk_ord, $csde_key, 'return' ); |
| 1012 |
$name = $entry['name']; |
| 1013 |
echo '<label for="chk_ord[' . esc_attr( $csde_key ) . ']"><input type="checkbox" class="check_order" id="chk_ord[' . esc_attr( $csde_key ) . ']" value="' . esc_attr( $csde_key ) . '"' . esc_attr( $checked ) . ' />' . esc_html( $name ) . '</label>'; |
| 1014 |
} |
| 1015 |
} |
| 1016 |
} |
| 1017 |
?> |
| 1018 |
<?php do_action( 'usces_action_chk_ord_delivery', $chk_ord ); ?> |
| 1019 |
</fieldset> |
| 1020 |
<fieldset><legend><?php esc_html_e( 'Order Infomation', 'usces' ); ?></legend> |
| 1021 |
<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 esc_html_e( 'shpping date', 'usces' ); ?></label> |
| 1022 |
<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 esc_html_e( 'payment method', 'usces' ); ?></label> |
| 1023 |
<label for="chk_ord[wc_trans_id]"><input type="checkbox" class="check_order" id="chk_ord[wc_trans_id]" value="wc_trans_id"<?php usces_checked( $chk_ord, 'wc_trans_id' ); ?> /><?php esc_html_e( 'Transaction ID', 'usces' ); ?></label> |
| 1024 |
<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 esc_html_e( 'shipping option', 'usces' ); ?></label> |
| 1025 |
<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 esc_html_e( 'Delivery date', 'usces' ); ?></label> |
| 1026 |
<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 esc_html_e( 'delivery time', 'usces' ); ?></label> |
| 1027 |
<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 esc_html_e( 'Shipping date', 'usces' ); ?></label> |
| 1028 |
<label for="chk_ord[status]"><input type="checkbox" class="check_order" id="chk_ord[status]" value="status"<?php usces_checked( $chk_ord, 'status' ); ?> /><?php esc_html_e( 'Status', 'usces' ); ?></label> |
| 1029 |
<label for="chk_ord[tracking_number]"><input type="checkbox" class="check_order" id="chk_ord[tracking_number]" value="tracking_number"<?php usces_checked( $chk_ord, 'tracking_number' ); ?> /><?php esc_html_e( 'Tracking number', 'usces' ); ?></label> |
| 1030 |
<label for="chk_ord[total_amount]"><input type="checkbox" class="check_order" id="chk_ord[total_amount]" value="total_amount"<?php usces_checked( $chk_ord, 'total_amount' ); ?> /><?php esc_html_e( 'Total Amount', 'usces' ); ?></label> |
| 1031 |
<label for="chk_ord[item_total_amount]"><input type="checkbox" class="check_order" id="chk_ord[item_total_amount]" value="item_total_amount"<?php usces_checked( $chk_ord, 'item_total_amount' ); ?> /><?php esc_html_e( 'total items', 'usces' ); ?></label> |
| 1032 |
<?php if ( usces_is_member_system() && usces_is_member_system_point() ) : ?> |
| 1033 |
<label for="chk_ord[getpoint]"><input type="checkbox" class="check_order" id="chk_ord[getpoint]" value="getpoint"<?php usces_checked( $chk_ord, 'getpoint' ); ?> /><?php esc_html_e( 'granted points', 'usces' ); ?></label> |
| 1034 |
<label for="chk_ord[usedpoint]"><input type="checkbox" class="check_order" id="chk_ord[usedpoint]" value="usedpoint"<?php usces_checked( $chk_ord, 'usedpoint' ); ?> /><?php esc_html_e( 'Used points', 'usces' ); ?></label> |
| 1035 |
<?php endif; ?> |
| 1036 |
<label for="chk_ord[discount]"><input type="checkbox" class="check_order" id="chk_ord[discount]" value="discount"<?php usces_checked( $chk_ord, 'discount' ); ?> /><?php esc_html_e( 'Discount', 'usces' ); ?></label> |
| 1037 |
<label for="chk_ord[shipping_charge]"><input type="checkbox" class="check_order" id="chk_ord[shipping_charge]" value="shipping_charge"<?php usces_checked( $chk_ord, 'shipping_charge' ); ?> /><?php esc_html_e( 'Shipping', 'usces' ); ?></label> |
| 1038 |
<label for="chk_ord[cod_fee]"><input type="checkbox" class="check_order" id="chk_ord[cod_fee]" value="cod_fee"<?php usces_checked( $chk_ord, 'cod_fee' ); ?> /><?php echo apply_filters( 'usces_filter_cod_label', __( 'COD fee', 'usces' ) ); // phpcs:ignore ?></label> |
| 1039 |
<?php if ( usces_is_tax_display() ) : ?> |
| 1040 |
<label for="chk_ord[tax]"><input type="checkbox" class="check_order" id="chk_ord[tax]" value="tax"<?php usces_checked( $chk_ord, 'tax' ); ?> /><?php esc_html_e( 'consumption tax', 'usces' ); ?></label> |
| 1041 |
<?php if ( usces_is_reduced_taxrate() ) : ?> |
| 1042 |
<label for="chk_ord[subtotal_standard]"><input type="checkbox" class="check_order" id="chk_ord[subtotal_standard]" value="subtotal_standard"<?php usces_checked( $chk_ord, 'subtotal_standard' ); ?> /><?php printf( __( "Applies to %s%%", 'usces' ), $this->options['tax_rate'] ); // phpcs:ignore ?></label> |
| 1043 |
<label for="chk_ord[tax_standard]"><input type="checkbox" class="check_order" id="chk_ord[tax_standard]" value="tax_standard"<?php usces_checked( $chk_ord, 'tax_standard' ); ?> /><?php printf( __( "%s%% consumption tax", 'usces' ), $this->options['tax_rate'] ); // phpcs:ignore ?></label> |
| 1044 |
<label for="chk_ord[subtotal_reduced]"><input type="checkbox" class="check_order" id="chk_ord[subtotal_reduced]" value="subtotal_reduced"<?php usces_checked( $chk_ord, 'subtotal_reduced' ); ?> /><?php printf( __( "Applies to %s%%", 'usces' ), $this->options['tax_rate_reduced'] ); // phpcs:ignore ?></label> |
| 1045 |
<label for="chk_ord[tax_reduced]"><input type="checkbox" class="check_order" id="chk_ord[tax_reduced]" value="tax_reduced"<?php usces_checked( $chk_ord, 'tax_reduced' ); ?> /><?php printf( __( "%s%% consumption tax", 'usces' ), $this->options['tax_rate_reduced'] ); // phpcs:ignore ?></label> |
| 1046 |
<?php endif; ?> |
| 1047 |
<?php endif; ?> |
| 1048 |
<label for="chk_ord[note]"><input type="checkbox" class="check_order" id="chk_ord[note]" value="note"<?php usces_checked( $chk_ord, 'note' ); ?> /><?php esc_html_e( 'Notes', 'usces' ); ?></label> |
| 1049 |
<?php |
| 1050 |
if ( ! empty( $csod_meta ) ) { |
| 1051 |
foreach ( $csod_meta as $key => $entry ) { |
| 1052 |
$csod_key = 'csod_' . $key; |
| 1053 |
$checked = usces_checked( $chk_ord, $csod_key, 'return' ); |
| 1054 |
$name = $entry['name']; |
| 1055 |
echo '<label for="chk_ord[' . esc_attr( $csod_key ) . ']"><input type="checkbox" class="check_order" id="chk_ord[' . esc_attr( $csod_key ) . ']" value="' . esc_attr( $csod_key ) . '"' . esc_attr( $checked ) . ' />' . esc_html( $name ) . '</label>'; |
| 1056 |
} |
| 1057 |
} |
| 1058 |
?> |
| 1059 |
<?php do_action( 'usces_action_chk_ord_order', $chk_ord ); ?> |
| 1060 |
</fieldset> |
| 1061 |
<fieldset><legend><?php esc_html_e( 'Admin Information', 'usces' ); ?></legend> |
| 1062 |
<label for="chk_ord[admin_memo]"><input type="checkbox" class="check_order" id="chk_ord[admin_memo]" value="admin_memo"<?php usces_checked( $chk_ord, 'admin_memo' ); ?> /><?php esc_html_e( 'Admin Note', 'usces' ); ?></label> |
| 1063 |
<?php do_action( 'usces_action_chk_ord_memo', $chk_ord ); ?> |
| 1064 |
</fieldset> |
| 1065 |
</div> |
| 1066 |
<?php echo apply_filters( 'usces_filter_order_list_footer', '' ); // phpcs:ignore ?> |
| 1067 |
<?php wp_nonce_field( 'order_list', 'wc_nonce' ); ?> |
| 1068 |
</form> |
| 1069 |
<?php usces_order_list_form_settlement_dialog(); ?> |
| 1070 |
<?php do_action( 'usces_action_order_list_footer' ); ?> |
| 1071 |
</div><!--usces_admin--> |
| 1072 |
</div><!--wrap--> |
| 1073 |
<script type="text/javascript"> |
| 1074 |
jQuery(function($){ |
| 1075 |
$('#tablesearch .search_submit input[name=searchIn][type=submit]').on('click', function () { |
| 1076 |
var dateErrorMsg = '<?php esc_html_e( 'Please enter the date in the format yyyy-mm-dd.', 'usces' ); ?>'; |
| 1077 |
var dateFields = ['order_date', 'order_modified', 'deli_date', 'delidue_date']; |
| 1078 |
var field0 = $('select[name="search[order_column][0]"').val(); |
| 1079 |
var field1 = $('select[name="search[order_column][1]"').val(); |
| 1080 |
var orderWordTerm0 = $('select[name="search[order_word_term][0]"]').val(); |
| 1081 |
var isNotContainOperator0 = 'contain' !== orderWordTerm0; |
| 1082 |
var orderWordTerm1 = $('select[name="search[order_word_term][1]"]').val(); |
| 1083 |
var isNotContainOperator1 = 'contain' !== orderWordTerm1; |
| 1084 |
|
| 1085 |
if (dateFields.indexOf(field0) > -1 && isNotContainOperator0) { |
| 1086 |
var word0 = $('input[name="search[order_word][0]"]').val().trim(); |
| 1087 |
if (!isValidDate(word0)) { |
| 1088 |
alert(dateErrorMsg); |
| 1089 |
return false; |
| 1090 |
} |
| 1091 |
} |
| 1092 |
|
| 1093 |
if (dateFields.indexOf(field1) > -1 && isNotContainOperator1) { |
| 1094 |
var word1 = $('input[name="search[order_word][1]"]').val().trim(); |
| 1095 |
if (!isValidDate(word1)) { |
| 1096 |
alert(dateErrorMsg); |
| 1097 |
return false; |
| 1098 |
} |
| 1099 |
} |
| 1100 |
|
| 1101 |
return true; |
| 1102 |
}); |
| 1103 |
|
| 1104 |
function isValidDate(dateString) { |
| 1105 |
var regEx = /^\d{4}-\d{2}-\d{2}$/; |
| 1106 |
if (!dateString.match(regEx)) { |
| 1107 |
return false; |
| 1108 |
} |
| 1109 |
|
| 1110 |
var d = new Date(dateString); |
| 1111 |
var dNum = d.getTime(); |
| 1112 |
if (!dNum && dNum !== 0) { |
| 1113 |
return false; |
| 1114 |
} |
| 1115 |
|
| 1116 |
return d.toISOString().slice(0, 10) === dateString; |
| 1117 |
} |
| 1118 |
|
| 1119 |
$("input[name='allcheck']").click(function () { |
| 1120 |
if( $(this).prop("checked") ){ |
| 1121 |
$("input[name*='listcheck']").prop({checked: true}); |
| 1122 |
}else{ |
| 1123 |
$("input[name*='listcheck']").prop({checked: false}); |
| 1124 |
} |
| 1125 |
}); |
| 1126 |
|
| 1127 |
operation = { |
| 1128 |
change_order_search_field_0 :function (is_change = true){ |
| 1129 |
var html = ''; |
| 1130 |
var column = $("#searchorderselect_0").val(); |
| 1131 |
var mailprint = $("#searchorderselect_0 option:selected").attr('data-mailprint'); |
| 1132 |
|
| 1133 |
if( column == 'estimate_status' ) { |
| 1134 |
|
| 1135 |
html = '<select name="search[order_word][0]" class="searchselect">'; |
| 1136 |
<?php |
| 1137 |
foreach ( (array) $estimate_status as $rkey => $rvalue ) : |
| 1138 |
if ( isset( $arr_search['order_word'][0] ) && $rkey == $arr_search['order_word'][0] ) { |
| 1139 |
$rselected = ' selected="selected"'; |
| 1140 |
} else { |
| 1141 |
$rselected = ''; |
| 1142 |
} |
| 1143 |
?> |
| 1144 |
html += '<option value="<?php echo esc_attr( $rkey ); ?>"<?php echo esc_attr( $rselected ); ?>><?php echo esc_html( $rvalue ); ?></option>'; |
| 1145 |
<?php |
| 1146 |
endforeach; |
| 1147 |
?> |
| 1148 |
html += '</select>'; |
| 1149 |
|
| 1150 |
}else if( column == 'process_status' ) { |
| 1151 |
|
| 1152 |
html = '<select name="search[order_word][0]" class="searchselect">'; |
| 1153 |
<?php |
| 1154 |
foreach ( (array) $process_status as $rkey => $rvalue ) : |
| 1155 |
if ( isset( $arr_search['order_word'][0] ) && $rkey == $arr_search['order_word'][0] ) { |
| 1156 |
$rselected = ' selected="selected"'; |
| 1157 |
} else { |
| 1158 |
$rselected = ''; |
| 1159 |
} |
| 1160 |
?> |
| 1161 |
html += '<option value="<?php echo esc_attr( $rkey ); ?>"<?php echo esc_attr( $rselected ); ?>><?php echo esc_html( $rvalue ); ?></option>'; |
| 1162 |
<?php |
| 1163 |
endforeach; |
| 1164 |
?> |
| 1165 |
html += '</select>'; |
| 1166 |
|
| 1167 |
}else if( column == 'receipt_status' ) { |
| 1168 |
|
| 1169 |
html = '<select name="search[order_word][0]" class="searchselect">'; |
| 1170 |
<?php |
| 1171 |
foreach ( (array) $receipt_status as $rkey => $rvalue ) : |
| 1172 |
if ( isset( $arr_search['order_word'][0] ) && $rkey == $arr_search['order_word'][0] ) { |
| 1173 |
$rselected = ' selected="selected"'; |
| 1174 |
} else { |
| 1175 |
$rselected = ''; |
| 1176 |
} |
| 1177 |
?> |
| 1178 |
html += '<option value="<?php echo esc_attr( $rkey ); ?>"<?php echo esc_attr( $rselected ); ?>><?php echo esc_html( $rvalue ); ?></option>'; |
| 1179 |
<?php |
| 1180 |
endforeach; |
| 1181 |
?> |
| 1182 |
html += '</select>'; |
| 1183 |
|
| 1184 |
} else if( column == 'deli_method' ) { |
| 1185 |
|
| 1186 |
html = '<select name="search[order_word][0]" class="searchselect">'; |
| 1187 |
<?php |
| 1188 |
foreach ( (array) $delivery_method as $idx => $delivery ) : |
| 1189 |
$rselected = ( isset( $arr_search['order_word'][0] ) && $delivery['id'] == $arr_search['order_word'][0] ) ? ' selected="selected"' : ''; |
| 1190 |
?> |
| 1191 |
html += '<option value="<?php echo esc_attr( $delivery['id'] ); ?>"<?php echo esc_attr( $rselected ); ?>><?php echo esc_html( $delivery['name'] ); ?></option>'; |
| 1192 |
<?php |
| 1193 |
endforeach; |
| 1194 |
?> |
| 1195 |
html += '</select>'; |
| 1196 |
|
| 1197 |
} else if( mailprint ) { |
| 1198 |
|
| 1199 |
html = '<select name="search[order_word][0]" class="searchselect">'; |
| 1200 |
if ( mailprint === 'mail' ) { |
| 1201 |
<?php |
| 1202 |
foreach( $arr_mail_print_status['mail'] as $k_pm => $v_pm ): |
| 1203 |
$rselected = ( isset($arr_search['order_word'][0]) && $k_pm == $arr_search['order_word'][0] ) ? ' selected="selected"' : ''; |
| 1204 |
?> |
| 1205 |
html += '<option value="<?php echo esc_attr($k_pm); ?>"<?php echo esc_attr( $rselected ); ?>><?php echo esc_html( $v_pm['alias'] ); ?></option>'; |
| 1206 |
<?php |
| 1207 |
endforeach; |
| 1208 |
?> |
| 1209 |
} else if ( mailprint === 'print' ) { |
| 1210 |
<?php |
| 1211 |
foreach( $arr_mail_print_status['print'] as $k_pm => $v_pm ): |
| 1212 |
$rselected = ( isset($arr_search['order_word'][0]) && $k_pm == $arr_search['order_word'][0] ) ? ' selected="selected"' : ''; |
| 1213 |
?> |
| 1214 |
html += '<option value="<?php echo esc_attr($k_pm); ?>"<?php echo esc_attr( $rselected ); ?>><?php echo esc_html( $v_pm['alias'] ); ?></option>'; |
| 1215 |
<?php |
| 1216 |
endforeach; |
| 1217 |
?> |
| 1218 |
} |
| 1219 |
html += '</select>'; |
| 1220 |
|
| 1221 |
} else { |
| 1222 |
html = '<input name="search[order_word][0]" type="text" value="'+ (!(is_change) ? "<?php echo esc_attr( $arr_search['order_word'][0] ); ?>" : "") +'" class="regular-text" maxlength="50" />'; |
| 1223 |
} |
| 1224 |
|
| 1225 |
html += '<select name="search[order_word_term][0]" class="termselect">'; |
| 1226 |
html += '<option value="contain"<?php echo ( 'contain' == $arr_search['order_word_term'][0] ? ' selected="selected"' : '' ); ?>><?php esc_html_e( 'Contain', 'usces' ); ?></option>'; |
| 1227 |
html += '<option value="notcontain"<?php echo ( 'notcontain' == $arr_search['order_word_term'][0] ? ' selected="selected"' : '' ); ?>><?php esc_html_e( 'Not Contain', 'usces' ); ?></option>'; |
| 1228 |
html += '<option value="equal"<?php echo ( 'equal' == $arr_search['order_word_term'][0] ? ' selected="selected"' : '' ); ?>><?php esc_html_e( 'Equal', 'usces' ); ?></option>'; |
| 1229 |
html += '<option value="morethan"<?php echo ( 'morethan' == $arr_search['order_word_term'][0] ? ' selected="selected"' : '' ); ?>><?php esc_html_e( 'More than', 'usces' ); ?></option>'; |
| 1230 |
html += '<option value="lessthan"<?php echo ( 'lessthan' == $arr_search['order_word_term'][0] ? ' selected="selected"' : '' ); ?>><?php esc_html_e( 'Less than', 'usces' ); ?></option>'; |
| 1231 |
html += '</select>'; |
| 1232 |
|
| 1233 |
$("#searchorderword_0").html( html ); |
| 1234 |
}, |
| 1235 |
|
| 1236 |
change_order_search_field_1 :function (is_change = true){ |
| 1237 |
var html = ''; |
| 1238 |
var column = $("#searchorderselect_1").val(); |
| 1239 |
var mailprint = $("#searchorderselect_1 option:selected").attr('data-mailprint'); |
| 1240 |
|
| 1241 |
if( column == 'estimate_status' ) { |
| 1242 |
|
| 1243 |
html = '<select name="search[order_word][1]" class="searchselect">'; |
| 1244 |
<?php |
| 1245 |
foreach ( (array) $estimate_status as $rkey => $rvalue ) : |
| 1246 |
if ( isset( $arr_search['order_word'][1] ) && $rkey == $arr_search['order_word'][1] ) { |
| 1247 |
$rselected = ' selected="selected"'; |
| 1248 |
} else { |
| 1249 |
$rselected = ''; |
| 1250 |
} |
| 1251 |
?> |
| 1252 |
html += '<option value="<?php echo esc_attr( $rkey ); ?>"<?php echo esc_attr( $rselected ); ?>><?php echo esc_html( $rvalue ); ?></option>'; |
| 1253 |
<?php |
| 1254 |
endforeach; |
| 1255 |
?> |
| 1256 |
html += '</select>'; |
| 1257 |
|
| 1258 |
}else if( column == 'process_status' ) { |
| 1259 |
|
| 1260 |
html = '<select name="search[order_word][1]" class="searchselect">'; |
| 1261 |
<?php |
| 1262 |
foreach ( (array) $process_status as $rkey => $rvalue ) : |
| 1263 |
if ( isset( $arr_search['order_word'][1] ) && $rkey == $arr_search['order_word'][1] ) { |
| 1264 |
$rselected = ' selected="selected"'; |
| 1265 |
} else { |
| 1266 |
$rselected = ''; |
| 1267 |
} |
| 1268 |
?> |
| 1269 |
html += '<option value="<?php echo esc_attr( $rkey ); ?>"<?php echo esc_attr( $rselected ); ?>><?php echo esc_html( $rvalue ); ?></option>'; |
| 1270 |
<?php |
| 1271 |
endforeach; |
| 1272 |
?> |
| 1273 |
html += '</select>'; |
| 1274 |
|
| 1275 |
}else if( column == 'receipt_status' ) { |
| 1276 |
|
| 1277 |
html = '<select name="search[order_word][1]" class="searchselect">'; |
| 1278 |
<?php |
| 1279 |
foreach ( (array) $receipt_status as $rkey => $rvalue ) : |
| 1280 |
if ( isset( $arr_search['order_word'][1] ) && $rkey == $arr_search['order_word'][1] ) { |
| 1281 |
$rselected = ' selected="selected"'; |
| 1282 |
} else { |
| 1283 |
$rselected = ''; |
| 1284 |
} |
| 1285 |
?> |
| 1286 |
html += '<option value="<?php echo esc_attr( $rkey ); ?>"<?php echo esc_attr( $rselected ); ?>><?php echo esc_html( $rvalue ); ?></option>'; |
| 1287 |
<?php |
| 1288 |
endforeach; |
| 1289 |
?> |
| 1290 |
html += '</select>'; |
| 1291 |
|
| 1292 |
} else if ( column == 'deli_method' ) { |
| 1293 |
|
| 1294 |
html = '<select name="search[order_word][1]" class="searchselect">'; |
| 1295 |
<?php |
| 1296 |
foreach ( (array) $delivery_method as $idx => $delivery ) : |
| 1297 |
$rselected = ( isset( $arr_search['order_word'][1] ) && $delivery['id'] == $arr_search['order_word'][1] ) ? ' selected="selected"' : ''; |
| 1298 |
?> |
| 1299 |
html += '<option value="<?php echo esc_attr( $delivery['id'] ); ?>"<?php echo esc_attr( $rselected ); ?>><?php echo esc_html( $delivery['name'] ); ?></option>'; |
| 1300 |
<?php |
| 1301 |
endforeach; |
| 1302 |
?> |
| 1303 |
html += '</select>'; |
| 1304 |
|
| 1305 |
} else if( mailprint ) { |
| 1306 |
|
| 1307 |
html = '<select name="search[order_word][1]" class="searchselect">'; |
| 1308 |
if ( mailprint === 'mail' ) { |
| 1309 |
<?php |
| 1310 |
foreach( $arr_mail_print_status['mail'] as $k_pm => $v_pm ): |
| 1311 |
$rselected = ( isset($arr_search['order_word'][1]) && $k_pm == $arr_search['order_word'][1] ) ? ' selected="selected"' : ''; |
| 1312 |
?> |
| 1313 |
html += '<option value="<?php echo esc_attr($k_pm); ?>"<?php echo esc_attr( $rselected ); ?>><?php echo esc_html( $v_pm['alias'] ); ?></option>'; |
| 1314 |
<?php |
| 1315 |
endforeach; |
| 1316 |
?> |
| 1317 |
} else if ( mailprint === 'print' ) { |
| 1318 |
<?php |
| 1319 |
foreach( $arr_mail_print_status['print'] as $k_pm => $v_pm ): |
| 1320 |
$rselected = ( isset($arr_search['order_word'][1]) && $k_pm == $arr_search['order_word'][1] ) ? ' selected="selected"' : ''; |
| 1321 |
?> |
| 1322 |
html += '<option value="<?php echo esc_attr($k_pm); ?>"<?php echo esc_attr( $rselected ); ?>><?php echo esc_html( $v_pm['alias'] ); ?></option>'; |
| 1323 |
<?php |
| 1324 |
endforeach; |
| 1325 |
$orderword1 = isset( $arr_search['order_word'][1] ) ? $arr_search['order_word'][1] : ''; |
| 1326 |
$order_word_term1 = isset( $arr_search['order_word_term'][1] ) ? $arr_search['order_word_term'][1] : ''; |
| 1327 |
?> |
| 1328 |
} |
| 1329 |
html += '</select>'; |
| 1330 |
|
| 1331 |
} else { |
| 1332 |
html = '<input name="search[order_word][1]" type="text" value="'+ (!(is_change) ? "<?php echo esc_attr( $orderword1 ); ?>" : "") +'" class="regular-text" maxlength="50" />'; |
| 1333 |
} |
| 1334 |
|
| 1335 |
html += '<select name="search[order_word_term][1]" class="termselect">'; |
| 1336 |
html += '<option value="contain"<?php echo ( 'contain' == $order_word_term1 ? ' selected="selected"' : '' ); ?>><?php esc_html_e( 'Contain', 'usces' ); ?></option>'; |
| 1337 |
html += '<option value="notcontain"<?php echo ( 'notcontain' == $order_word_term1 ? ' selected="selected"' : '' ); ?>><?php esc_html_e( 'Not Contain', 'usces' ); ?></option>'; |
| 1338 |
html += '<option value="equal"<?php echo ( 'equal' == $order_word_term1 ? ' selected="selected"' : '' ); ?>><?php esc_html_e( 'Equal', 'usces' ); ?></option>'; |
| 1339 |
html += '<option value="morethan"<?php echo ( 'morethan' == $order_word_term1 ? ' selected="selected"' : '' ); ?>><?php esc_html_e( 'More than', 'usces' ); ?></option>'; |
| 1340 |
html += '<option value="lessthan"<?php echo ( 'lessthan' == $order_word_term1 ? ' selected="selected"' : '' ); ?>><?php esc_html_e( 'Less than', 'usces' ); ?></option>'; |
| 1341 |
html += '</select>'; |
| 1342 |
|
| 1343 |
$("#searchorderword_1").html( html ); |
| 1344 |
}, |
| 1345 |
|
| 1346 |
change_product_search_field_0 :function (){ |
| 1347 |
var html = ''; |
| 1348 |
var column = $("#searchproductselect_0").val(); |
| 1349 |
<?php |
| 1350 |
$arr_search['product_word'][0] = isset( $arr_search['product_word'][0] ) ? $arr_search['product_word'][0] : ''; |
| 1351 |
$arr_search['option_word'][0] = isset( $arr_search['option_word'][0] ) ? $arr_search['option_word'][0] : ''; |
| 1352 |
$arr_search['product_word_term'][0] = isset( $arr_search['product_word_term'][0] ) ? $arr_search['product_word_term'][0] : ''; |
| 1353 |
?> |
| 1354 |
|
| 1355 |
if( column == 'item_option' ) { |
| 1356 |
|
| 1357 |
html = '<?php esc_html_e( 'option name', 'usces' ); ?>:<input name="search[product_word][0]" type="text" value="<?php echo esc_attr( $arr_search['product_word'][0] ); ?>" class="text" maxlength="50" /> <?php esc_html_e( 'option value', 'usces' ); ?>:<input name="search[option_word][0]" type="text" value="<?php echo esc_attr( $arr_search['option_word'][0] ); ?>" class="text" maxlength="50" />'; |
| 1358 |
|
| 1359 |
}else{ |
| 1360 |
|
| 1361 |
html = '<input name="search[product_word][0]" type="text" value="<?php echo esc_attr( $arr_search['product_word'][0] ); ?>" class="regular-text" maxlength="50" />'; |
| 1362 |
html += '<select name="search[product_word_term][0]" class="termselect">'; |
| 1363 |
html += '<option value="contain"<?php echo ( 'contain' == $arr_search['product_word_term'][0] ? ' selected="selected"' : '' ); ?>><?php esc_html_e( 'Contain', 'usces' ); ?></option>'; |
| 1364 |
html += '<option value="notcontain"<?php echo ( 'notcontain' == $arr_search['product_word_term'][0] ? ' selected="selected"' : '' ); ?>><?php esc_html_e( 'Not Contain', 'usces' ); ?></option>'; |
| 1365 |
html += '<option value="equal"<?php echo ( 'equal' == $arr_search['product_word_term'][0] ? ' selected="selected"' : '' ); ?>><?php esc_html_e( 'Equal', 'usces' ); ?></option>'; |
| 1366 |
html += '<option value="morethan"<?php echo ( 'morethan' == $arr_search['product_word_term'][0] ? ' selected="selected"' : '' ); ?>><?php esc_html_e( 'More than', 'usces' ); ?></option>'; |
| 1367 |
html += '<option value="lessthan"<?php echo ( 'lessthan' == $arr_search['product_word_term'][0] ? ' selected="selected"' : '' ); ?>><?php esc_html_e( 'Less than', 'usces' ); ?></option>'; |
| 1368 |
html += '</select>'; |
| 1369 |
} |
| 1370 |
|
| 1371 |
$("#searchproductword_0").html( html ); |
| 1372 |
}, |
| 1373 |
|
| 1374 |
change_product_search_field_1 :function (){ |
| 1375 |
var html = ''; |
| 1376 |
var column = $("#searchproductselect_1").val(); |
| 1377 |
<?php |
| 1378 |
$arr_search['product_word'][1] = isset( $arr_search['product_word'][1] ) ? $arr_search['product_word'][1] : ''; |
| 1379 |
$arr_search['option_word'][1] = isset( $arr_search['option_word'][1] ) ? $arr_search['option_word'][1] : ''; |
| 1380 |
$arr_search['product_word_term'][1] = isset( $arr_search['product_word_term'][1] ) ? $arr_search['product_word_term'][1] : ''; |
| 1381 |
?> |
| 1382 |
|
| 1383 |
if( column == 'item_option' ) { |
| 1384 |
|
| 1385 |
html = '<?php esc_html_e( 'option name', 'usces' ); ?>:<input name="search[product_word][1]" type="text" value="<?php echo esc_attr( $arr_search['product_word'][1] ); ?>" class="text" maxlength="50" /> <?php esc_html_e( 'option value', 'usces' ); ?>:<input name="search[option_word][1]" type="text" value="<?php echo esc_attr( $arr_search['option_word'][1] ); ?>" class="text" maxlength="50" />'; |
| 1386 |
|
| 1387 |
}else{ |
| 1388 |
|
| 1389 |
html = '<input name="search[product_word][1]" type="text" value="<?php echo esc_attr( $arr_search['product_word'][1] ); ?>" class="regular-text" maxlength="50" />'; |
| 1390 |
html += '<select name="search[product_word_term][1]" class="termselect">'; |
| 1391 |
html += '<option value="contain"<?php echo ( 'contain' == $arr_search['product_word_term'][1] ? ' selected="selected"' : '' ); ?>><?php esc_html_e( 'Contain', 'usces' ); ?></option>'; |
| 1392 |
html += '<option value="notcontain"<?php echo ( 'notcontain' == $arr_search['product_word_term'][1] ? ' selected="selected"' : '' ); ?>><?php esc_html_e( 'Not Contain', 'usces' ); ?></option>'; |
| 1393 |
html += '<option value="equal"<?php echo ( 'equal' == $arr_search['product_word_term'][1] ? ' selected="selected"' : '' ); ?>><?php esc_html_e( 'Equal', 'usces' ); ?></option>'; |
| 1394 |
html += '<option value="morethan"<?php echo ( 'morethan' == $arr_search['product_word_term'][1] ? ' selected="selected"' : '' ); ?>><?php esc_html_e( 'More than', 'usces' ); ?></option>'; |
| 1395 |
html += '<option value="lessthan"<?php echo ( 'lessthan' == $arr_search['product_word_term'][1] ? ' selected="selected"' : '' ); ?>><?php esc_html_e( 'Less than', 'usces' ); ?></option>'; |
| 1396 |
html += '</select>'; |
| 1397 |
} |
| 1398 |
|
| 1399 |
$("#searchproductword_1").html( html ); |
| 1400 |
}, |
| 1401 |
|
| 1402 |
change_collective_field :function (){ |
| 1403 |
var label = ''; |
| 1404 |
var html = ''; |
| 1405 |
var column = $("#changeselect").val(); |
| 1406 |
|
| 1407 |
if( column == 'receipt_status' ) { |
| 1408 |
label = ''; |
| 1409 |
html = '<select name="change[word]" class="searchselect">'; |
| 1410 |
<?php foreach ( (array) $receipt_status as $orkey => $orvalue ) : ?> |
| 1411 |
html += '<option value="<?php echo esc_attr( $orkey ); ?>"><?php echo esc_html( $orvalue ); ?></option>'; |
| 1412 |
<?php endforeach; ?> |
| 1413 |
html += '</select>'; |
| 1414 |
}else if( column == 'estimate_status' ) { |
| 1415 |
label = ''; |
| 1416 |
html = '<select name="change[word]" class="searchselect">'; |
| 1417 |
<?php foreach ( (array) $estimate_status as $oskey => $osvalue ) : ?> |
| 1418 |
html += '<option value="<?php echo esc_attr( $oskey ); ?>"><?php echo esc_html( $osvalue ); ?></option>'; |
| 1419 |
<?php endforeach; ?> |
| 1420 |
html += '</select>'; |
| 1421 |
}else if( column == 'process_status' ) { |
| 1422 |
label = ''; |
| 1423 |
html = '<select name="change[word]" class="searchselect">'; |
| 1424 |
<?php foreach ( (array) $process_status as $oskey => $osvalue ) : ?> |
| 1425 |
html += '<option value="<?php echo esc_attr( $oskey ); ?>"><?php echo esc_html( $osvalue ); ?></option>'; |
| 1426 |
<?php endforeach; ?> |
| 1427 |
html += '</select>'; |
| 1428 |
}else if( column == 'delete' ) { |
| 1429 |
label = ''; |
| 1430 |
html = ''; |
| 1431 |
} |
| 1432 |
|
| 1433 |
$("#changelabel").html( label ); |
| 1434 |
$("#changefield").html( html ); |
| 1435 |
} |
| 1436 |
}; |
| 1437 |
|
| 1438 |
$("#searchorderselect_0").change(function () { |
| 1439 |
operation.change_order_search_field_0(); |
| 1440 |
}); |
| 1441 |
$("#searchorderselect_1").change(function () { |
| 1442 |
operation.change_order_search_field_1(); |
| 1443 |
}); |
| 1444 |
$("#searchproductselect_0").change(function () { |
| 1445 |
operation.change_product_search_field_0(); |
| 1446 |
}); |
| 1447 |
$("#searchproductselect_1").change(function () { |
| 1448 |
operation.change_product_search_field_1(); |
| 1449 |
}); |
| 1450 |
$("#changeselect").change(function () { |
| 1451 |
operation.change_collective_field(); |
| 1452 |
}); |
| 1453 |
operation.change_order_search_field_0(false); |
| 1454 |
operation.change_order_search_field_1(false); |
| 1455 |
operation.change_product_search_field_0(); |
| 1456 |
operation.change_product_search_field_1(); |
| 1457 |
operation.change_collective_field(); |
| 1458 |
|
| 1459 |
$("#collective_change").click(function () { |
| 1460 |
if( $("#changeselect option:selected").val() == '' ) { |
| 1461 |
$("#orderlistaction").val(''); |
| 1462 |
return false; |
| 1463 |
} |
| 1464 |
if( $("input[name*='listcheck']:checked").length == 0 ) { |
| 1465 |
alert("<?php esc_html_e( 'Choose the data.', 'usces' ); ?>"); |
| 1466 |
$("#orderlistaction").val(''); |
| 1467 |
return false; |
| 1468 |
} |
| 1469 |
var coll = $("#changeselect").val(); |
| 1470 |
var mes = ''; |
| 1471 |
if( coll == 'receipt_status' ){ |
| 1472 |
mes = <?php echo sprintf( __( "'Transfer status of the items which you have checked will be changed in to ' + %s + '. %sDo you agree?'", 'usces' ), '$("select\[name=\"change\[word\]\"\] option:selected").html()', '\n\n' ); // phpcs:ignore ?>; |
| 1473 |
}else if( coll == 'estimate_status' ){ |
| 1474 |
mes = <?php echo sprintf( __( "'Data status which you have cheked will be changed in to ' + %s + '. %sDo you agree?'", 'usces' ), '$("select\[name=\"change\[word\]\"\] option:selected").html()', '\n\n' ); // phpcs:ignore ?>; |
| 1475 |
}else if( coll == 'process_status' ){ |
| 1476 |
mes = <?php echo sprintf( __( "'Data status which you have cheked will be changed in to ' + %s + '. %sDo you agree?'", 'usces' ), '$("select\[name=\"change\[word\]\"\] option:selected").html()', '\n\n' ); // phpcs:ignore ?>; |
| 1477 |
}else if(coll == 'delete'){ |
| 1478 |
mes = '<?php esc_html_e( 'Are you sure of deleting all the checked data in bulk?', 'usces' ); ?>'; |
| 1479 |
} |
| 1480 |
if( mes != '' ) { |
| 1481 |
if( !confirm(mes) ){ |
| 1482 |
$("#orderlistaction").val(''); |
| 1483 |
return false; |
| 1484 |
} |
| 1485 |
} |
| 1486 |
<?php do_action( 'usces_action_order_list_collective_change_js' ); ?> |
| 1487 |
$("#orderlistaction").val('collective'); |
| 1488 |
$('#form_tablesearch').submit(); |
| 1489 |
}); |
| 1490 |
|
| 1491 |
$("#startdate").datepicker({ |
| 1492 |
dateFormat: "yy-mm-dd", |
| 1493 |
onSelect: function(){$("#datepic_period").val(3);} |
| 1494 |
}); |
| 1495 |
$("#enddate").datepicker({ |
| 1496 |
dateFormat: "yy-mm-dd", |
| 1497 |
onSelect: function(){$("#datepic_period").val(3);} |
| 1498 |
}); |
| 1499 |
$("#datepic_period").change( function(){ |
| 1500 |
if( '3' == $(this).val() ){ |
| 1501 |
$("#startdate").prop( 'disabled', false ); |
| 1502 |
$("#enddate").prop( 'disabled', false ); |
| 1503 |
}else{ |
| 1504 |
$("#startdate").prop( 'disabled', true ); |
| 1505 |
$("#enddate").prop( 'disabled', true ); |
| 1506 |
} |
| 1507 |
}); |
| 1508 |
$("#apply_datepic").click(function(){ |
| 1509 |
$("#period").val('<input name="changePeriod" type="hidden" value="1" />'); |
| 1510 |
if( '3' == $("#datepic_period").val() ){ |
| 1511 |
period = '3'; |
| 1512 |
startdate = $("#startdate").val(); |
| 1513 |
enddate = $("#enddate").val(); |
| 1514 |
}else{ |
| 1515 |
period = $("#datepic_period").val(); |
| 1516 |
startdate = ''; |
| 1517 |
enddate = ''; |
| 1518 |
} |
| 1519 |
cvalue = 'period=' + period + '&start=' + startdate + '&end=' + enddate; |
| 1520 |
$.cookie("orderPeriod", cvalue, { expires: 30, path: "<?php echo esc_url( $usces_admin_path ); ?>", domain: ""}); |
| 1521 |
$("#orderlistaction").val(''); |
| 1522 |
$("#form_tablesearch").append('<input name="searchIn" type="hidden" value="1" />'); |
| 1523 |
$('#form_tablesearch').submit(); |
| 1524 |
}); |
| 1525 |
|
| 1526 |
$("#datepic_title").click( |
| 1527 |
function(){ |
| 1528 |
$(this).parents("#datepic_navi").toggleClass("active"); |
| 1529 |
} |
| 1530 |
); |
| 1531 |
|
| 1532 |
if( '0' == $("#datepic_period").val() ){ |
| 1533 |
$("#datepic_title").html('<span class="dashicons dashicons-calendar-alt"></span><?php esc_html_e( 'All of period', 'usces' ); ?>'); |
| 1534 |
}else if( '1' == $("#datepic_period").val() ){ |
| 1535 |
$("#datepic_title").html('<span class="dashicons dashicons-calendar-alt"></span><?php esc_html_e( 'This month', 'usces' ); ?>'); |
| 1536 |
}else if( '2' == $("#datepic_period").val() ){ |
| 1537 |
$("#datepic_title").html('<span class="dashicons dashicons-calendar-alt"></span><?php esc_html_e( 'Last month', 'usces' ); ?>'); |
| 1538 |
}else{ |
| 1539 |
if( '' == $("#startdate").val() ){ |
| 1540 |
sdate = '<?php esc_html_e( 'first day', 'usces' ); ?>'; |
| 1541 |
}else{ |
| 1542 |
sdate = $("#startdate").val(); |
| 1543 |
} |
| 1544 |
if( '' == $("#enddate").val() ){ |
| 1545 |
edate = '<?php esc_html_e( 'today', 'usces' ); ?>'; |
| 1546 |
}else{ |
| 1547 |
edate = $("#enddate").val(); |
| 1548 |
} |
| 1549 |
$("#datepic_title").html('<span class="dashicons dashicons-calendar-alt"></span>' + sdate + ' <?php esc_html_e( 'to', 'usces' ); ?> ' + edate); |
| 1550 |
} |
| 1551 |
|
| 1552 |
<?php usces_order_list_js_settlement_dialog(); ?> |
| 1553 |
<?php echo apply_filters( 'usces_filter_order_list_page_js', '', $DT ); // phpcs:ignore ?> |
| 1554 |
|
| 1555 |
$('table#mainDataTable tbody input[type=checkbox]').change( |
| 1556 |
function() { |
| 1557 |
$('input').closest('tbody').removeClass('select'); |
| 1558 |
$(':checked').closest('tbody').addClass('select'); |
| 1559 |
} |
| 1560 |
).trigger('change'); |
| 1561 |
|
| 1562 |
$("#searchVisiLink").click(function() { |
| 1563 |
if ( $("#searchBox").css("display") != "block" ){ |
| 1564 |
$("#searchBox").slideDown(300); |
| 1565 |
$("#searchVisiLink").html('<?php esc_html_e( 'Hide the Operation field', 'usces' ); ?><span class="dashicons dashicons-arrow-up"></span>'); |
| 1566 |
$.cookie("orderSearchBox", 1, { path: "<?php echo esc_url( $usces_admin_path ); ?>", domain: ""}) == true; |
| 1567 |
}else{ |
| 1568 |
$("#searchBox").slideUp(300); |
| 1569 |
$("#searchVisiLink").html('<?php esc_html_e( 'Show the Operation field', 'usces' ); ?><span class="dashicons dashicons-arrow-down"></span>'); |
| 1570 |
$.cookie("orderSearchBox", 0, { path: "<?php echo esc_url( $usces_admin_path ); ?>", domain: ""}) == true; |
| 1571 |
} |
| 1572 |
}); |
| 1573 |
|
| 1574 |
(function setCookie() { |
| 1575 |
<?php |
| 1576 |
// phpcs:disable |
| 1577 |
$data_cookie = array(); |
| 1578 |
$data_cookie['placeholder_escape'] = $DT->placeholder_escape; |
| 1579 |
$data_cookie['startRow'] = $DT->startRow; /* 表示開始行番号 */ |
| 1580 |
$data_cookie['sortColumn'] = $DT->sortColumn; /* 現在ソート中のフィールド */ |
| 1581 |
$data_cookie['totalRow'] = $DT->totalRow; /* � |
| 1582 |
�行数 */ |
| 1583 |
$data_cookie['selectedRow'] = $DT->selectedRow; /* 絞り込まれた行数 */ |
| 1584 |
$data_cookie['currentPage'] = $DT->currentPage; /* 現在のページNo */ |
| 1585 |
$data_cookie['previousPage'] = $DT->previousPage; /* 前のページNo */ |
| 1586 |
$data_cookie['nextPage'] = $DT->nextPage; /* 次のページNo */ |
| 1587 |
$data_cookie['lastPage'] = $DT->lastPage; /* 最終ページNo */ |
| 1588 |
$data_cookie['userHeaderNames'] = $DT->userHeaderNames; /* � |
| 1589 |
�てのフィールド */ |
| 1590 |
$data_cookie['sortSwitchs'] = $DT->sortSwitchs; /* 各フィールド毎の昇順降順スイッチ */ |
| 1591 |
$data_cookie['arr_search'] = $DT->arr_search; |
| 1592 |
// phpcs:enable |
| 1593 |
?> |
| 1594 |
$.cookie('<?php echo "{$DT->table}_path"; ?>', '<?php echo esc_url( $usces_admin_path ); ?>', { path: "<?php echo esc_url( $usces_admin_path ); ?>", domain: ""}); |
| 1595 |
$.cookie('<?php echo "{$DT->table}"; ?>', '<?php echo str_replace( "'", "\'", json_encode( $data_cookie ) ); ?>', { path: "<?php echo esc_url( $usces_admin_path ); ?>", domain: ""}); |
| 1596 |
// save list current_page_ids to localStorage. |
| 1597 |
window.localStorage.setItem('wel_order_current_page_ids', <?php echo wp_json_encode( $DT->currentPageIds ); ?>); |
| 1598 |
})(); |
| 1599 |
|
| 1600 |
if ($.cookie("orderSearchBox") == true){ |
| 1601 |
$("#searchVisiLink").html('<?php esc_html_e( 'Hide the Operation field', 'usces' ); ?><span class="dashicons dashicons-arrow-up"></span>'); |
| 1602 |
$("#searchBox").show(); |
| 1603 |
}else if ($.cookie("orderSearchBox") == false){ |
| 1604 |
$("#searchVisiLink").html('<?php esc_html_e( 'Show the Operation field', 'usces' ); ?><span class="dashicons dashicons-arrow-down"></span>'); |
| 1605 |
$("#searchBox").hide(); |
| 1606 |
} |
| 1607 |
|
| 1608 |
$("#dlProductListDialog").dialog({ |
| 1609 |
bgiframe: true, |
| 1610 |
autoOpen: false, |
| 1611 |
height: 700, |
| 1612 |
width: 820, |
| 1613 |
resizable: true, |
| 1614 |
modal: true, |
| 1615 |
buttons: { |
| 1616 |
'<?php esc_html_e( 'close', 'usces' ); ?>': function() { |
| 1617 |
$(this).dialog('close'); |
| 1618 |
} |
| 1619 |
}, |
| 1620 |
close: function() { |
| 1621 |
} |
| 1622 |
}); |
| 1623 |
$('#dl_pro').click(function() { |
| 1624 |
var listcheck = []; |
| 1625 |
$("input[name='listcheck[]']:checked").each(function() { |
| 1626 |
listcheck.push($(this).val()); |
| 1627 |
}); |
| 1628 |
|
| 1629 |
var form = $('<form>', { |
| 1630 |
action: "<?php echo esc_url( USCES_ADMIN_URL ); ?>?page=usces_orderlist&order_action=dlproductnewlist&noheader=true", |
| 1631 |
method: 'post' |
| 1632 |
}); |
| 1633 |
form.append($('<input>', { type: 'hidden', name: 'ftype', value: 'csv' })); |
| 1634 |
form.append($('<input>', { type: 'hidden', name: 'returnList', value: '1' })); |
| 1635 |
form.append($('<input>', { type: 'hidden', name: 'wc_nonce', value: $("#wc_nonce").val() })); |
| 1636 |
|
| 1637 |
$(".check_pro").each(function() { |
| 1638 |
if($(this).prop('checked')) { |
| 1639 |
form.append($('<input>', { type: 'hidden', name: 'check['+$(this).val()+']', value: 'on' })); |
| 1640 |
} |
| 1641 |
}); |
| 1642 |
|
| 1643 |
if (listcheck.length > 0) { |
| 1644 |
form.append($('<input>', { type: 'hidden', name: 'listcheck', value: listcheck.join(',') })); |
| 1645 |
} |
| 1646 |
|
| 1647 |
form.appendTo('body').submit().remove(); |
| 1648 |
}); |
| 1649 |
$('#dl_productlist').click(function() { |
| 1650 |
$('#dlProductListDialog').dialog('open'); |
| 1651 |
}); |
| 1652 |
|
| 1653 |
$("#dlOrderListDialog").dialog({ |
| 1654 |
bgiframe: true, |
| 1655 |
autoOpen: false, |
| 1656 |
height: 600, |
| 1657 |
width: 820, |
| 1658 |
resizable: true, |
| 1659 |
modal: true, |
| 1660 |
buttons: { |
| 1661 |
'<?php esc_html_e( 'close', 'usces' ); ?>': function() { |
| 1662 |
$(this).dialog('close'); |
| 1663 |
} |
| 1664 |
}, |
| 1665 |
close: function() { |
| 1666 |
} |
| 1667 |
}); |
| 1668 |
$('#dl_ord').click(function() { |
| 1669 |
var listcheck = []; |
| 1670 |
$("input[name='listcheck[]']:checked").each(function() { |
| 1671 |
listcheck.push($(this).val()); |
| 1672 |
}); |
| 1673 |
|
| 1674 |
var form = $('<form>', { |
| 1675 |
action: "<?php echo esc_url( USCES_ADMIN_URL ); ?>?page=usces_orderlist&order_action=dlordernewlist&noheader=true", |
| 1676 |
method: 'post' |
| 1677 |
}); |
| 1678 |
form.append($('<input>', { type: 'hidden', name: 'ftype', value: 'csv' })); |
| 1679 |
form.append($('<input>', { type: 'hidden', name: 'returnList', value: '1' })); |
| 1680 |
form.append($('<input>', { type: 'hidden', name: 'wc_nonce', value: $("#wc_nonce").val() })); |
| 1681 |
|
| 1682 |
$(".check_order").each(function() { |
| 1683 |
if($(this).prop('checked')) { |
| 1684 |
form.append($('<input>', { type: 'hidden', name: 'check['+$(this).val()+']', value: 'on' })); |
| 1685 |
} |
| 1686 |
}); |
| 1687 |
|
| 1688 |
if (listcheck.length > 0) { |
| 1689 |
form.append($('<input>', { type: 'hidden', name: 'listcheck', value: listcheck.join(',') })); |
| 1690 |
} |
| 1691 |
|
| 1692 |
form.appendTo('body').submit().remove(); |
| 1693 |
}); |
| 1694 |
$('#dl_orderlist').click(function() { |
| 1695 |
$('#dlOrderListDialog').dialog('open'); |
| 1696 |
}); |
| 1697 |
|
| 1698 |
<?php if ( isset( $_GET['order_action'] ) && 'settlement_notice' == $_GET['order_action'] ) : ?> |
| 1699 |
$("#searchBox").css( "display","block" ); |
| 1700 |
$("#searchSwitchStatus").val( "ON" ); |
| 1701 |
$("#searchSwitchStatus").css( "display","none" ); |
| 1702 |
$("#settlement_errorlog").trigger( "click" ); |
| 1703 |
<?php endif; ?> |
| 1704 |
<?php if ( defined( 'WCEX_AUTO_DELIVERY' ) && version_compare( WCEX_AUTO_DELIVERY_VERSION, '1.4.0', '>=' ) ) : ?> |
| 1705 |
$(".regular_parent_order").removeClass( "rowSelection_even" ); |
| 1706 |
$(".regular_parent_order").css( "background-color","#e6fe9e" ); |
| 1707 |
<?php endif; ?> |
| 1708 |
<?php do_action( 'usces_action_orderlist_document_ready_js', $DT ); // phpcs:ignore ?> |
| 1709 |
|
| 1710 |
}); |
| 1711 |
|
| 1712 |
function deleteconfirm(order_id){ |
| 1713 |
if(confirm(<?php _e( "'Are you sure of deleting an order number ' + order_id + ' ?'", 'usces' ); // phpcs:ignore ?>)){ |
| 1714 |
return true; |
| 1715 |
}else{ |
| 1716 |
return false; |
| 1717 |
} |
| 1718 |
} |
| 1719 |
</script> |
| 1720 |
|