{% extends '@user_data/layout/default_frame.twig' %}
{% block title %}
カート | オリジナル缶バッジ/カンバッチ製作【個人小ロットから業務用OEMまで激安印刷】ZEAMI Goods
{% endblock %}
{% block css %}
<link href="{{ asset('assets/custom_css/amazon_payment.css') }}" rel="stylesheet" type="text/css" media="screen, projection">
{% endblock %}
{% block js %}
<script>
function removeCartItem(button, id) {
if (window.confirm('本当に削除しますか?')) {
const token = $(button).attr('token-for-anchor');
$.ajax({
url: `/cart_index/${id}/delete`,
method: 'DELETE',
data: {
_token: token
},
success: function (result) {
let parent = button.parentNode;
parent.parentNode.remove();
window.location.reload();
},
error: function (xhr, status, error) {
console.log(error)
}
});
}
}
const WORKING_TIME = {{ working_time|json_encode|raw }};
</script>
<script src="{{ asset('assets/js/holiday_calender.js') }}" type="text/javascript"></script>
<script src="{{ asset('assets/js/home/order_options_cart_index.js') }}" type="text/javascript"></script>
{% endblock %}
{% block content %}
<!-- // ++ パンクズ ++ //////////////////////////////////////////////////////////// // -->
<div id="bread_crumbBloc" class="fades">
<ul id="breadCrumb" class="fades">
<li class="up">
<a href="/"><img src="{{ asset('assets/img/icon_home.png') }}" alt="ホーム"></a>
</li>
<li class="up">カートの中身</li>
</ul>
<!-- ///// #breadCrumb +++++ ///// -->
<!-- ///// +++++ #bread_crumbBloc +++++ ///// -->
</div>
<!-- ▼▼ MAIN CONTENTS __________________________________________________________________________________________________ ▼▼ -->
<main
id="mainContents">
<!-- // == MAIN ================================================================================ // -->
<section
id="Cart" class="section_basic full">
<!-- // ++ ページタイトル ++ /////////////////////////////////////////////////////////////// -->
<div id="section_titleBloc" class="fades">
<h3 class="section_title up">カートの商品</h3>
<!-- ///// #section_titleBloc +++++ ///// -->
</div>
<!-- // ++ カートフロー画像 ++ /////////////////////////////////////////////////////////////// -->
<figure id="cart_flowImage" class="fades"><img src="{{ asset('assets/img/cart/cart-flow01.png') }}"></figure>
<!-- // ++ 納期に関するご注意 ++ /////////////////////////////////////////////////////////////// -->
<aside class="caution_box fades">
<div class="caution_inner">
<h4 class="caution_title up">納期に関するご注意</h4>
<p class="indent up">◯ 納期は全てのデータをアップロードし、データに不備がない時点で確定します。</p>
<!-- ///// .caution_box ***** ///// -->
</div>
</aside>
{% 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 %}
{% for CartIndex,Cart in Carts %}
<!-- // ++ 購入内容 ++ /////////////////////////////////////////////////////////////// -->
<form name="form" id="form_cart" class="ec-cartRole" method="post" action="{{ url('cart') }}">
<div id="cart_tableBox" class="fades">
<table id="cart_indexTable" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<th class="delete">削除</th>
<th class="detail" colspan="3">商品内容</th>
<th class="subtotal">小計</th>
</tr>
<!-- // *** 商品情報 ****************************************************** // -->
{% for CartItem in Cart.CartItems %}
{% set ProductClass = CartItem.ProductClass %}
{% set Product = ProductClass.Product %}
<tr
class="cart_detail">
<!-- ■■ ++ 削除ボタン ++ ■■ -->
<td class="cart_delete">
<button class="btn_delete" onclick="removeCartItem(this, {{ CartItem.id }})" {{ csrf_token_for_anchor() }} type="button"><img src="{{ asset('assets/img/btn_delete.png') }}"></button>
</td>
<!-- /// *** .cart_delete *** /// -->
<!-- ■■ ++ サムネイル ++ ■■ -->
<td class="cart_thumb">
<figure class="item_thumb"><img src="{{ asset(Product.MainListImage|no_image_product, 'save_image') }}"></figure>
</td>
<!-- /// *** .cart_thumb *** /// -->
<!-- ■■ ++ 商品詳細 ++ ■■ -->
<td class="cart_itemdata">
<h5 class="item_name">{{ Product.name }}</h5>
<p>総発注数量<span>{{ CartItem.quantity|number_format }}枚</span>
</p>
{% set n = CartItem.total_day_delivery ?? 0 %}
<p>弊社発送日<span id="delivery_date_{{ CartItem.id }}"></span></p>
<script>
document.addEventListener("DOMContentLoaded", function () {
const deliveryDays = {{ n }};
const formattedDate = formatTimeDelivery(deliveryDays);
document.getElementById("delivery_date_{{ CartItem.id }}").textContent = formattedDate + " 予定";
});
</script>
</td>
<!-- /// *** .cart_itemdata *** /// -->
<!-- ■■ ++ 詳細を見るボタン ++ ■■ -->
<td class="cart_item_detail">
{% if Product.is_sample == false %}
<p class="btn_itemdetail">
<a href="/detail/{{ CartItem.id }}/cart"><img src="{{ asset('assets/img/btn_detail.png') }}" alt="商品詳細を見る"></a>
</p>
{% endif %}
</td>
<!-- /// *** .cart_item_detail *** /// -->
<!-- ■■ ++ 商品価格 ++ ■■ -->
<td class="cart_price">
<p>{{ CartItem.total_price_with_send_data|price }}
<span>(税込)</span>
</p>
</td>
<!-- /// *** .cart_price *** /// -->
<!-- //// .cart_delete **** //// -->
</tr>
{% endfor %}
</tbody>
</table>
<!-- //// ++++ #cart_indexTable ++++ //// -->
<!-- ///// #cart_tableBox +++++ ///// -->
</div>
<!-- // ++ 合計金額 & 購入ボタン ++ /////////////////////////////////////////////////////////////// -->
<div id="index_cart_totalBox">
<p id="totalPrice" class="fades">
<span>合計</span>
{{ Cart.totalPrice|price }}<font>(税込)</font>
</p>
<ul id="cart_btnList" class="fades">
<li class="fades">
<div id="cartBack" class="btn_basic">
<a href="/">お買い物を続ける</a>
</div>
</li>
<li class="fades">
<div id="Checkout" class="btn_basic cart">
<a href="/cart_input">
<span>レジに進む</span>
</a>
</div>
</li>
{% if app.user %}
<li class="fades">
<div class="btn_basic" style="padding-top: 20px;">
<p style="height: 62px;" id="AmazonPayButton{{ Cart.cartKey }}"></p>
</div>
</li>
{% else %}
<li class="fades fadeIn">
<a href="{{ url('cart_login_amazon') }}" class="btn_basic" style="padding-top: 20px;" id="redirect-login-amazon">
<div style="height: 62px; position: relative;" role="button" aria-label="Amazon Pay - Amazon Payテストアカウントをお使いください" title="Amazonアカウントに登録されている情報を利用してお支払い">
<div class="amazonpay-button-container amazonpay-button-enabled amazonpay-button-container-rows">
<div class="amazonpay-button-view1 amazonpay-button-view1-gold" tabindex="0">
<picture class="amazonpay-button-logo"><img src="https://m.media-amazon.com/images/G/09/AmazonPay/Maxo/logo._CB452516594_.svg"></picture>
<picture class="amazonpay-button-sandbox-logo"><img src="https://m.media-amazon.com/images/G/09/AmazonPay/Maxo/sandbox_icon._CB452516595_.svg"></picture>
<picture class="amazonpay-button-chevrons"><img src="https://m.media-amazon.com/images/G/09/AmazonPay/Maxo/AmazonPay_button_chevron._CB1558391205_.svg"></picture>
</div>
<div class="amazonpay-button-view2"></div>
<div class="amazonpay-button-view3">
<picture class="amazonpay-button-microtext"><img src="https://m.media-amazon.com/images/G/09/AmazonPay/Maxo/mt-ja_jp._CB1568869902_.svg"></picture>
</div>
</div>
</div>
</a>
</li>
{% endif %}
</ul>
<!-- //// ++++ #cart_btnList ++++ //// -->
<!-- ///// #index_cart_totalBox +++++ ///// -->
</div>
</form>
{% endfor %}
{% set totalQuantity = get_carts_total_quantity() %}
{% if totalQuantity == 0 %}
<div style="width: 100%;
padding: 10px;
text-align: center;
font-weigth: bold;
color: white;
background: #ff7900;
margin-bottom: 20px;">
<div>
<p>{{ 'front.block.cart.no_item'|trans }}</p>
</div>
</div>
{% endif %}
</section>
<!-- ///// +++++ #Cart +++++ ///// -->
<!-- ///// +++++ #mainContents +++++ ///// -->
</main>
<!-- // ++ パンクズ ++ //////////////////////////////////////////////////////////// // -->
<div id="bread_crumbBloc" class="fades">
<ul id="breadCrumb" class="fades">
<li class="up">
<a href="/"><img src="{{ asset('assets/img/icon_home.png') }}" alt="ホーム"></a>
</li>
<li class="up">カートの中身</li>
</ul>
<!-- ///// #breadCrumb +++++ ///// -->
<!-- ///// +++++ #bread_crumbBloc +++++ ///// -->
</div>
{% endblock %}