| 1 |
<?php |
| 2 |
/** |
| 3 |
* Customer info page template |
| 4 |
* |
| 5 |
* @package Welcart |
| 6 |
*/ |
| 7 |
|
| 8 |
$usces_entries = $this->cart->get_entry(); |
| 9 |
global $member_regmode; |
| 10 |
$member_regmode = isset( $_SESSION['usces_entry']['member_regmode'] ) ? $_SESSION['usces_entry']['member_regmode'] : 'none'; |
| 11 |
|
| 12 |
$html = '<div id="customer-info"> |
| 13 |
|
| 14 |
<div class="usccart_navi"> |
| 15 |
<ol class="ucart"> |
| 16 |
<li class="ucart usccart">' . esc_html__( '1.Cart', 'usces' ) . '</li> |
| 17 |
<li class="ucart usccustomer usccart_customer">' . esc_html__( '2.Customer Info', 'usces' ) . '</li> |
| 18 |
<li class="ucart uscdelivery">' . esc_html__( '3.Deli. & Pay.', 'usces' ) . '</li> |
| 19 |
<li class="ucart uscconfirm">' . esc_html__( '4.Confirm', 'usces' ) . '</li> |
| 20 |
</ol> |
| 21 |
</div>'; |
| 22 |
|
| 23 |
$html .= '<div class="header_explanation">'; |
| 24 |
$header = ''; |
| 25 |
$html .= apply_filters( 'usces_filter_customer_page_header', $header ); |
| 26 |
$html .= '</div>'; |
| 27 |
|
| 28 |
$html .= '<div class="error_message">' . $this->error_message . '</div>'; |
| 29 |
|
| 30 |
if ( usces_is_membersystem_state() ) { |
| 31 |
if ( ! wel_have_ex_order() ) { |
| 32 |
$html .= '<h5>' . esc_html__( 'The member please enter at here.', 'usces' ) . '</h5>'; |
| 33 |
} |
| 34 |
$html .= '<form action="' . esc_url( USCES_CART_URL ) . '" method="post" name="customer_loginform" onKeyDown="if (event.keyCode == 13) {return false;}"> |
| 35 |
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="customer_form"> |
| 36 |
<tr> |
| 37 |
<th scope="row">' . esc_html__( 'e-mail adress', 'usces' ) . '</th> |
| 38 |
<td><input name="loginmail" id="loginmail" type="text" value="' . esc_attr( $usces_entries['customer']['mailaddress1'] ) . '" /></td> |
| 39 |
</tr> |
| 40 |
<tr> |
| 41 |
<th scope="row">' . esc_html__( 'password', 'usces' ) . '</th> |
| 42 |
<td><input name="loginpass" id="loginpass" type="password" value="" autocomplete="new-password" /></td> |
| 43 |
</tr> |
| 44 |
</table>'; |
| 45 |
$html .= '<p id="nav"><a class="lostpassword" href="' . usces_url( 'lostmemberpassword', 'return' ) . '">' . esc_html__( 'Did you forget your password?', 'usces' ) . '</a></p>'; |
| 46 |
if ( wel_have_ex_order() ) { |
| 47 |
$html .= '<p id="nav"><a class="newmember" href="' . usces_url( 'newmember', 'return' ) . '&dlseller_transition=newmember">' . esc_html__( 'New enrollment for membership.', 'usces' ) . '</a></p>'; |
| 48 |
} |
| 49 |
$html .= '<div class="send"><input name="customerlogin" type="submit" value="' . esc_html__( ' Next ', 'usces' ) . '" /></div>'; |
| 50 |
$html = apply_filters( 'usces_filter_customer_page_member_inform', $html, $usces_entries ); |
| 51 |
|
| 52 |
$noncekey = 'post_member' . $this->get_uscesid( false ); |
| 53 |
$html .= wp_nonce_field( $noncekey, 'wel_nonce', true, false ); |
| 54 |
$html .= '</form>'; |
| 55 |
} |
| 56 |
|
| 57 |
if ( ! wel_have_ex_order() ) { |
| 58 |
if ( usces_is_membersystem_state() ) { |
| 59 |
$html .= '<h5>' . esc_html__( 'The nonmember please enter at here.', 'usces' ) . '</h5>'; |
| 60 |
} |
| 61 |
$html .= '<form action="' . esc_url( USCES_CART_URL ) . '" method="post" name="customer_form" onKeyDown="if (event.keyCode == 13) {return false;}"> |
| 62 |
<table border="0" cellpadding="0" cellspacing="0" class="customer_form"> |
| 63 |
<tr> |
| 64 |
<th scope="row"><em>' . esc_html__( '*', 'usces' ) . '</em>' . esc_html__( 'e-mail adress', 'usces' ) . '</th> |
| 65 |
<td colspan="2"><input name="customer[mailaddress1]" id="mailaddress1" type="text" value="' . esc_attr( $usces_entries['customer']['mailaddress1'] ) . '" /></td> |
| 66 |
</tr> |
| 67 |
<tr> |
| 68 |
<th scope="row"><em>' . esc_html__( '*', 'usces' ) . '</em>' . esc_html__( 'e-mail adress', 'usces' ) . '(' . esc_html__( 'Re-input', 'usces' ) . ')</th> |
| 69 |
<td colspan="2"><input name="customer[mailaddress2]" id="mailaddress2" type="text" value="' . esc_attr( $usces_entries['customer']['mailaddress2'] ) . '" /></td> |
| 70 |
</tr>'; |
| 71 |
if ( usces_is_membersystem_state() ) { |
| 72 |
$html .= '<tr><th scope="row">'; |
| 73 |
if ( 'editmemberfromcart' === $member_regmode ) { |
| 74 |
$html .= '<em>' . esc_html__( '*', 'usces' ) . '</em>'; |
| 75 |
} |
| 76 |
$html .= esc_html__( 'password', 'usces' ) . '</th> |
| 77 |
<td colspan="2"><input name="customer[password1]" style="width:100px" type="password" value="' . esc_attr( $usces_entries['customer']['password1'] ) . '" autocomplete="new-password" />'; |
| 78 |
if ( 'editmemberfromcart' !== $member_regmode ) { |
| 79 |
$html .= esc_html__( 'When you enroll newly, please fill it out.', 'usces' ); |
| 80 |
} |
| 81 |
$html .= '</td></tr>'; |
| 82 |
$html .= '<tr><th scope="row">'; |
| 83 |
if ( 'editmemberfromcart' === $member_regmode ) { |
| 84 |
$html .= '<em>' . esc_html__( '*', 'usces' ) . '</em>'; |
| 85 |
} |
| 86 |
$html .= esc_html__( 'Password (confirm)', 'usces' ) . '</th> |
| 87 |
<td colspan="2"><input name="customer[password2]" style="width:100px" type="password" value="' . esc_attr( $usces_entries['customer']['password2'] ) . '" autocomplete="new-password" />'; |
| 88 |
if ( 'editmemberfromcart' !== $member_regmode ) { |
| 89 |
$html .= esc_html__( 'When you enroll newly, please fill it out.', 'usces' ); |
| 90 |
} |
| 91 |
$html .= '</td></tr>'; |
| 92 |
} |
| 93 |
|
| 94 |
$html .= uesces_addressform( 'customer', $usces_entries ); |
| 95 |
|
| 96 |
$html .= '</table> |
| 97 |
<input name="member_regmode" type="hidden" value="' . $member_regmode . '" /> |
| 98 |
<input name="member_id" type="hidden" value="' . usces_memberinfo( 'ID', 'return' ) . '" /> |
| 99 |
<div class="send">'; |
| 100 |
$html .= usces_get_customer_button( 'return' ); |
| 101 |
$html .= '</div>'; |
| 102 |
$html .= usces_agree_member_field( 'return' ); |
| 103 |
$noncekey = 'post_member' . $this->get_uscesid( false ); |
| 104 |
$html .= wp_nonce_field( $noncekey, 'wc_nonce', true, false ); |
| 105 |
$html .= apply_filters( 'usces_filter_customer_inform', null ); |
| 106 |
$html .= '</form>'; |
| 107 |
} |
| 108 |
$html .= '<div class="footer_explanation">'; |
| 109 |
$footer = ''; |
| 110 |
$html .= apply_filters( 'usces_filter_customer_page_footer', $footer ); |
| 111 |
$html .= '</div>'; |
| 112 |
$html .= '</div>'; |
| 113 |
|