{#
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 %}
<div class="ec-role container">
<div class="ec-pageHeader">
<h1>現在カゴの中
{% if totalQuantity > 0 %}
<a href="{{ url('homepage') }}" class="medium-link continue-shopping">
お買い物を続ける
<i class="fa fa-chevron-right">
</i>
</a>
{% endif %}
</h1>
</div>
</div>
{% if is_granted('ROLE_USER') %}
{# 会員ランク表示↓ #}
{% set CustomerRank = null %}
{% if app.user.CustomerRank.id is defined %}
{% set CustomerRankId = app.user.CustomerRank.id %}
{% if CustomerRankId %}
{% set CustomerRank = repository('Plugin\\CustomerRank42\\Entity\\CustomerRank').find(CustomerRankId) %}
{% endif %}
{% endif %}
{% if CustomerRank %}
<div class="customer-rank text-center" id="customer-rank-info">
<p style="line-height:30px;">ランク:<span class="{{ CustomerRank.name }}-img"><span class="rank-text {{ CustomerRank.name }}">{{ CustomerRank.name }}</span></span></p>
<p>ポイントレート:<span class="point-rate">{{ BaseInfo.basic_point_rate+CustomerRank.point_rate|number_format }}%</span></p>
</div>
{% else %}
<div class="customer-rank text-center">
<p>ランク:なし</p>
</div>
{% endif %}
{# 会員ランク表示↑ #}
{% endif %}
<div class="ec-cartRole container">
{#
<div class="ec-cartRole__progress">
<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">{{ 'カートの商品'|trans }}
</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">{{ 'お客様情報'|trans }}
</div>
</li>
{% endif %}
<li class="ec-progress__item">
<div class="ec-progress__number">{{ step }}{% set step = step + 1 %}
</div>
<div class="ec-progress__label">{{ 'ご注文手続き'|trans }}
</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>
<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>
</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 %}
<div class="ec-cartRole__error">
<div class="ec-alert-warning">
<div class="ec-alert-warning__icon"><img src="{{ asset('assets/icon/exclamation-white.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>
</div>
{% endfor %}
{% for error in app.session.flashbag.get('eccube.front.cart.error') %}
<div class="ec-cartRole__error">
<div class="ec-alert-warning">
<div class="ec-alert-warning__icon"><img src="{{ asset('assets/icon/exclamation-white.svg') }}"></div>
<div class="ec-alert-warning__text">
{{ error|trans|nl2br }}
</div>
</div>
</div>
{% endfor %}
{% if totalQuantity > 0 %}
<div class="plusaddcart">
<div class="plushed">ローションを忘れずに!</div>
<div class="sidebar">
<div class="actions">
<button type="button" class="slider-prev button">
<i class="fa fa-angle-left icon-salient-left-arrow"></i>
</button>
<button type="button" class="slider-next button">
<i class="fa fa-angle-right icon-salient-right-arrow"></i>
</button>
</div>
</div>
<div class="products-grid products-slider flexbox">
{# ローションを忘れずに!へ表示する商品ID #}
{% set ProductIds = [77, 65, 87, 76, 15] %}
{% for ProductId in ProductIds %}
{% set Product = repository('Eccube\\Entity\\Product').find(ProductId) %}
<div class="item">
<a href="{{ url('product_detail', {'id': Product.id}) }}" title="" class="product-image">
<img src="{{ asset(Product.main_list_image|no_image_product, 'save_image') }}" width="135" height="135" alt="{{ Product.name }}">
</a>
<div class="product-ratings">
</div>
<div class="product-info">
<h2 class="product-name">
<a href="{{ url('product_detail', {'id': Product.id}) }}" title="{{ Product.name }}">{{ Product.name }}</a>
</h2>
<div class="price-box">
<span class="price">
{% if Product.hasProductClass %}
{% if Product.getPrice02Min == Product.getPrice02Max %}
{{ Product.getPrice02IncTaxMin|price }}
{% else %}
{{ Product.getPrice02IncTaxMin|price }} ~ {{ Product.getPrice02IncTaxMax|price }}
{% endif %}
{% else %}
{{ Product.getPrice02IncTaxMin|price }}
{% endif %}
<span class="inctax"> (税込)</span></span>
</div>
<div class="actions">
{% if Product.stock_find %}
{% if Product.hasProductClass %}
<a class="button btn-cart learn-more" title="商品詳細" href="{{ url('product_detail', {'id': Product.id}) }}">
<span>
<span>商品詳細</span>
</span>
</a>
{% else %}
<button type="button" title="Add to Cart" class="button btn-cart one-click-add-cart"
data-action="{{ url('product_add_cart', {id:Product.id}) }}"
data-product_id="{{ Product.id }}" data-product_name="{{ Product.name }}" data-product_img="{{ asset(Product.main_list_image|no_image_product, 'save_image') }}"
data-product_class="{{ Product.ProductClasses[0].id }}" data-dialog="false"
data-token="{{ csrf_token('Eccube\\Form\\Type\\AddCartType') }}" id="{{ Product.name }}">
カゴに入れる
</button>
{% endif %}
{% else %}
{% set arrivemail = true %}
{% for ProductTag in Product.ProductTag %}
{% if ProductTag.Tag.id == 99 %}
{% set arrivemail = false %}
{% endif %}
{% endfor %}
{% if arrivemail %}
<button type="button" data-productid="{{ Product.id }}" data-productname="{{ Product.name }}" title="入荷お知らせ" class="button btn-cart add-to-mail">
<span>入荷お知らせ</span>
</button>
{% else %}
<button type="button" title="在庫切れ" class="button btn-cart add-to-cart-out">
<span>在庫切れ</span>
</button>
{% endif %}
{% endif %}
</div>
</div>
</div>
{% endfor %}
</div>
</div>
{#
<div class="ec-cartRole__totalText">
<p>
{{ '商品の合計金額は「<strong>%price%</strong>」です。'|trans({ '%price%': totalPrice|price })|raw }}
</p>
</div>
#}
{% if Carts|length > 1 %}
<div class="ec-cartRole__error">
<div class="ec-alert-warning">
<div class="ec-alert-warning__text">
{{ '同時購入できない商品がカートに含まれています。'|trans|nl2br }}
</div>
</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-cartRole__error">
<div class="ec-alert-warning">
<div class="ec-alert-warning__icon"><img src="{{ asset('assets/icon/exclamation-white.svg') }}"></div>
<div class="ec-alert-warning__text">
{{ error|trans|nl2br }}
</div>
</div>
</div>
{% endfor %}
<div class="ec-cartRole__progress">
{% if BaseInfo.delivery_free_amount and BaseInfo.delivery_free_quantity %}
<br/>
{% if is_delivery_free[cartKey] %}
{{ '現在送料無料です。'|trans }}
{% else %}
{{ 'あと「<strong>%price%</strong>」または「<strong>%quantity%個</strong>」のお買い上げで<strong class="ec-color-red">送料無料</strong>になります。'|trans({ '%price%': least[cartKey]|price, '%quantity%': quantity[cartKey]|number_format })|raw }}
{% endif %}
{% elseif BaseInfo.delivery_free_amount %}
<br/>
{% if is_delivery_free[cartKey] %}
{{ '現在送料無料です。'|trans }}
{% else %}
{{ 'あと「<strong>%price%</strong>」のお買い上げで<strong class="ec-color-red">送料無料</strong>になります。'|trans({ '%price%': least[cartKey]|price })|raw }}
{% endif %}
{% elseif BaseInfo.delivery_free_quantity %}
<br/>
{% if is_delivery_free[cartKey] %}
{{ '現在送料無料です。'|trans }}
{% else %}
{{ 'あと「<strong>%quantity%個</strong>」のお買い上げで<strong class="ec-color-red">送料無料</strong>になります。'|trans({ '%quantity%': quantity[cartKey]|number_format })|raw }}
{% endif %}
{% endif %}
</div>
<table id="shopping-cart-table" class="cart-table data-table">
<colgroup>
<col span="1" style="width: 70px">
<col span="1">
<col span="1">
<col span="1">
<col span="1">
<col span="1">
</colgroup>
<thead>
<tr class="first last">
<th rowspan="1">
<span class="nobr">商品名</span>
</th>
<th rowspan="1" class="cart-info-head"> </th>
<th class="a-center cart-price-head" colspan="1">
<!--<div class="cart-price-placeholder">
-->
<span class="nobr">単価</span>
<!--</div>
-->
</th>
<th rowspan="1" class="a-center qty-hed"><span class="nobr">数量</span></th>
<th class="a-center cart-total-head" colspan="1">
<!--<div class="cart-total-placeholder">
-->
<span class="nobr">小計</span>
<!--</div>
-->
</th>
<th class="a-center" rowspan="1"> </th>
</tr>
</thead>
<tfoot>
<tr class="first last">
<td colspan="50" class="a-right cart-footer-actions last">
<!--Make this button the first responder rather than empty cart -->
<!--
<button type="submit" style="visibility:hidden;" name="update_cart_action" value="update_qty" title="Update Shopping Cart" class="button btn-update">
<span>
<span>Update Shopping Cart</span>
</span>
</button>
<button type="submit" name="update_cart_action" value="update_qty" title="Update Shopping Cart" class="button btn-update">
<span>
<span>Update Shopping Cart</span>
</span>
</button>
-->
</td>
</tr>
</tfoot>
<tbody>
{% set totalPrice = 0 %}
{% for CartItem in Cart.CartItems %}
{% set ProductClass = CartItem.ProductClass %}
{% set Product = ProductClass.Product %}
<tr class="cart_item first last odd">
<td class="product-cart-image">
<a href="{{ url('product_detail', {id : Product.id} ) }}" title="{{ Product.name }}" class="product-image">
<img src="{{ asset(Product.MainListImage|no_image_product, 'save_image') }}" alt="{{ Product.name }}">
</a>
</td>
<td class="product-cart-info">
<h2 class="product-name">
<a href="{{ url('product_detail', {id : Product.id} ) }}">{{ Product.name }}</a>
</h2>
</td>
<td class="product-cart-price" data-rwd-label="Price" data-rwd-tax-label="Excl. Tax">
<span class="cart-price">
<span class="price">{{ ProductClass.price02_inc_tax|price }}</span>
</span>
</td>
<td class="product-cart-qty" data-rwd-label="Qty">
<div id="cart_item_list__quantity" class="item_quantity td">
<div id="cart_item_list__quantity_edit">
<div>
<input type="text" class="qty-item" name="quantity_input" size="2" maxlength="4" value="{{ CartItem.quantity }}">
</div>
<div>
<a id="" class="button qty-item cart_item_list_set_quantity" style="display: none;" data-baseqty="{{ CartItem.quantity }}" href="{{ url('cart_set_quantity', {'productClassId': ProductClass.id, 'quantity': '0'}) }}" {{ csrf_token_for_anchor() }} data-method="put" data-confirm="false">再計算</a>
</div>
</div>
</div>
<h2 class="product-name">
<a href="{{ url('product_detail', {id : Product.id} ) }}">{{ Product.name }}</a>
</h2>
</td>
<td class="product-cart-total" data-rwd-label="Subtotal">
<span class="cart-price">
<span class="price">{{ (CartItem.quantity * ProductClass.price02_inc_tax)|price }}</span>
</span>
</td>
<td class="a-center product-cart-remove last">
<a href="{{ url('cart_handle_item', {'operation': 'remove', 'productClassId': ProductClass.id }) }}" {{ csrf_token_for_anchor() }} class="ec-icon btn-remove" data-method="put" data-message="カートから商品を削除してもよろしいですか?">
<i class="fa fa-remove">
</i>
</a>
</td>
</tr>
{% set totalPrice = totalPrice + (CartItem.quantity * ProductClass.price02) %}
{% endfor %}
</tbody>
</table>
<div class="ec-cartRole__actions flexbox">
<!--
<div class="subtotal total"><span class="title">小計</span><span class="price">{{ totalPrice|price }}</span></div>
<div class="subtotal tax"><span class="title">消費税</span><span class="price">{{ (Cart.totalPrice - totalPrice)|price }}</span></div>
-->
<div class="ec-cartRole__total"><span class="title">合計</span><span class="ec-cartRole__totalAmount price">{{ Cart.totalPrice|price }}</span>
{% if Cart.totalPrice >= 3000 %}
<p style="font-size:12px;">
<img src="{{ asset('aneros/img/products/paidy-small.jpg') }}" alt="Paidy" style="vertical-align:middle;display:inline-block;max-width:60px;margin-right:3px;">なら月々<b>{% if ( Cart.totalPrice >= 3000 ) and ( Cart.totalPrice < 6000 ) %}{{ Cart.totalPrice // 3 }}{% elseif ( Cart.totalPrice >= 6000 ) and ( Cart.totalPrice < 12000 ) %}{{ Cart.totalPrice // 6 }}{% elseif Cart.totalPrice >= 12000 %}{{ Cart.totalPrice // 12 }}{% endif %}円</b>から。分割手数料無料 <a href="https://paidy.com/guide/#3pay" target="_blank"><i class="fas fa-info-circle"></i></i></a>
</p>
{% endif %}
</div>
<a class="ec-blockBtn--action button" href="{{ path('cart_buystep', {'cart_key':cartKey}) }}">購入手続きへ</a>
<a class="cart-clear" href="{{ path('cart_clear') }}" {{ csrf_token_for_anchor() }} data-method="put" data-message="カートから商品を削除してもよろしいですか?">カート内を空にする</a>
{% if is_granted('ROLE_USER') %}
<div id="amazon-pay-cart">
<p style="height: 70px;" id="AmazonPayButton{{ cartKey }}"></p>
</div>
{% endif %}
</div>
<script> window.dataLayer = window.dataLayer || []; dataLayer.push({ {% if is_granted('ROLE_USER') %}'mail_address': '{{ Carts[0].Customer.email }}', 'phone_number': '{{ Carts[0].Customer.phone_number }}',{% endif %} 'value': '{{ Cart.totalPrice }}', 'event': 'カート追加' }); </script>
{% 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-cartRole__error">
<div class="ec-alert-warning">
<div class="ec-alert-warning__icon"><img src="{{ asset('assets/icon/exclamation-white.svg') }}"></div>
<div class="ec-alert-warning__text">
{{ error|trans|nl2br }}
</div>
</div>
</div>
{% endfor %}
{% endfor %}
<div class="ec-role">
<div class="ec-alert-warning">
<div class="ec-alert-warning__text">{{ '現在カート内に商品はございません。'|trans }}</div>
<a href="{{ url('homepage') }}" class="medium-link continue-shopping">
お買い物を続ける
<i class="fa fa-chevron-right">
</i>
</a>
</div>
</div>
{% endif %}
</div>
{# カートに入れる #}
<div id="in_to_cart" style="display: none;"><img src="{{ asset('aneros/img/common/loading.gif') }}" alt="" />
<p>カートに入れています</p>
</div>
<div id="in_to_cart_end" style="display: none;">
<a href="javascript: void(0)" onclick="$('#in_to_cart_end #in_to_cart_reload').click();" class="btn-remove">Close</a>
<div id="in_to_cart_msg">
商品がカートに入りました
</div>
<div id="in_to_cart_image">
<img src="" alt="">
</div>
<div id="in_to_cart_name">
</div>
<button id="in_to_cart_reload" class="button" onclick="location.reload();">お買い物を続ける</button>
<a href="{{ url('cart') }}" id="in_to_cart_cart" class="button">購入手続き</a>
</div>
{# 入荷お知らせ登録 #}
<div id="arrivemail-area" style="display: none;">
<div id="arrive-area">
<div id="arrive-title">
入荷お知らせ(入力ページ)
<a class="arrivemail-close" href="javascript:void(0)">X</a>
</div>
<div class="arrive-inbox">
<div id="arrive-sub1">
下記の製品が入荷いたしましたらメールでお知らせいたします。
</div>
</div>
<div class="arrive-inbox">
<div class="arrive-itemname">商品名:</div>
<div class="arrive-item" id="product-name"></div>
</div>
<div class="arrive-inbox" style="margin-bottom:10px;">
<div class="arrive-itemname-comment">メールアドレス</div>
<div class="arrive-item">
<span class="inputholder inputholder1" style="width:262px;background-position:0 -29px;">
<input type="email" name="arrivemail-mail" value="" maxlength="50" class="box350" />
</span>
<span class="attention">※ 正しいメールアドレスを入力してください。</span>
</div>
</div>
<div class="arrive-inbox">
<div style="margin-bottom:10px;margin-right:15px;">
<font color="#FF0000"><small><b>*</b></small></font>商品の入荷をお知らせするメールサービスです。ご予約を行うものではありません。
</div>
</div>
<div class="arrive-inbox">
<div style="margin-bottom:10px;margin-right:15px;">
<font color="#FF0000"><small><b>*</b></small></font>携帯メールの場合はドメイン解除の設定をお願いいたします。
</div>
</div>
<div class="arrive-inbox">
<div style="margin-bottom:10px;margin-right:15px;">
<font color="#FF0000"><small><b>*</b></small></font>お客様の迷惑メールの設定によってメールがお届けできない場合がございます。
</div>
</div>
<div class="arrive-line"></div>
<div class="arrive-submitbtn"><a href="javascript:void(0)" class="button blue-btn" name="conf"
id="arrivemail-submit">登録します</a></div>
</div>
</div>
<div id="arrivemail-area-end" style="display: none;">
<div id="arrive-area">
<div id="arrive-title">入荷お知らせ(完了ページ)
<a class="arrivemail-close" href="javascript:void(0)">X</a>
</div>
<div class="arrive-inbox">
<div id="arrive-sub1">メールアドレスを受付けました。</div>
</div>
<div class="arrive-inbox">
<div class="arrive-itemname">商品名:</div>
<div class="arrive-item" id="product-name"></div>
</div>
<div class="arrive-inbox">
<div class="arrive-itemname-comment">メールアドレス:</div>
<div class="arrive-item" id="send-arrivemail-mail"></div>
</div>
<div class="arrive-inbox">
<div style="margin-bottom:10px;margin-right:15px;">商品が入荷いたしましたらメールでお知らせいたします。</div>
</div>
<div class="arrive-line"></div>
<div class="arrive-submitbtn">
<a href="javascript:void(0)" class="button grey-btn grey-btn-mail" name="conf" id="arrivemail-submit-end">閉じます</a>
</div>
</div>
</div>
<div class="swooth-wrapper grey-swooth">
</div>
{% endblock %}