| 1 |
<?php |
| 2 |
/** |
| 3 |
* Cart page template |
| 4 |
* |
| 5 |
* @package Welcart |
| 6 |
*/ |
| 7 |
|
| 8 |
global $usces_gp; |
| 9 |
|
| 10 |
$html = '<div id="inside-cart"> |
| 11 |
|
| 12 |
<div class="usccart_navi"> |
| 13 |
<ol class="ucart"> |
| 14 |
<li class="ucart usccart usccart_cart">' . esc_html__( '1.Cart', 'usces' ) . '</li> |
| 15 |
<li class="ucart usccustomer">' . esc_html__( '2.Customer Info', 'usces' ) . '</li> |
| 16 |
<li class="ucart uscdelivery">' . esc_html__( '3.Deli. & Pay.', 'usces' ) . '</li> |
| 17 |
<li class="ucart uscconfirm">' . esc_html__( '4.Confirm', 'usces' ) . '</li> |
| 18 |
</ol> |
| 19 |
</div>'; |
| 20 |
|
| 21 |
$html .= '<div class="header_explanation">'; |
| 22 |
$header = ''; |
| 23 |
$html .= apply_filters( 'usces_filter_cart_page_header', $header ); |
| 24 |
$html .= '</div>'; |
| 25 |
|
| 26 |
$html .= '<div class="error_message">' . $this->error_message . '</div> |
| 27 |
|
| 28 |
<form action="' . esc_url( USCES_CART_URL ) . '" method="post" onKeyDown="if (event.keyCode == 13) {return false;}">'; |
| 29 |
|
| 30 |
if ( usces_is_cart() ) { |
| 31 |
|
| 32 |
$html .= '<div id="cart">'; |
| 33 |
|
| 34 |
$button = '<div class="upbutton">' . esc_html__( 'Press the `update` button when you change the amount of items.', 'usces' ) . '<input name="upButton" type="submit" value="' . esc_html__( 'Quantity renewal', 'usces' ) . '" onclick="return uscesCart.upCart()" /></div>'; |
| 35 |
$html .= apply_filters( 'usces_filter_cart_upbutton', $button ); |
| 36 |
|
| 37 |
$cart_table_head = '<table cellspacing="0" id="cart_table"> |
| 38 |
<thead> |
| 39 |
<tr> |
| 40 |
<th scope="row" class="num">No.</th> |
| 41 |
<th class="thumbnail"> </th> |
| 42 |
<th class="productname">' . esc_html__( 'item name', 'usces' ) . '</th> |
| 43 |
<th class="unitprice">' . esc_html__( 'Unit price', 'usces' ) . '</th> |
| 44 |
<th class="quantity">' . esc_html__( 'Quantity', 'usces' ) . '</th> |
| 45 |
<th class="subtotal">' . esc_html__( 'Amount', 'usces' ) . usces_guid_tax( 'return' ) . '</th> |
| 46 |
<th class="stock">' . esc_html__( 'stock status', 'usces' ) . '</th> |
| 47 |
<th class="action"> </th> |
| 48 |
</tr> |
| 49 |
</thead> |
| 50 |
<tbody>'; |
| 51 |
$html .= apply_filters( 'usces_filter_cart_table_head', $cart_table_head ); |
| 52 |
|
| 53 |
$html .= usces_get_cart_rows( 'return' ); |
| 54 |
|
| 55 |
$cart_table_footer = '</tbody> |
| 56 |
<tfoot> |
| 57 |
<tr> |
| 58 |
<th class="num"> </th> |
| 59 |
<th class="thumbnail"> </th> |
| 60 |
<th colspan="3" scope="row" class="aright">' . esc_html__( 'total items', 'usces' ) . usces_guid_tax( 'return' ) . '</th> |
| 61 |
<th class="aright subtotal">' . usces_crform( $this->get_total_price(), true, false, 'return' ) . '</th> |
| 62 |
<th class="stock"> </th> |
| 63 |
<th class="action"> </th> |
| 64 |
</tr> |
| 65 |
</tfoot> |
| 66 |
</table>'; |
| 67 |
$html .= apply_filters( 'usces_filter_cart_table_footer', $cart_table_footer ); |
| 68 |
|
| 69 |
$after_table = '<div class="currency_code">' . esc_html__( 'Currency', 'usces' ) . ' : ' . __( usces_crcode( 'return' ), 'usces' ) . '</div>'; |
| 70 |
$html .= apply_filters( 'usces_filter_after_cart_table', $after_table ); |
| 71 |
|
| 72 |
if ( isset( $usces_gp ) && $usces_gp ) { |
| 73 |
$gp_src = file_exists( get_template_directory() . '/images/gp.gif' ) ? get_template_directory_uri() . '/images/gp.gif' : USCES_PLUGIN_URL . '/images/gp.gif'; |
| 74 |
$business_pack_discount = '<div class="gp_exp"><img src="' . $gp_src . '" alt="' . esc_html__( 'Business package discount', 'usces' ) . '" /><br />' . esc_html__( 'The price with this mark applys to Business pack discount.', 'usces' ) . '</div>'; |
| 75 |
$html .= apply_filters( 'usces_filter_itemGpExp_cart_message', $business_pack_discount ); |
| 76 |
} |
| 77 |
$html .= '</div><!-- end of cart -->'; |
| 78 |
|
| 79 |
} else { |
| 80 |
$html .= '<div class="no_cart">' . esc_html__( 'There are no items in your cart.', 'usces' ) . '</div>'; |
| 81 |
} |
| 82 |
|
| 83 |
$html .= '<div class="send">'; |
| 84 |
$html .= usces_get_cart_button( 'return' ); |
| 85 |
$html .= '</div>'; |
| 86 |
$html = apply_filters( 'usces_filter_cart_inform', $html ); |
| 87 |
$html .= '</form>'; |
| 88 |
|
| 89 |
$html .= '<div class="footer_explanation">'; |
| 90 |
$footer = ''; |
| 91 |
$html .= apply_filters( 'usces_filter_cart_page_footer', $footer ); |
| 92 |
$html .= '</div>'; |
| 93 |
|
| 94 |
$html .= '</div>'; |
| 95 |
|