{#
This file is part of EC-CUBE
Copyright(c) 2000-2015 LOCKON CO.,LTD. All Rights Reserved.
http://www.lockon.co.jp/
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#}
{% extends 'default_frame.twig' %}
{% set body_class = 'cart_page' %}
{% block main %}
<script>
$(document).ready(function() {
$('#restart').on('click', function(){
$.post( '/reservation_english/html/', 'mode=set_cancel' )
.done(function(data) {
document.write(data);
})
});
})
</script>
<div id="cart" class="container-fluid">
<div id="cart_box" class="row">
<div id="cart_box__body" class="col-md-10 col-md-offset-1">
{% if is_granted('ROLE_USER') %}
<div id="cart_box__flow_state" class="flowline step3">
{% else %}
<div id="cart_box__flow_state" class="flowline step4">
{% endif %}
<ul id="cart_box__flow_state_list" class="clearfix">
<li class="active"><span class="flow_number">1</span><br>CART</li>
{% if is_granted('ROLE_USER') %}
<li><span class="flow_number">2</span><br>YOUR INFORMATION</li>
<li><span class="flow_number">3</span><br>DELIVERY</li>
{% else %}
<li><span class="flow_number">2</span><br>YOUR INFORMATION</li>
<li><span class="flow_number">3</span><br>DELIVERY</li>
<li><span class="flow_number">4</span><br>PAYMENT</li>
{% endif %}
</ul>
</div>
{% set productStr = app.session.flashbag.get('eccube.front.request.product') %}
{% for error in app.session.flashbag.get('eccube.front.request.error') %}
{% set idx = loop.index0 %}
{% if productStr[idx] is defined %}
<div id="cart_box__message--{{ loop.index }}" class="message">
<p class="errormsg bg-danger">
<svg class="cb cb-warning"><use xlink:href="#cb-warning" /></svg>
{{ error|trans({'%product%':productStr[idx]})|nl2br }}
</p>
</div>
{% else %}
<div id="cart_box__message--{{ loop.index }}" class="message">
<p class="errormsg bg-danger">
<svg class="cb cb-warning"><use xlink:href="#cb-warning" /></svg>{{ error|trans|nl2br }}
</p>
</div>
{% endif %}
{% endfor %}
{% for error in app.session.flashbag.get('eccube.front.cart.error') %}
<div id="cart_box__message_error--{{ loop.index }}" class="message">
<p class="errormsg bg-danger">
<svg class="cb cb-warning"><use xlink:href="#cb-warning" /></svg>{{ error|trans|nl2br }}
</p>
</div>
{% endfor %}
{% if totalQuantity > 0 %}
{% for Cart in Carts %}
<form name="form" id="form_cart" method="post" action="{{ url('cart') }}">
<p id="cart_item__info" class="message">
<center><h1><font color="##5CB1B1">▾</font><font color="##5CB1B1">▾</font><font color="##5CB1B1">▾</font>SHOPPING CART<font color="##5CB1B1">▾</font><font color="##5CB1B1">▾</font><font color="##5CB1B1">▾</font></h1></center>
<center><h2>Total price is「<strong>{{ Cart.total_price|price }}</strong>」JPY(inc.tax)</h2></center>
{% if BaseInfo.delivery_free_amount and BaseInfo.delivery_free_quantity %}
<br />
{% if is_delivery_free %}
現在送料無料です。
{% else %}
あと「<strong>{{ least|price }}</strong>」または「<strong>{{ quantity|number_format }}個</strong>」のお買い上げで<strong class="text-primary">送料無料</strong>になります。
{% endif %}
{% elseif BaseInfo.delivery_free_amount %}
<br />
{% if is_delivery_free %}
現在送料無料です。
{% else %}
あと「<strong>{{ least|price }}</strong>」のお買い上げで<strong class="text-primary">送料無料</strong>になります。
{% endif %}
{% elseif BaseInfo.delivery_free_quantity %}
<br />
{% if is_delivery_free %}
現在送料無料です。
{% else %}
あと「<strong>{{ quantity|number_format }}個</strong>」のお買い上げで<strong class="text-primary">送料無料</strong>になります。
{% endif %}
{% endif %}
</p>
<div id="cart_item_list" class="cart_item table">
<div class="thead">
<ol id="cart_item_list__header">
<li id="cart_item_list__header_cart_remove">Del</li>
<li id="cart_item_list__header_product_detail">Contents</li>
<li id="cart_item_list__header_total">QTY</li>
<li id="cart_item_list__header_sub_total">Total</li>
</ol>
</div>
<div id="cart_item_list__body" class="tbody">
{% for CartItem in Cart.CartItems %}
{% set ProductClass = CartItem.productClass %}
{% set Product = ProductClass.Product %}
<div id="cart_item_list__item" class="item_box tr">
<div id="cart_item_list__cart_remove" class="icon_edit td">
<a href="{{ url('cart_remove', {'productClassId': ProductClass.id }) }}" {{ csrf_token_for_anchor() }} data-method="put" data-message="Are you sure you want to remove the item from the shopping cart?">
<svg class="cb cb-close"><use xlink:href="#cb-close" /></svg>
</a>
</div>
<div class="td table">
<div id="cart_item_list__product_image" class="item_photo">
<a target="_blank" href="{{ url('product_detail', {id : Product.id} ) }}">
<img src="{{ asset(Product.MainListImage|no_image_product, 'save_image') }}" alt="{{ Product.name }}" />
</a>
</div>
<dl class="item_detail">
<dt id="cart_item_list__product_detail" class="item_name text-default">
<a target="_blank" href="{{ url('product_detail', {id : Product.id} ) }}">{{ Product.name }}</a>
</dt>
<dd id="cart_item_list__class_category" class="item_pattern small">
{% if ProductClass.ClassCategory1 and ProductClass.ClassCategory1.id %}
{{ ProductClass.ClassCategory1.ClassName }}:{{ ProductClass.ClassCategory1 }}
{% endif %}
{% if ProductClass.ClassCategory2 and ProductClass.ClassCategory2.id %}
<br>{{ ProductClass.ClassCategory2.ClassName }}:{{ ProductClass.ClassCategory2 }}
{% endif %}
</dd>
<dd id="cart_item_list__item_price" class="item_price">JPY{{ CartItem.price|number_format }}</dd>
<dd id="cart_item_list__item_subtotal" class="item_subtotal">小計:JPY{{ CartItem.total_price|number_format }}</dd>
</dl>
</div>
<div id="cart_item_list__quantity" class="item_quantity td">
{{ CartItem.quantity|number_format }}
<ul id="cart_item_list__quantity_edit">
<li>
{% if CartItem.quantity > 1 %}
<a id="cart_item_list__down" href="{{ url('cart_down', {'productClassId': ProductClass.id}) }}" {{ csrf_token_for_anchor() }} data-method="put" data-confirm="false"><svg class="cb cb-minus"><use xlink:href="#cb-minus" /></svg></a>
{% else %}
<span><svg class="cb cb-minus"><use xlink:href="#cb-minus" /></svg></span>
{% endif %}
</li>
<li>
<a id="cart_item_list__up" href="{{ url('cart_up', {'productClassId': ProductClass.id}) }}" {{ csrf_token_for_anchor() }} data-method="put" data-confirm="false"><svg class="cb cb-plus"><use xlink:href="#cb-plus" /></svg></a>
</li>
</ul>
</div>
<div id="cart_item_list__subtotal" class="item_subtotal td">JPY{{ CartItem.total_price|number_format }}</div>
</div><!--/item_box-->
{% endfor %}
</div>
</div><!--/cart_item-->
<div class="total_box">
<dl id="total_box__total_price" class="total_price">
<dt>Total:</dt>
<dd class="text-primary">JPY{{ Cart.total_price|number_format }}</dd>
</dl>
<div id="total_box__user_action_menu" class="btn_group">
<p id="total_box__next_button" >
<a href="{{ path('cart_buystep') }}" class="btn btn-primary btn-block">NEXT</a>
</p>
<p id="total_box__top_button">
<a id="restart" href="/reservation_english/html/index.php" class="btn btn-info btn-block">Restart Order</a>
</p>
</div>
</div>
</form>
{% endfor %}
{% else %}
<div id="cart_box__message" class="message">
<p class="errormsg bg-danger">
<svg class="cb cb-warning"><use xlink:href="#cb-warning" /></svg>Now enpty !
</p>
<p id="total_box__next_button" >
<a href="/reservation_english/html/index.php" class="btn btn-primary btn-block">ORDER TOP</a>
</p>
</div>
{% endif %}
</div><!-- /.col -->
</div><!-- /.row -->
</div>
{% endblock %}