{#
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.
#}
{% if BaseInfo.option_favorite_product %}
<div class="ec-headerNav__item">
<a href="{{ url('mypage_favorite') }}">
<svg xmlns="http://www.w3.org/2000/svg" width="21.5" height="20.6" viewBox="0 0 21.5 20.6"><path d="M4.6 20.6c-.1 0-.2 0-.3-.1-.2-.1-.2-.3-.2-.5l1-6.8-5-4.7c-.1-.1-.1-.3-.1-.5.1-.2.2-.3.4-.3l6.8-1.1 2.9-6.2c.1-.3.3-.4.5-.4s.4.1.5.3l3.2 6.1 6.7.9c.2 0 .3.2.4.3.1.2 0 .4-.1.5l-4.8 4.9 1.3 6.8c0 .2 0 .4-.2.5-.2.1-.4.1-.5 0l-6.2-3.1-6 3.3c-.1.1-.2.1-.3.1zm-3-12.2l4.4 4.3c.1.1.2.3.2.4l-.9 6.1 5.4-3c.1-.1.3-.1.5 0l5.5 2.8-1.1-6c0-.2 0-.3.1-.4l4.3-4.4-6.1-.8c-.2 0-.3-.1-.4-.3l-2.8-5.5-2.7 5.6c-.1.1-.2.2-.4.3l-6 .9z"/></svg>
<span class="header_ico_text">{{ 'お気に入り'|trans }}</span>
</a>
</div>
{% endif %}
{% set Carts = get_all_carts() %}
{% set totalPrice = get_carts_total_price() %}
<div class="ec-cartNaviWrap">
<div class="ec-cartNavi head_cartNavi">
<svg xmlns="http://www.w3.org/2000/svg" width="21.5" height="20.6" viewBox="0 0 21.5 20.6"><path d="M18.4 16.7h-10.8c-.2 0-.5-.2-.5-.4l-2.5-14.5h-3.1c-.3 0-.5-.3-.5-.5s.2-.5.5-.5h3.6c.2 0 .5.2.5.4l2.4 14.5h10.4c.3 0 .5.2.5.5s-.2.5-.5.5zm.5-3.3h-11.9c-.3 0-.5-.2-.5-.5s.2-.5.5-.5h11.5l1.3-7.6h-14.2c-.3 0-.5-.2-.5-.5s.2-.5.5-.5h14.8c.1 0 .3.1.4.2.1.1.1.3.1.4l-1.5 8.6c0 .2-.2.4-.5.4zm.8-4.3h-13.4c-.3 0-.5-.2-.5-.5s.2-.5.5-.5h13.4c.3 0 .5.2.5.5s-.3.5-.5.5zm-4.4 4.3c-.3 0-.5-.2-.5-.5v-8.6c0-.3.2-.5.5-.5s.5.2.5.5v8.6c0 .3-.2.5-.5.5zm-4.7 0c-.3 0-.5-.2-.5-.5v-8.6c0-.3.2-.5.5-.5s.5.2.5.5v8.6c0 .3-.2.5-.5.5zm-2.2 7c-.6 0-1-.5-1-1s.5-1 1-1 1 .5 1 1-.4 1-1 1zm0-1zm9 1c-.6 0-1-.5-1-1s.5-1 1-1 1 .5 1 1-.5 1-1 1zm0-1z"/></svg>
<span class="header_ico_text">カート</span>
{% set totalQuantity = get_carts_total_quantity() %}
<span class="ec-cartNavi__badge" id="head_cartNavi_badge">{{ totalQuantity|number_format }}</span>
</div>
{% if totalQuantity > 0 %}
<div class="ec-cartNaviIsset">
<div class="ec-cartNaviIsset_inner">
{% for Cart in Carts %}
{% for CartItem in Cart.CartItems %}
{% set ProductClass = CartItem.ProductClass %}
{% set Product = ProductClass.Product %}
<div class="ec-cartNaviIsset__cart">
<div class="ec-cartNaviIsset__cartImage">
<img src="{{ asset(Product.MainListImage|no_image_product, 'save_image') }}" alt="{{ Product.name }}">
</div>
<div class="ec-cartNaviIsset__cartContent">
<div class="ec-cartNaviIsset__cartContentTitle item_name">{{ Product.name }}
<div class="ec-font-size-1">
{% 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 %}
</div>
</div>
<div class="ec-cartNaviIsset__cartContentPrice customer_rank_price_default mb0">
{{ CartItem.price|price }}
<div class="ec-cartNaviIsset__cartContentTax ec-price__tax f11">{{ '税込'|trans }}</div>
</div>
<div class="ec-cartNaviIsset__cartContentNumber">{{ '数量'|trans }} {{ CartItem.quantity|number_format }}</div>
<div class="cartNaviIsset_del">
<a href="{{ url('cart_handle_item', {'operation': 'remove', 'productClassId': ProductClass.id }) }}" {{ csrf_token_for_anchor() }} class="ec-inlineBtn" data-method="put" data-message="カートから商品を削除してもよろしいですか?">
×削除
</a>
</div>
</div>
</div>
{% endfor %}
{% endfor %}
</div>
<div class="ec-cartNavi__label">
<div class="ec-cartNavi__price fw fs_ml text-center mt01 mb01">合計:<span class="red">{{ totalPrice|price }}</span></div>
</div>
<div class="ec-cartNaviIsset__action">
<a class="ec-blockBtn--action" href="{{ url('cart') }}">{{ 'カートへ進む'|trans }}</a>
<a class="ec-blockBtn ec-cartNavi--cancel">{{ 'キャンセル'|trans }}</a>
</div>
</div>
{% else %}
<div class="ec-cartNaviNull">
<div class="ec-cartNaviNull__message">
<p>現在カート内に<span class="ib">商品はございません</span></p>
<a class="ec-blockBtn ec-cartNavi--cancel mt01">{{ 'キャンセル'|trans }}</a>
</div>
</div>
{% endif %}
</div>