{#
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.
#}
{% extends 'default_frame.twig' %}
{% set body_class = 'cart_page' %}
{% block main %}
<section class="l-lower-heading">
<h1 class="l-lower-heading__title">{{ 'ショッピングカート'|trans }}</h1>
</section>
<section class="cart">
<div class="inner cart__inner">
<div class="l-breadcrumb">
<ul itemscope itemtype="https://schema.org/BreadcrumbList" class="l-breadcrumb__list">
<li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem" class="l-breadcrumb__item">
<a itemprop="item" href="{{ url('homepage') }}" class="l-breadcrumb__link">
<span class="freight-neo-pro" itemprop="name">TOP</span>
</a>
<meta itemprop="position" content="1" />
</li>
<li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem" class="l-breadcrumb__item">
<a itemprop="item" class="l-breadcrumb__link">
<span class="freight-neo-pro" itemprop="name">カート</span>
</a>
<meta itemprop="position" content="2" />
</li>
</ul>
</div>
<div class="cart__container">
<ul class="ec-progress">
{% set step = 1 %}
<li class="ec-progress__item is-complete">
<div class="ec-progress__number">{{ step }}{% set step = step + 1 %}
</div>
<div class="ec-progress__label">{{ 'カートの<br>商品'|trans|raw }}
</div>
</li>
{% if is_granted('ROLE_USER') == false %}
<li class="ec-progress__item">
<div class="ec-progress__number">{{ step }}{% set step = step + 1 %}
</div>
<div class="ec-progress__label">{{ 'お客様<br>情報'|trans|raw }}
</div>
</li>
{% endif %}
<li class="ec-progress__item">
<div class="ec-progress__number">{{ step }}{% set step = step + 1 %}
</div>
<div class="ec-progress__label">{{ 'ご注文<br>手続き'|trans|raw }}
</div>
</li>
<li class="ec-progress__item">
<div class="ec-progress__number">{{ step }}{% set step = step + 1 %}
</div>
<div class="ec-progress__label">{{ 'ご注文<br>内容確認'|trans|raw }}
</div>
</li>
<li class="ec-progress__item">
<div class="ec-progress__number">{{ step }}{% set step = step + 1 %}
</div>
<div class="ec-progress__label">{{ '完了'|trans }}
</div>
</li>
</ul>
{% 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 %}
<div class="ec-alert-warning">
<div class="ec-alert-warning__icon"><img src="{{ asset('assets/icon/exclamation.svg') }}"></div>
<div class="ec-alert-warning__text">
{% if productStr[idx] is defined %}
{{ error|trans({'%product%':productStr[idx]})|nl2br }}
{% else %}
{{ error|trans|nl2br }}
{% endif %}
</div>
</div>
{% endfor %}
{% for error in app.session.flashbag.get('eccube.front.cart.error') %}
<div class="ec-alert-warning">
<div class="ec-alert-warning__icon"><img src="{{ asset('assets/icon/exclamation.svg') }}"></div>
<div class="ec-alert-warning__text">
{{ error|trans|nl2br }}
</div>
</div>
{% endfor %}
{% if totalQuantity > 0 %}
<p class="cart__text">
{{ '商品の合計金額は「%price%」です。'|trans({ '%price%': totalPrice|price })|raw }}
</p>
{% if Carts|length > 1 %}
<div class="ec-alert-warning">
<div class="ec-alert-warning__text">
{{ '同時購入できない商品がカートに含まれています。'|trans|nl2br }}
</div>
</div>
{% endif %}
<form name="form" id="form_cart" class="ec-cartRole" method="post" action="{{ url('cart') }}">
{% for CartIndex,Cart in Carts %}
{% set cartKey = Cart.cart_key %}
{% for error in app.session.flashbag.get('eccube.front.cart.' ~ cartKey ~ '.request.error') %}
<div class="ec-alert-warning">
<div class="ec-alert-warning__icon"><img src="{{ asset('assets/icon/exclamation.svg') }}"></div>
<div class="ec-alert-warning__text">
{{ error|trans|nl2br }}
</div>
</div>
{% endfor %}
<p class="cart__text">
{% if BaseInfo.delivery_free_amount and BaseInfo.delivery_free_quantity %}
{% if is_delivery_free[cartKey] %}
{{ '現在送料無料です。'|trans }}
{% else %}
{{ 'あと「%price%」または「%quantity%個」以上のご購入で送料無料となります。'|trans({ '%price%': least[cartKey]|price, '%quantity%':
quantity[cartKey]|number_format })|raw }}
{% endif %}
{% elseif BaseInfo.delivery_free_amount %}
{% if is_delivery_free[cartKey] %}
{{ '現在送料無料です。'|trans }}
{% else %}
{{ 'あと「%price%」以上のご購入で送料無料となります。'|trans({ '%price%':
least[cartKey]|price })|raw }}
{% endif %}
{% elseif BaseInfo.delivery_free_quantity %}
{% if is_delivery_free[cartKey] %}
{{ '現在送料無料です。'|trans }}
{% else %}
{{ 'あと「%quantity%個」以上のご購入で送料無料となります。'|trans({
'%quantity%':
quantity[cartKey]|number_format })|raw }}
{% endif %}
{% endif %}
</p>
<div class="ec-cartRole__cart">
<div class="ec-cartTable">
<ol class="ec-cartHeader">
<li class="ec-cartHeader__label">{{ '削除'|trans }}</li>
<li class="ec-cartHeader__label">{{ '商品内容'|trans }}</li>
<li class="ec-cartHeader__label">{{ '数量'|trans }}</li>
<li class="ec-cartHeader__label">{{ '小計(税込)'|trans }}</li>
</ol>
{% for CartItem in Cart.CartItems %}
{% set ProductClass = CartItem.ProductClass %}
{% set Product = ProductClass.Product %}
<ul class="ec-cartRow">
<li class="ec-cartRow__delColumn">
<a href="{{ url('cart_handle_item', {'operation': 'remove', 'productClassId': ProductClass.id }) }}" {{
csrf_token_for_anchor() }} class="ec-icon" data-method="put" data-message="カートから商品を削除してもよろしいですか?">
<img src="{{ asset('assets/icon/cross.svg') }}" alt="delete">
</a>
</li>
<li class="ec-cartRow__contentColumn">
<div class="ec-cartRow__img">
<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>
<div class="ec-cartRow__summary">
<div class="ec-cartRow__name">
<a target="_blank" href="{{ url('product_detail', {id : Product.id} ) }}">{{ Product.name }}</a>
{% if ProductClass.ClassCategory1 and ProductClass.ClassCategory1.id %}
<br>{{ ProductClass.ClassCategory1.ClassName.name }}:{{ ProductClass.ClassCategory1 }}
{% endif %}
{% if ProductClass.ClassCategory2 and ProductClass.ClassCategory2.id %}
<br>{{ ProductClass.ClassCategory2.ClassName.name }}:{{ ProductClass.ClassCategory2 }}
{% endif %}
</div>
<div class="ec-cartRow__text">出荷より3~7日以内に到着予定</div>
<div class="ec-cartRow__unitPrice">{{ CartItem.price|price }}</div>
<div class="ec-cartRow__sutbtotalSP">{{ '小計:'|trans }}{{ CartItem.total_price|price }}</div>
</div>
</li>
<li class="ec-cartRow__amountColumn">
<div class="ec-cartRow__amount">{{ CartItem.quantity|number_format }}</div>
<div class="ec-cartRow__amountSP">{{ '数量:'|trans }}{{ CartItem.quantity|number_format }}</div>
<div class="ec-cartRow__amountUpDown">
{% if CartItem.quantity > 1 %}
<a href="{{ url('cart_handle_item', {'operation': 'down', 'productClassId': ProductClass.id}) }}" {{
csrf_token_for_anchor() }} class="ec-cartRow__amountDownButton load-overlay" data-method="put"
data-confirm="false">
<span class="ec-cartRow__amountDownButton__icon"><img src="{{ asset('assets/icon/minus-dark.svg') }}"
alt="reduce"></span>
</a>
{% else %}
<div class="ec-cartRow__amountDownButtonDisabled">
<span class="ec-cartRow__amountDownButton__icon"><img src="{{ asset('assets/icon/minus.svg') }}"
alt="reduce"></span>
</div>
{% endif %}
<a href="{{ url('cart_handle_item', {'operation': 'up', 'productClassId': ProductClass.id}) }}" {{
csrf_token_for_anchor() }} class="ec-cartRow__amountUpButton load-overlay" data-method="put"
data-confirm="false">
<span class="ec-cartRow__amountUpButton__icon"><img src="{{ asset('assets/icon/plus-dark.svg') }}"
alt="increase"></span>
</a>
</div>
</li>
<li class="ec-cartRow__subtotalColumn">
<div class="ec-cartRow__sutbtotal">{{ CartItem.total_price|price }}</div>
</li>
</ul>
{% endfor %}
</div>
<div class="ec-cartRole__actions">
<div class="ec-cartRole__total">{{ '合計:'|trans }}<span class="ec-cartRole__totalAmount">{{ Cart.totalPrice|price
}}</span>
</div>
<a class="ec-blockBtn--action" href="{{ path('cart_buystep', {'cart_key':cartKey}) }}">{{ 'レジに進む'|trans }}</a>
{% if loop.last %}
<a class="ec-blockBtn--cancel" href="{{ path('homepage') }}">{{ 'お買い物を続ける'|trans }}</a>
{% endif %}
</div>
</div>
{% endfor %}
</form>
{% else %}
{% for CartIndex,Cart in Carts %}
{% set cartKey = Cart.cart_key %}
{% for error in app.session.flashbag.get('eccube.front.cart.' ~ cartKey ~ '.request.error') %}
<div class="ec-alert-warning">
<div class="ec-alert-warning__icon"><img src="{{ asset('assets/icon/exclamation.svg') }}"></div>
<div class="ec-alert-warning__text">
{{ error|trans|nl2br }}
</div>
</div>
{% endfor %}
{% endfor %}
<div class="ec-alert-warning">
<div class="ec-alert-warning__icon"><img src="{{ asset('assets/icon/exclamation.svg') }}"></div>
<div class="ec-alert-warning__text">{{ '現在カート内に商品はございません。'|trans }}</div>
</div>
{% endif %}
</div>
</div>
</section>
<!-- /.cart -->
{% endblock %}