| 1 |
<?php |
| 2 |
global $usces_entries, $usces_carts; |
| 3 |
usces_get_entries(); |
| 4 |
usces_get_carts(); |
| 5 |
|
| 6 |
$usces_secure_link = get_option('usces_secure_link'); |
| 7 |
$html = ''; |
| 8 |
|
| 9 |
//$html .= usces_delivery_info_script('return'); |
| 10 |
if( $this->use_js ) |
| 11 |
require( USCES_PLUGIN_DIR . "/includes/delivery_info_script.php"); |
| 12 |
|
| 13 |
$html .= '<div id="delivery-info"> |
| 14 |
|
| 15 |
<div class="usccart_navi"> |
| 16 |
<ol class="ucart"> |
| 17 |
<li class="ucart usccart">' . __('1.Cart','usces') . '</li> |
| 18 |
<li class="ucart usccustomer">' . __('2.Customer Info','usces') . '</li> |
| 19 |
<li class="ucart uscdelivery usccart_delivery">' . __('3.Deli. & Pay.','usces') . '</li> |
| 20 |
<li class="ucart uscconfirm">' . __('4.Confirm','usces') . '</li> |
| 21 |
</ol> |
| 22 |
</div>'; |
| 23 |
|
| 24 |
$html .= '<div class="header_explanation">'; |
| 25 |
$header = ''; |
| 26 |
$html .= apply_filters('usces_filter_delivery_page_header', $header); |
| 27 |
$html .= '</div>'; |
| 28 |
|
| 29 |
$html .= '<div class="error_message">' . $this->error_message . '</div>'; |
| 30 |
|
| 31 |
$html .= '<form action="' . USCES_CART_URL . '" method="post">'; |
| 32 |
|
| 33 |
$html .= '<table class="customer_form"> |
| 34 |
<tr> |
| 35 |
<th rowspan="2" scope="row">'.__('shipping address', 'usces').'</th> |
| 36 |
<td><input name="delivery[delivery_flag]" type="radio" id="delivery_flag1" onclick="document.getElementById(\'delivery_table\').style.display = \'none\';" value="0"'; |
| 37 |
if($usces_entries['delivery']['delivery_flag'] == 0) { |
| 38 |
$html .= ' checked'; |
| 39 |
} |
| 40 |
$html .= ' onKeyDown="if (event.keyCode == 13) {return false;}" /> <label for="delivery_flag1">'.__('same as customer information', 'usces').'</label></td> |
| 41 |
</tr> |
| 42 |
<tr> |
| 43 |
<td><input name="delivery[delivery_flag]" id="delivery_flag2" onclick="document.getElementById(\'delivery_table\').style.display = \'table\'" type="radio" value="1"'; |
| 44 |
if($usces_entries['delivery']['delivery_flag'] == 1) { |
| 45 |
$html .= ' checked'; |
| 46 |
} |
| 47 |
$html .= ' onKeyDown="if (event.keyCode == 13) {return false;}" /> <label for="delivery_flag2">'.__('Chose another shipping address.', 'usces').'</label></td> |
| 48 |
</tr> |
| 49 |
</table> |
| 50 |
<table class="customer_form" id="delivery_table">'; |
| 51 |
|
| 52 |
$html .= uesces_addressform( 'delivery', $usces_entries ); |
| 53 |
|
| 54 |
$html .= '</table>'; |
| 55 |
$html .= '<table class="customer_form" id="time">'; |
| 56 |
$cart_delivery_field = '<tr> |
| 57 |
<th scope="row">'.__('shipping option', 'usces').'</th> |
| 58 |
<td colspan="2">' . usces_the_delivery_method( $usces_entries['order']['delivery_method'], 'return' ) . '</td> |
| 59 |
</tr> |
| 60 |
<tr> |
| 61 |
<th scope="row">'.__('Delivery date', 'usces').'</th> |
| 62 |
<td colspan="2">' . usces_the_delivery_date( $usces_entries['order']['delivery_date'], 'return' ) . '</td> |
| 63 |
</tr> |
| 64 |
<tr> |
| 65 |
<th scope="row">'.__('Delivery Time', 'usces').'</th> |
| 66 |
<td colspan="2">' . usces_the_delivery_time( $usces_entries['order']['delivery_time'], 'return' ) . '</td> |
| 67 |
</tr>'; |
| 68 |
$cart_delivery_field .= '<tr> |
| 69 |
<th scope="row"><em>' . __('*', 'usces') . '</em>'.__('payment method', 'usces').'</th> |
| 70 |
<td colspan="2">' . usces_the_payment_method( $usces_entries['order']['payment_name'], 'return' ) . '</td> |
| 71 |
</tr>'; |
| 72 |
$html .= apply_filters( 'usces_filter_cart_delivery_field', $cart_delivery_field, $usces_entries ); |
| 73 |
$html .= '</table>'; |
| 74 |
|
| 75 |
require( USCES_PLUGIN_DIR . "/includes/delivery_secure_form.php"); |
| 76 |
//20100818ysk start |
| 77 |
//20100809ysk start |
| 78 |
//require_once( USCES_PLUGIN_DIR . "/includes/delivery_custom_order_form.php"); |
| 79 |
//$meta = has_custom_order_meta(); |
| 80 |
$meta = usces_has_custom_field_meta('order'); |
| 81 |
if(!empty($meta) and is_array($meta)) { |
| 82 |
$html .= ' |
| 83 |
<table class="customer_form" id="custom_order">'; |
| 84 |
|
| 85 |
$html .= usces_custom_field_input($usces_entries, 'order', '', 'return'); |
| 86 |
|
| 87 |
$html .= ' |
| 88 |
</table>'; |
| 89 |
} |
| 90 |
//20100809ysk end |
| 91 |
//20100818ysk end |
| 92 |
|
| 93 |
$entry_order_note = empty($usces_entries['order']['note']) ? apply_filters('usces_filter_default_order_note', NULL) : $usces_entries['order']['note']; |
| 94 |
$html .= '<table class="customer_form" id="notes_table"> |
| 95 |
<tr> |
| 96 |
<th scope="row">'.__('Notes', 'usces').'</th> |
| 97 |
<td colspan="2"><textarea name="offer[note]" id="note" class="notes">' . esc_html($entry_order_note) . '</textarea></td> |
| 98 |
</tr> |
| 99 |
</table> |
| 100 |
|
| 101 |
<div class="send"><input name="offer[cus_id]" type="hidden" value="" /> |
| 102 |
<input name="backCustomer" type="submit" class="back_to_customer_button" value="'.__('Back', 'usces').'"' . apply_filters('usces_filter_deliveryinfo_prebutton', NULL) . ' /> |
| 103 |
<input name="confirm" type="submit" class="to_confirm_button" value="'.__(' Next ', 'usces').'"' . apply_filters('usces_filter_deliveryinfo_nextbutton', NULL) . ' /></div> |
| 104 |
</form>'; |
| 105 |
|
| 106 |
$html .= '<div class="footer_explanation">'; |
| 107 |
$footer = ''; |
| 108 |
$html .= apply_filters('usces_filter_delivery_page_footer', $footer); |
| 109 |
$html .= '</div>'; |
| 110 |
|
| 111 |
$html .= '</div>'; |
| 112 |
?> |
| 113 |
|