{#
This file is part of EC-CUBE
Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
http://www.ec-cube.co.jp/
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
#}
{% set Carts = get_all_carts() %}
{% set totalPrice = get_carts_total_price() %}
{% set totalQuantity = get_carts_total_quantity() %}
<div id="cart_area">
<p class="clearfix cart-trigger">
<a href="#cart">
<svg class="cb cb-shopping-cart">
<use xlink:href="#cb-shopping-cart"/>
</svg>
<span class="badge">{{ totalQuantity|number_format }}</span>
<svg class="cb cb-close">
<use xlink:href="#cb-close"/>
</svg>
</a>
<span class="cart_price pc">合計
<span class="price">
{{ totalPrice|price }}
</span>
</span>
</p>
<div id="cart" class="cart">
<div class="inner">
{% for error in app.session.flashbag.get('eccube.front.cart.error') %}
<div class="message">
<p class="errormsg bg-danger">
<svg class="cb cb-warning"><use xlink:href="#cb-warning" /></svg>{{ error|trans|nl2br }}
</p>
</div>
{% endfor %}
{% for Cart in Carts %}
{% for CartItem in Cart.CartItems %}
{% set ProductClass = CartItem.ProductClass %}
{% set Product = ProductClass.Product %}
<div class="item_box clearfix">
<div class="item_photo"><img
src="{{ image_save_urlpath }}/{{ Product.MainListImage|no_image_product }}"
alt="{{ Product.name }}"></div>
<dl class="item_detail">
<dt class="item_name">{{ Product.name }}</dt>
<dd class="item_pattern small">
{% if ProductClass.ClassCategory1 and ProductClass.ClassCategory1.id %}
{{ ProductClass.ClassCategory1.ClassName.name }}:{{ ProductClass.ClassCategory1 }}
{% endif %}
{% if ProductClass.ClassCategory2 and ProductClass.ClassCategory2.id %}
<br>{{ ProductClass.ClassCategory2.ClassName.name }}:{{ ProductClass.ClassCategory2 }}
{% endif %}
</dd>
<dd class="item_price">{{ CartItem.price|price }}<span class="small hide">税込</span></dd>
<dd class="item_quantity form-group form-inline">数量:{{ CartItem.quantity|number_format }}</dd>
</dl>
</div><!--/item_box-->
<p class="cart_price sp">合計 <span class="price">{{ totalPrice|price }}</span></p>
{% endfor %}
{% endfor %}
{% if totalQuantity > 0 %}
<div class="btn_area">
<ul>
<li>
<a href="{{ url('cart') }}" class="btn btn-primary">カートへ進む</a>
</li>
<li>
<button type="button" class="btn btn-default btn-sm cart-trigger">キャンセル</button>
</li>
</ul>
</div>
{% else %}
<div class="btn_area">
<div class="message">
<p class="errormsg bg-danger" style="margin-bottom: 20px;">
現在カート内に<br>商品はございません。
</p>
</div>
</div>
{% endif %}
</div>
</div>
</div>