app/template/tanzo/Cart/index.twig line 1

Open in your IDE?
  1. {#
  2. This file is part of EC-CUBE
  3. Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
  4. http://www.ec-cube.co.jp/
  5. For the full copyright and license information, please view the LICENSE
  6. file that was distributed with this source code.
  7. #}
  8. {% extends 'default_frame.twig' %}
  9. {% set body_class = 'cart_page' %}
  10. {% block javascript %}
  11.     <script>
  12.         $(function() {
  13.             var cnt = $('.ec-cartRow').length;
  14.             for (let i = 0; i < cnt; i++){
  15.                 // Get the data-prototype explained earlier
  16.                 var prototype = $('.cartitems').data('prototype');
  17.                 // get the new index
  18.                 var index = $('.cartitems').data('index');
  19.                 // Replace '__name__' in the prototype's HTML to
  20.                 // instead be a number based on how many items we have
  21.                 var newForm = '<div class="mt-3 pb-0 d-flex flex-wrap justify-content-between"><span>オプションを選択してください。</span><span>オプション小計:<span><span class="item_option_price_' + index + '">¥0</span></span><small>(税込)</small></span></div>';
  22.                 newForm += '<div class="mt-2 mb-3 p-3 bg-white cart_option" id="cart_option_' + index + '">';
  23.                 newForm += prototype.replace(/__name__/g, index);
  24.                 newForm += '<div class="d-flex flex-column flex-md-row"><span class="w_120"></span><span>インサイド石は、刻印がある場合は刻印の直後にセッティングさせていただきます。<br>';
  25.                 newForm += '石の位置の変更をご希望の場合は購入手続き画面のお問い合わせ欄にご記入ください。</span></p>';
  26.                 newForm += '</div>';
  27.                 // increase the index with one for the next item
  28.                 $('.cartitems').data('index', index + 1);
  29.                 // Display the form in the page before the "new" link
  30.                 //$(this).before(newForm);
  31.                 var add = ".add_option_" + i;
  32.                 // ID119の商品はオプションを表示しない
  33.                 // 結婚指輪でも婚約指輪でもない場合はオプションを表示しない
  34.                 if ($(add).hasClass('itemid_119') || $(add).hasClass('itemcat_0')) {
  35.                     newForm = '<hr><div class="d-none">' + newForm + '</div>';
  36.                 }
  37.                 
  38.                 $(add).before(newForm);
  39.             }
  40.             
  41.             // 刻印文字数の注意書き追加
  42.             $('input[id$="engraving_text"]').each(function () {
  43.                 $(this).parent().addClass('flex-wrap');
  44.                 $(this).after('<p class="w-100 engraving_text_notice">刻印できる文字数は最大19文字です。</p>')
  45.             });
  46.             
  47.             // 読み込み時 すでに値があったら表示する
  48.             {% for CartIndex,Cart in Carts %}
  49.                 {% for CartItem in Cart.CartItems %}
  50.                     {% if CartItem.engraving == "あり" %}
  51.                         $('input[name="form[data][' + {{ loop.index0 }} + '][engraving]"]').val(["あり"]);
  52.                         $('#form_data_' + {{ loop.index0 }} + ' > div').css('display','flex');
  53.                         $('#form_data_' + {{ loop.index0 }} + ' fieldset:nth-child(2)').css('display','flex');
  54.                     {% endif %}
  55.                     {% if CartItem.engraving_font is not null %}
  56.                         $('input[name="form[data][' + {{ loop.index0 }} + '][engraving_font]"]').val(["{{ CartItem.engraving_font }}"]);
  57.                     {% endif %}
  58.                     {% if CartItem.engraving_text is not null %}
  59.                         $('input[name="form[data][' + {{ loop.index0 }} + '][engraving_text]"]').val("{{ CartItem.engraving_text }}");
  60.                     {% endif %}
  61.                     {% if CartItem.stone != "なし" and CartItem.stone is not null %}
  62.                         $('input[name="form[data][' + {{ loop.index0 }} + '][stone]"]').val(["{{ CartItem.stone }}"]);
  63.                     {% endif %}
  64.                 {% endfor %}
  65.             {% endfor %}
  66.             var cnt = $('.ec-cartRow').length;
  67.             for (let i = 0; i < cnt; i++) {
  68.                 var cart_option = document.getElementById("cart_option_" + i);
  69.                 if (cart_option === null) {
  70.                 } else {
  71.                     if ($('input[name="form[data][' + i + '][engraving]"]:checked').val() == "あり") { // 刻印あり
  72.                         $('#form_data_' + i + ' > div').css('display','flex');
  73.                         $('#form_data_' + i + ' fieldset:nth-child(2)').css('display','flex');
  74.                         if ($('input[name="form[data][' + i + '][engraving_font]"]:checked').val() == null) {
  75.                             $('.action_btn_wrapper').addClass('not_available');
  76.                             go = false;
  77.                         } else if (!$('input[name="form[data][' + i + '][engraving_text]"]').val()) {
  78.                             $('.action_btn_wrapper').addClass('not_available');
  79.                             go = false;
  80.                         }
  81.                     } else if ($('input[name="form[data][' + i + '][engraving]"]:checked').val() == "なし") {
  82.                         $('input[name="form[data][' + i + '][engraving_font]"]:checked').prop('checked', false);
  83.                         $('#form_data_' + i + ' > div').css('display','none');
  84.                         $('#form_data_' + i + ' fieldset:nth-child(2)').css('display','none');
  85.                     }
  86.                 }
  87.             }
  88.             
  89.             checkEngraving();
  90.             calcTotal();
  91.             // cart_key と cart_id をセット
  92.             var cnt = $('.ec-cartRow').length;
  93.             for (let i = 0; i < cnt; i++) {
  94.                 $('input[name="form[data][' + i + '][cart_key]"]').val($('#ck_0').text()); // cartkey は同じカートなら同じ
  95.                 $('input[name="form[data][' + i + '][cart_item_id]"]').val($('#ciid_' + i).text());
  96.             }
  97.             
  98.             $('.form-check-input').on('change', function(event) {
  99.                 checkEngraving();
  100.                 calcTotal();
  101.             });
  102.             $('input[id$="engraving_text"]').on('keyup', function(event) {
  103.                 let count = $(this).val().length;
  104.                 if (count > 19){
  105.                     if (!$(this).parent().prev().hasClass('text_count_message')) {
  106.                         $(this).parent().before('<p class="mb-2 text_count_message text-danger">※刻印は19文字までです</p>');
  107.                         $('.action_btn_wrapper').addClass('not_available');
  108.                     }
  109.                 } else {
  110.                     if ($(this).parent().prev().hasClass('text_count_message')) {
  111.                         $(this).parent().prev('.text_count_message').remove();
  112.                     }
  113.                 }
  114.             });
  115.             $('.form-control').on('change', function(event) {
  116.                 checkEngraving();
  117.             });
  118.             
  119.             function checkEngraving() {
  120.                 var cnt = $('.ec-cartRow').length;
  121.                 var go = true;
  122.                 for (let i = 0; i < cnt; i++) {
  123.                     var cart_option = document.getElementById("cart_option_" + i);
  124.                     if (cart_option === null) {
  125.                     } else {
  126.                         if ($('input[name="form[data][' + i + '][engraving]"]:checked').val() == "あり") { // 刻印あり
  127.                             $('#form_data_' + i + ' > div').css('display','flex');
  128.                             $('#form_data_' + i + ' fieldset:nth-child(2)').css('display','flex');
  129.                             if ($('input[name="form[data][' + i + '][engraving_font]"]:checked').val() == null) {
  130.                                 $('.action_btn_wrapper').addClass('not_available');
  131.                                 go = false;
  132.                             } else if (!$('input[name="form[data][' + i + '][engraving_text]"]').val()) {
  133.                                 $('.action_btn_wrapper').addClass('not_available');
  134.                                 go = false;
  135.                             }
  136.                         } else if ($('input[name="form[data][' + i + '][engraving]"]:checked').val() == "なし") {
  137.                             $('input[name="form[data][' + i + '][engraving_font]"]:checked').prop('checked', false);
  138.                             $('#form_data_' + i + ' > div').css('display','none');
  139.                             $('#form_data_' + i + ' fieldset:nth-child(2)').css('display','none');
  140.                         }
  141.                     }
  142.                 }
  143.                 if (go) {
  144.                     $('.action_btn_wrapper').removeClass('not_available');
  145.                 }
  146.             }
  147.             
  148.             function calcTotal() {
  149.                 var cnt = $('.ec-cartRow').length;
  150.                 var option_total = 0;
  151.                 for (let i = 0; i < cnt; i++) {
  152.                     var item_option_price = 0;
  153.                     var cart_option = document.getElementById("cart_option_" + i);
  154.                     if (cart_option === null) {
  155.                     } else {
  156.                         if ($('input[name="form[data][' + i + '][engraving]"]:checked').val() == "あり") {
  157.                             //item_option_price += 5500;
  158.                         }
  159.                         switch ($('input[name="form[data][' + i + '][engraving_font]"]:checked').val()) {
  160.                             case "有料書体1":
  161.                             case "有料書体2":
  162.                             case "有料書体3":
  163.                             case "有料書体4":
  164.                             case "有料書体5":
  165.                             case "有料書体6":
  166.                             case "有料書体7":
  167.                             case "有料書体8":
  168.                             case "有料書体9":
  169.                             case "有料書体10":
  170.                                 item_option_price += 5500;
  171.                                 break;
  172.                             default:
  173.                         }
  174.                         switch ($('input[name="form[data][' + i + '][stone]"]:checked').val()) {
  175.                             case "なし":
  176.                                 break;
  177.                             default:
  178.                                 // 一律料金?
  179.                                 item_option_price += 5500;
  180.                         }
  181.                     }
  182.                     var item_option_total_price = String(item_option_price).replace(/(\d)(?=(\d\d\d)+(?!\d))/g, '$1,');
  183.                     $('.item_option_price_' + i).text("¥" + item_option_total_price);
  184.                     $('input[name="form[data][' + i + '][option_total_price]"]').val(item_option_price);
  185.                     option_total += item_option_price; 
  186.                 }
  187.                 var option_total_price = String(option_total).replace(/(\d)(?=(\d\d\d)+(?!\d))/g, '$1,');
  188.                 $('#option_total').text("¥" + option_total_price);
  189.                 
  190.                 // 総合計更新
  191.                 var total_price = $('#price_total_tmp').text();
  192.                 total_price = total_price * 1; //number
  193.                 total_price += option_total;
  194.                 var cart_total_price = String(total_price).replace(/(\d)(?=(\d\d\d)+(?!\d))/g, '$1,');
  195.                 $('#cart_total').text("¥" + cart_total_price);
  196.             }
  197.             
  198.             $('.ec-blockBtn--action').on('click', function(event) { 
  199.                 calcTotal();
  200.             });
  201.         });
  202.     </script>
  203. {% endblock %}
  204. {% block main %}
  205.     <div class="ec-role">
  206.         <div class="ec-pageHeader">
  207.             <h1>{{ 'ショッピングカート'|trans }}</h1>
  208.         </div>
  209.     </div>
  210.     <div class="ec-cartRole">
  211.         <div class="ec-cartRole__progress">
  212.             <ul class="ec-progress">
  213.                 {% set step = 1 %}
  214.                 <li class="ec-progress__item is-complete">
  215.                     <div class="ec-progress__number">{{ step }}{% set step = step + 1 %}
  216.                     </div>
  217.                     <div class="ec-progress__label">{{ 'カートの商品'|trans }}
  218.                     </div>
  219.                 </li>
  220.                 {% if is_granted('ROLE_USER') == false %}
  221.                     <li class="ec-progress__item">
  222.                         <div class="ec-progress__number">{{ step }}{% set step = step + 1 %}
  223.                         </div>
  224.                         <div class="ec-progress__label">{{ 'お客様情報'|trans }}
  225.                         </div>
  226.                     </li>
  227.                 {% endif %}
  228.                 <li class="ec-progress__item">
  229.                     <div class="ec-progress__number">{{ step }}{% set step = step + 1 %}
  230.                     </div>
  231.                     <div class="ec-progress__label">{{ 'ご注文手続き'|trans }}
  232.                     </div>
  233.                 </li>
  234.                 <li class="ec-progress__item">
  235.                     <div class="ec-progress__number">{{ step }}{% set step = step + 1 %}
  236.                     </div>
  237.                     <div class="ec-progress__label">{{ 'ご注文内容確認'|trans }}
  238.                     </div>
  239.                 </li>
  240.                 <li class="ec-progress__item">
  241.                     <div class="ec-progress__number">{{ step }}{% set step = step + 1 %}
  242.                     </div>
  243.                     <div class="ec-progress__label">{{ '完了'|trans }}
  244.                     </div>
  245.                 </li>
  246.             </ul>
  247.         </div>
  248.         {% set productStr = app.session.flashbag.get('eccube.front.request.product') %}
  249.         {% for error in app.session.flashbag.get('eccube.front.request.error') %}
  250.             {% set idx = loop.index0 %}
  251.             <div class="ec-cartRole__error">
  252.                 <div class="ec-alert-warning">
  253.                     <div class="ec-alert-warning__icon"><img src="{{ asset('assets/icon/exclamation-white.svg') }}"></div>
  254.                     <div class="ec-alert-warning__text">
  255.                         {% if productStr[idx] is defined %}
  256.                             {{ error|trans({'%product%':productStr[idx]})|nl2br }}
  257.                         {% else %}
  258.                             {{ error|trans|nl2br }}
  259.                         {% endif %}
  260.                     </div>
  261.                 </div>
  262.             </div>
  263.         {% endfor %}
  264.         {% for error in app.session.flashbag.get('eccube.front.cart.error') %}
  265.             <div class="ec-cartRole__error">
  266.                 <div class="ec-alert-warning">
  267.                     <div class="ec-alert-warning__icon"><img src="{{ asset('assets/icon/exclamation-white.svg') }}"></div>
  268.                     <div class="ec-alert-warning__text">
  269.                         {{ error|trans|nl2br }}
  270.                     </div>
  271.                 </div>
  272.             </div>
  273.         {% endfor %}
  274.         {% if totalQuantity > 0 %}
  275.             <!--<div class="ec-cartRole__totalText">
  276.                 <p>
  277.                     {{ '商品の合計金額は「<strong>%price%</strong>」です。'|trans({ '%price%': totalPrice|price })|raw }}
  278.                 </p>
  279.             </div>-->
  280.             {% if Carts|length > 1 %}
  281.                 <div class="ec-cartRole__error">
  282.                     <div class="ec-alert-warning">
  283.                         <div class="ec-alert-warning__text">
  284.                             {{ '同時購入できない商品がカートに含まれています。'|trans|nl2br }}
  285.                         </div>
  286.                     </div>
  287.                 </div>
  288.             {% endif %}
  289.             {#<form name="form" id="form_cart" class="ec-cartRole" method="post" action="{{ url('cart') }}">#}
  290.             <form name="form" id="form_cart" class="ec-cartRole" method="post" action="{{ url('cart_add_option') }}">
  291.                 <div class="cartitems" data-prototype="{{ form_widget(form.data.vars.prototype)|e('html_attr') }}" data-index=0></div>
  292.                         
  293.                 {% for CartIndex,Cart in Carts %}
  294.                     {% set cartKey = Cart.cart_key %}
  295.                     <span id="ck_{{ loop.index0  }}" class="d-none">{{ cartKey }}</span>
  296.                     
  297.                     {% for error in app.session.flashbag.get('eccube.front.cart.' ~ cartKey ~ '.request.error') %}
  298.                         <div class="ec-cartRole__error">
  299.                             <div class="ec-alert-warning">
  300.                                 <div class="ec-alert-warning__icon"><img src="{{ asset('assets/icon/exclamation-white.svg') }}"></div>
  301.                                 <div class="ec-alert-warning__text">
  302.                                     {{ error|trans|nl2br }}
  303.                                 </div>
  304.                             </div>
  305.                         </div>
  306.                     {% endfor %}
  307.                     <div class="ec-cartRole__cart">
  308.                         <!--<div class="ec-cartTable">
  309.                             <ol class="ec-cartHeader">
  310.                                 <li class="ec-cartHeader__label">{{ '削除'|trans }}</li>
  311.                                 <li class="ec-cartHeader__label">{{ '商品内容'|trans }}</li>
  312.                                 <li class="ec-cartHeader__label">{{ '数量'|trans }}</li>
  313.                                 <li class="ec-cartHeader__label">{{ '小計'|trans }}</li>
  314.                             </ol>-->
  315.                         {% set item_cnt = 0 %}
  316.                         {% for CartItem in Cart.CartItems %}
  317.                             <span id="ciid_{{ loop.index0  }}" class="d-none">{{ CartItem.id }}</span>
  318.                             
  319.                             {% set ProductClass = CartItem.ProductClass %}
  320.                             {% set Product = ProductClass.Product %}
  321.                             <div class="ec-cartTable">
  322.                                 {% if loop.index == 1 %}
  323.                                     <ol class="ec-cartHeader">
  324.                                         <li class="ec-cartHeader__label">{{ '削除'|trans }}</li>
  325.                                         <li class="ec-cartHeader__label">{{ '商品内容'|trans }}</li>
  326.                                         <li class="ec-cartHeader__label">{{ '数量'|trans }}</li>
  327.                                         <li class="ec-cartHeader__label">{{ '小計'|trans }}</li>
  328.                                     </ol>
  329.                                 {% endif %}
  330.                                 
  331.                                 <ul class="ec-cartRow cartitem cartitem_{{ item_cnt }}">
  332.                                     <li class="ec-cartRow__delColumn">
  333.                                         {#<a href="{{ url('cart_handle_item', {'operation': 'remove', 'productClassId': ProductClass.id }) }}" {{ csrf_token_for_anchor() }} class="ec-icon" data-method="put" data-message="カートから商品を削除してもよろしいですか?">#}
  334.                                         <a href="{{ url('cart_handle_item', {'operation': 'remove', 'productClassId': CartItem.id }) }}" {{ csrf_token_for_anchor() }} class="ec-icon" data-method="put" data-message="カートから商品を削除してもよろしいですか?">
  335.                                             <img src="{{ asset('assets/icon/cross.svg') }}" alt="delete">
  336.                                         </a>
  337.                                     </li>
  338.                                     <li class="ec-cartRow__contentColumn">
  339.                                         <div class="ec-cartRow__img">
  340.                                             <a target="_blank" href="{{ url('product_detail', {id : Product.id} ) }}">
  341.                                                 <img src="{{ asset(Product.MainListImage|no_image_product, 'save_image') }}" alt="{{ Product.name }}"/>
  342.                                             </a>
  343.                                         </div>
  344.                                         <div class="ec-cartRow__summary">
  345.                                             <div class="ec-cartRow__name">
  346.                                                 <a target="_blank" href="{{ url('product_detail', {id : Product.id} ) }}">{{ Product.name }}</a>
  347.                                                 {% if ProductClass.ClassCategory1 and ProductClass.ClassCategory1.id %}
  348.                                                     {% if Product.id != 119 %}
  349.                                                         <br>{{ ProductClass.ClassCategory1.ClassName.name }}:{{ ProductClass.ClassCategory1 }}
  350.                                                     {% endif %}
  351.                                                 {% endif %}
  352.                                                 {% if ProductClass.ClassCategory2 and ProductClass.ClassCategory2.id %}
  353.                                                     <br>{{ ProductClass.ClassCategory2.ClassName.name }}:{{ ProductClass.ClassCategory2 }}
  354.                                                 {% endif %}
  355.                                                 {% if Product.id != 119 %}
  356.                                                     {% if CartItem.size %}&emsp;サイズ:{{ CartItem.size }}号{% endif %}
  357.                                                 {% endif %}
  358.                                             </div>
  359.                                             <!--<div class="ec-cartRow__unitPrice">{{ CartItem.price|price }}</div>-->
  360.                                             {% set sum =  CartItem.total_price + CartItem.size_price %}
  361.                                             <div class="ec-cartRow__sutbtotalSP">{{ '小計:'|trans }}{{ sum|price }}</div>
  362.                                         </div>
  363.                                     </li>
  364.                                     <li class="ec-cartRow__amountColumn">
  365.                                         <div class="ec-cartRow__amount">{{ CartItem.quantity|number_format }}</div>
  366.                                         <div class="ec-cartRow__amountSP">{{ '数量:'|trans }}{{ CartItem.quantity|number_format }}</div>
  367.                                         <div class="ec-cartRow__amountUpDown">
  368.                                             {#{% if CartItem.quantity > 1 %}
  369.                                                 <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">
  370.                                                     <span class="ec-cartRow__amountDownButton__icon"><img src="{{ asset('assets/icon/minus-dark.svg') }}" alt="reduce"></span>
  371.                                                 </a>
  372.                                             {% else %}
  373.                                                 <div class="ec-cartRow__amountDownButtonDisabled">
  374.                                                     <span class="ec-cartRow__amountDownButton__icon"><img src="{{ asset('assets/icon/minus.svg') }}" alt="reduce"></span>
  375.                                                 </div>
  376.                                             {% endif %}
  377.                                             <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">
  378.                                                 <span class="ec-cartRow__amountUpButton__icon"><img src="{{ asset('assets/icon/plus-dark.svg') }}" alt="increase"></span>
  379.                                             </a>#}
  380.                                         </div>
  381.                                     </li>
  382.                                     <li class="ec-cartRow__subtotalColumn">
  383.                                         <div class="ec-cartRow__sutbtotal">{{ sum|price }}<small>(税込)</small></div>
  384.                                     </li>
  385.                                 </ul>
  386.                             </div>
  387.                             {% set category = 0 %}
  388.                             {% for ProductCategory in Product.ProductCategories %}
  389.                                 {% if ProductCategory.Category.id == 1 %}
  390.                                     {# 結婚指輪 #}
  391.                                     {% set category = 1 %}
  392.                                 {% elseif ProductCategory.Category.id == 2 %}
  393.                                     {# 婚約指輪 #}
  394.                                     {% set category = 2 %}
  395.                                 {% endif %}
  396.                             {% endfor %}
  397.                             <a href="#" class="add_option add_option_{{ item_cnt }} itemid_{{ Product.id }} itemcat_{{ category }} d-none"></a>
  398.                             {% set item_cnt = item_cnt + 1 %}
  399.                         {% endfor %}
  400.                     </div>
  401.                     
  402.                     <div class="ec-cartRole__progress">
  403.                         {% if BaseInfo.delivery_free_amount and BaseInfo.delivery_free_quantity %}
  404.                             <br/>
  405.                             {% if is_delivery_free[cartKey] %}
  406.                                 {{ '現在日本国内は送料無料です。'|trans }}
  407.                             {% else %}
  408.                                 {{ 'あと「<strong>%price%</strong>」または「<strong>%quantity%個</strong>」のお買い上げで<strong class="ec-color-red">送料無料</strong>になります。'|trans({ '%price%': least[cartKey]|price, '%quantity%': quantity[cartKey]|number_format })|raw }}
  409.                             {% endif %}
  410.                         {% elseif BaseInfo.delivery_free_amount %}
  411.                             <br/>
  412.                             {% if is_delivery_free[cartKey] %}
  413.                                 {{ '現在日本国内は送料無料です。'|trans }}
  414.                             {% else %}
  415.                                 {{ 'あと「<strong>%price%</strong>」のお買い上げで<strong class="ec-color-red">送料無料</strong>になります。'|trans({ '%price%': least[cartKey]|price })|raw }}
  416.                             {% endif %}
  417.                         {% elseif BaseInfo.delivery_free_quantity %}
  418.                             <br/>
  419.                             {% if is_delivery_free[cartKey] %}
  420.                                 {{ '現在日本国内は送料無料です。'|trans }}
  421.                             {% else %}
  422.                                 {{ 'あと「<strong>%quantity%個</strong>」のお買い上げで<strong class="ec-color-red">送料無料</strong>になります。'|trans({ '%quantity%': quantity[cartKey]|number_format })|raw }}
  423.                             {% endif %}
  424.                         {% endif %}
  425.                     </div>
  426.                     {# カート合計金額にサイズ割増料金を加算 #}
  427.                     {% set size_price_total = 0 %}
  428.                     {% for CartItem in Cart.CartItems %}
  429.                         {% set size_price_total = size_price_total + CartItem.size_price %}
  430.                     {% endfor %}
  431.                     {% set price_total = Cart.totalPrice + size_price_total %}
  432.                     <span id="price_total_tmp" class="d-none">{{ price_total }}</span>
  433.                     
  434.                     <div class="ec-cartRole__actions">
  435.                         <div>{{ 'オプション計:'|trans }}<span id="option_total">{{ 0|price }}</span><small>(税込)</small></div>
  436.                         <div class="ec-cartRole__total">{{ '合計:'|trans }}<span id="cart_total" class="ec-cartRole__totalAmount">{{ price_total|price }}</span><small>(税込)</small>
  437.                         </div>
  438.                         {#<span class="action_btn_wrapper"><a class="ec-blockBtn--action text-white" href="{{ path('cart_buystep', {'cart_key':cartKey}) }}">{{ 'レジに進む'|trans }}</a></span>#}
  439.                         <span class="action_btn_wrapper"><button class="ec-blockBtn--action text-white">{{ 'レジに進む'|trans }}</button></span>
  440.                         {% if loop.last %}
  441.                             <a class="ec-blockBtn--cancel" href="{{ path('homepage') }}">{{ 'お買い物を続ける'|trans }}</a>
  442.                         {% endif %}
  443.                     </div>
  444.                 {% endfor %}
  445.             </form>
  446.         {% else %}
  447.             {% for CartIndex,Cart in Carts %}
  448.                 {% set cartKey = Cart.cart_key %}
  449.                 {% for error in app.session.flashbag.get('eccube.front.cart.' ~ cartKey ~ '.request.error') %}
  450.                     <div class="ec-cartRole__error">
  451.                         <div class="ec-alert-warning">
  452.                             <div class="ec-alert-warning__icon"><img src="{{ asset('assets/icon/exclamation-white.svg') }}"></div>
  453.                             <div class="ec-alert-warning__text">
  454.                                 {{ error|trans|nl2br }}
  455.                             </div>
  456.                         </div>
  457.                     </div>
  458.                 {% endfor %}
  459.             {% endfor %}
  460.             <div class="ec-role">
  461.                 <div class="ec-off3Grid">
  462.                     <div class="ec-off3Grid__cell">
  463.                         <div class="ec-alert-warning">
  464.                             <div class="ec-alert-warning__icon"><img src="{{ asset('assets/icon/exclamation-white.svg') }}"></div>
  465.                             <div class="ec-alert-warning__text">{{ '現在カート内に商品はございません。'|trans }}</div>
  466.                         </div>
  467.                     </div>
  468.                 </div>
  469.             </div>
  470.         {% endif %}
  471.     </div>
  472. {% endblock %}