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

Open in your IDE?
  1. {# @version  EC=CUBE4.1 TWIG
  2.  # @copyright 株式会社 翔 kakeru.co.jp
  3.  # @author
  4.  # 2022年05月11日作成
  5.  #
  6.  # app/template/default/Cart/index.twig
  7.  #
  8.  # 202210修正
  9.  #
  10.  # カート LM仕様
  11.  # 1 SKUの追加 カラーの変更 サイズの変更 数量の変更 SKUの削除 
  12.  # 
  13.  #
  14.  #                                                  ≡≡≡┏(^o^)┛
  15.  ############################################################# #}
  16. {% extends 'default_frame.twig' %}
  17. {% block stylesheet %}
  18.     <link rel="stylesheet" href="/stylesheets/cart_step.css?20250715_01">
  19.     {% if isMobile %}
  20.         <link rel="stylesheet" href="/stylesheets/sp/shopping/cart_step1.css?20231004">
  21.     {% endif %}
  22. {% endblock %}
  23. {% block javascript %}
  24.     <script>
  25.         var num = 1;
  26.         var count = 0;
  27.         $(function () {
  28.             $('.pc .CartItem_color').each(function (i, e) {
  29.                 ChangeColor(e);
  30.             });
  31.             $(document).on('change', '.pc .CartItem_color', function () {
  32.                 var parentElement = $(this).parent();
  33.                 var sessionKey = parentElement.data('session-key');
  34.                 ChangeColor(this);
  35.                 LoadSizePullDown(this);
  36.                 LineAddAlert(sessionKey);
  37.             });
  38.             $(document).on('change', '.js .CartItem_color', function () {
  39.                 var parentElement = $(this).parent();
  40.                 var sessionKey = parentElement.data('session-key');
  41.                 ChangeColor(this);
  42.                 LoadSizePullDown(this);
  43.                 LineAddAlert(sessionKey);
  44.             });
  45.             $(document).on('change', '.pc .CartItem_size', function () {
  46.                 //
  47.                 var parentElement = $(this).parent();
  48.                 var sessionKey = parentElement.data('session-key');
  49.                 //
  50.                 const size = this;
  51.                 const color = $(size).closest('.cart-row').find('select.CartItem_color').get(0);
  52.                 //
  53.                 LoadStockLabel(color, size);
  54.                 LoadColorPullDown(this);
  55.                 //
  56.                 LineAddAlert(sessionKey);
  57.             });
  58.             $(document).on('change', '.js .CartItem_size', function () {
  59.                 //
  60.                 var parentElement = $(this).parent();
  61.                 var sessionKey = parentElement.data('session-key');
  62.                 //
  63.                 const size = this;
  64.                 const color = $(size).closest('.cart-row').find('select.CartItem_color').get(0);
  65.                 //
  66.                 LoadStockLabel(color, size);
  67.                 //
  68.                 LineAddAlert(sessionKey);
  69.                 LoadColorPullDown(this);
  70.             });
  71.             $(document).on('change', '.pc .CartItem_quantity', function () {
  72.                 var parentElement = $(this).parent();
  73.                 var sessionKey = parentElement.data('session-key');
  74.                 LineAddAlert(sessionKey);
  75.             });
  76.             $(document).on('change', '.js .CartItem_quantity', function () {
  77.                 var parentElement = $(this).parent();
  78.                 var sessionKey = parentElement.data('session-key');
  79.                 LineAddAlert(sessionKey);
  80.             });
  81.             $('.sp .CartItem_quantity').change(function () {
  82.                 ItemSubMit();
  83.             });
  84.             $('.sp .CartItem_size').change(function () {
  85.                 ItemSubMit();
  86.             });
  87.             $('.sp .CartItem_color').change(function () {
  88.                 ItemSubMit();
  89.             }).each(function (i, e) {
  90.                 ChangeColor(e);
  91.             });
  92.         });
  93.         function ChangeColor(colorSelect) {
  94.             var selectedColor = $(colorSelect).find('option:selected').data('rgb');
  95.             $(colorSelect).closest('.color').find('.item_rgb').css('color', selectedColor);
  96.         }
  97.         function LoadSizePullDown(color) {
  98.             //
  99.             const $color = $(color);
  100.             //
  101.             const ItemId = $color.data('itemId');
  102.             const ProductId = $color.data('productId');
  103.             const ClassCategory2Id = $('#CartItem_size_' + ItemId).val();
  104.             const ClassCategory1Id = $color.val();
  105.             const EstimateId = $color.data('estimateId');
  106.             //
  107.             const data = {
  108.                 ItemId,
  109.                 ProductId,
  110.                 ClassCategory2Id,
  111.                 ClassCategory1Id,
  112.                 EstimateId,
  113.             };
  114.             //
  115.             const $size = $('#CartItem_size_' + ItemId)
  116.                 .prop('disabled', true)
  117.                 .load('{{ url('ajax_show-goods-size-list-pull-down-by-color') }}', data, function (responseText) {
  118.                     $(this).prop('disabled', false);
  119.                     //
  120.                     LoadStockLabel(color, this);
  121.                 })
  122.             ;
  123.         }
  124.         function LoadColorPullDown(size) {
  125.             //
  126.             const $size = $(size);
  127.             //
  128.             const ItemId = $size.data('itemId');
  129.             const ProductId = $size.data('productId');
  130.             const ClassCategory1Id = $('#CartItem_color_' + ItemId).val();
  131.             const ClassCategory2Id = $size.val();
  132.             const EstimateId = $size.data('estimateId');
  133.             //
  134.             const data = {
  135.                 ItemId,
  136.                 ProductId,
  137.                 ClassCategory2Id,
  138.                 ClassCategory1Id,
  139.                 EstimateId,
  140.             };
  141.             //
  142.             const $color = $('#CartItem_color_' + ItemId)
  143.                 .prop('disabled', true)
  144.                 .load('{{ url('ajax_show-goods-color-list-pull-down-by-size') }}', data, function (responseText) {
  145.                     $(this).prop('disabled', false);
  146.             });
  147.         }
  148.         function LoadStockLabel(color, size) {
  149.             //
  150.             removeDisableOption();
  151.             const $color = $(color);
  152.             const $size = $(size);
  153.             const ProductId = $color.data('productId');
  154.             const ClassCategory1Id = $color.val();
  155.             const ClassCategory2Id = $size.val();
  156.             //
  157.             const $stockLabel = $color.closest('.cart-row').find('.stock-label');
  158.             const url = $color.parent().data('url') ? $color.parent().data('url') : $color.data('url');
  159.             $.ajax({
  160.                 url: '{{ url('ajax_show-stock-label') }}',
  161.                 method: 'POST',
  162.                 data: {
  163.                     ProductId,
  164.                     ClassCategory1Id,
  165.                     ClassCategory2Id
  166.                 },
  167.                 success: function (response, xhr) {
  168.                     $stockLabel.html(response);
  169.                 },
  170.                 error: function (xhr) {
  171.                     if (xhr.status === 500) {
  172.                         if(url){
  173.                         }
  174.                     }
  175.                 }
  176.             });
  177.             disableOption();
  178.         }
  179.         function disableOption(){
  180.             $(".CartItem_color option").each(function () {
  181.                 if ($(this).data("wasDisabled")) {
  182.                     $(this).prop("disabled", true);
  183.                 }
  184.             });
  185.             $(".CartItem_size option").each(function () {
  186.                 if ($(this).data("wasDisabled")) {
  187.                     $(this).prop("disabled", true);
  188.                 }
  189.             });
  190.         }
  191.         function removeDisableOption(){
  192.             $(".CartItem_color option").each(function () {
  193.                 $(this).data("wasDisabled", $(this).prop("disabled"));
  194.             });
  195.             $(".CartItem_size option").each(function () {
  196.                 $(this).data("wasDisabled", $(this).prop("disabled"));
  197.             });
  198.             $(".CartItem_color option:disabled").prop("disabled", false);
  199.             $(".CartItem_size option:disabled").prop("disabled", false);
  200.         }
  201.         function RemoveItem(id) {
  202.             if (!confirm('{{ 'front.cart_item_remove'|trans }}')) {
  203.                 return false;
  204.             }
  205.             document.getElementById("overlay").style.display = "block";
  206.             window.location.href = '{{ url('remove_cart_item', {'mode': 'item', 'Token': OlToken('RemoveCartItme')}) }}/' + id;
  207.         }
  208.         function RemoveCart(sessionKey) {
  209.             if (!confirm('{{ 'front.cart_item_remove'|trans }}')) {
  210.                 return false;
  211.             }
  212.             location.href = '{{ url("remove_cart_item", { mode: "all" }) }}'
  213.         }
  214.         function AddCartItem(productItemKey) {
  215.             var hiddenCartItem = $('.cart-row[data-line="' + productItemKey + '"]').last();
  216.             var currentCartItem = $('.cart-row[data-line="' + productItemKey + '"]:last').prev();
  217.             var nextIndex = currentCartItem.data('current-index') + 1;
  218.             var estimateId = hiddenCartItem.data('estimate-id');
  219.             var productId = hiddenCartItem.data('product-id');
  220.             var cartItemId = hiddenCartItem.data('cart-item-id');
  221.             var classCategory1Id = hiddenCartItem.data('category1-id');
  222.             var classCategory2Id = hiddenCartItem.data('category2-id');
  223.             var newCartItem = hiddenCartItem.clone()
  224.                 .removeClass('new-cart-item')
  225.                 .data('current-index', nextIndex)
  226.                 .insertBefore(hiddenCartItem)
  227.             ;
  228.             var newError = newCartItem.find('.error')
  229.                 .attr('id', `CartError_${estimateId}-${productId}-${nextIndex}`)
  230.             ;
  231.             var itemSize = newCartItem.find('.CartItem_size')
  232.                 .attr('name', `CartItem[${estimateId}][${estimateId}-${productId}-${nextIndex}][size]`)
  233.                 .attr('id', `CartItem_size_${estimateId}-${productId}-${nextIndex}`)
  234.                 .data('item-id', `${estimateId}-${productId}-${nextIndex}`)
  235.                 .val(currentCartItem.find('.CartItem_size  option:selected').val())
  236.             ;
  237.             var itemColor = newCartItem.find('.CartItem_color')
  238.                 .attr('name', `CartItem[${estimateId}][${estimateId}-${productId}-${nextIndex}][color]`)
  239.                 .attr('id', `CartItem_color_${estimateId}-${productId}-${nextIndex}`)
  240.                 .data('item-id', `${estimateId}-${productId}-${nextIndex}`)
  241.                 .attr('data-url', $('.cart-row[data-line="' + productItemKey + '"]').data('url'))
  242.                 .val(currentCartItem.find('.CartItem_color  option:selected').val())
  243.                 .trigger('change')
  244.             ;
  245.             var itemQuantity = newCartItem.find('.CartItem_quantity')
  246.                 .attr('name', `CartItem[${estimateId}][${estimateId}-${productId}-${nextIndex}][quantity]`)
  247.                 .attr('id', `CartItem_quantity_${estimateId}-${productId}-${nextIndex}`)
  248.                 .data('item-id', `${estimateId}-${productId}-${nextIndex}`)
  249.                 .val('')
  250.             ;
  251.         }
  252.         function SetLinAddRe(num) {
  253.             var title = '{{ 'front.cart_item_button01'|trans }}';
  254.             var dl = 'div#line_add_' + num + ' dl';
  255.             var dt = 'div#line_add_' + num + ' dt';
  256.             var dd = 'div#line_add_' + num + ' dd';
  257.             if ('none' == $(dd).css('display')) {
  258.                 $(dl).css('display', 'inline-block');
  259.                 if ($('body').width() < 768) {
  260.                     $(dt).css('display', 'inline-block');
  261.                 }
  262.                 $(dd).css('display', 'inline-block');
  263.                 title = '{{ 'front.cart_item_button03'|trans }}';
  264.             } else {
  265.                 if ($('body').width() <= 768) {
  266.                     $(dl).hide();
  267.                 }
  268.                 $(dt).hide();
  269.                 $(dd).hide();
  270.                 $('input#line_add_' + num).val('');
  271.                 $('td.line_add .error').text('');
  272.             }
  273.             $('button#line_add_button_' + num).text(title);
  274.         }
  275.         function ItemSubMit(e) {
  276.             removeDisableOption();
  277.             //
  278.             const sessionKey = $(e).closest('[data-session-key]').data('sessionKey');
  279.             var $form = $('form#form_cart');
  280.             document.getElementById("overlay").style.display = "block";
  281.             //
  282.             $('.cart-row.js:not(.new-cart-item) .CartItem_quantity').filter(function () {
  283.                 return !this.value;
  284.             }).each(function () {
  285.                 $(this).closest('.cart-row.js').remove();
  286.             })
  287.             //
  288.             $.ajax({
  289.                 url: '{{ url('add_line') }}',
  290.                 type: 'POST',
  291.                 data: $form.serialize(),
  292.                 dataType: 'json'
  293.             }).done(function (data) {
  294.                 if (data.status == 'Error') {
  295.                     $('#OlToken').val(data.OlToken);
  296.                     DispError(data.Errors, sessionKey);
  297.                 }
  298.             }).fail(function (jqXHR, Status) {
  299.                 $('#allError01').text('{{ 'front.Error'|trans }}');
  300.                 $('#allError02').text('{{ 'front.Submit.Error'|trans }}');
  301.             }).always(function (data) {
  302.                 if (data.status == 'OK') {
  303.                     window.location.href = '{{ url('cart') }}';
  304.                 }
  305.                 document.getElementById("overlay").style.display = "none";
  306.                 //
  307.                 disableOption();
  308.             });
  309.         }
  310.         function DispError(Errors, sessionKey) {
  311.             $('p.error').text('');
  312.             Errors.forEach(function (Error, i) {
  313.                 if ([14].indexOf(Error.errid) >= 0) {
  314.                     //
  315.                     LineAddAlert(sessionKey, true)
  316.                     //
  317.                     return;
  318.                 }
  319.                 $('#allError01').text('{{ 'front.Error'|trans }}');
  320.                 if (0 == Error.class_id) {
  321.                     $('#allError02').text(Error.message);
  322.                 } else {
  323.                     if (8 == Error.errid) {
  324.                         $('.Quantity_' + Error.class_id).each(function (i, e) {
  325.                             if (0 == $(e).val()) {
  326.                                 var ItemId = $(e).data('item_id');
  327.                                 $('#CartError_' + ItemId).text(Error.message);
  328.                             }
  329.                         });
  330.                     } else {
  331.                         $('.CartError_' + Error.class_id).text(Error.message);
  332.                         $('#CartError_' + Error.class_id).text(Error.message);
  333.                     }
  334.                 }
  335.                 if (Error.add_lines) {
  336.                     Error.add_lines.forEach(function (Addline) {
  337.                         $('#CartError_' + Addline).text(Error.message);
  338.                     });
  339.                 }
  340.             });
  341.         }
  342.         function HybridSubmit(EstimateID, CartItemId) {
  343.             url = '{{ url('estimate') }}' + EstimateID;
  344.             $('#Hybrid_Cart_Item_Ids').val(CartItemId);
  345.             $('#form_cart').attr('action', url);
  346.             $('#form_cart').submit();
  347.         }
  348.         {# レスポンシブ時不要s #}
  349.         function LineAddAlert(sessionKey, hide) {
  350.             if (hide) {
  351.                 $('#line_add_alert.' + sessionKey + ' span').hide();
  352.                 $('.cart-footer .right_btn').remove('disabledBtn');
  353.             } else {
  354.                 $('#line_add_alert.' + sessionKey + ' span').show();
  355.                 $('.cart-footer .right_btn').addClass('disabledBtn');
  356.             }
  357.         }
  358.         $('.sp.button-group .next_btn,.cart-footer .right_btn').on('click',function (e){
  359.             if($(this).hasClass('disabledBtn')){
  360.                 e.preventDefault();
  361.             }
  362.         });
  363.         $('button[id^="mitsumoriBtn"]').on('click', function () {
  364.             var winOpen;
  365.             if (!winOpen || winOpen.closed) {
  366.                 winOpen = window.open('', 'mitsuWin', 'width=800,height=600,resizable=no,scrollbars=yes,location=yes,menubar=yes,status=yes,titlebar=yes,toolbar=yes');
  367.             }
  368.             var form = $('<form/>', {
  369.                 action: "{{ url('mitsumori') }}?t=3",
  370.                 method: 'post',
  371.                 name: 'form02',
  372.                 target: 'mitsuWin'
  373.             });
  374.             $.each($("#form01").serializeArray(), function (key, val) {
  375.                 form.append($('<input/>', {type: 'hidden', "name": val.name, "value": val.value}));
  376.             });
  377.             form.appendTo(document.body);
  378.             form.submit();
  379.             return false;
  380.         });
  381.     </script>
  382. {% endblock %}
  383. {% block main %}
  384.     <style>
  385.         .sp.button-group .disabledBtn,
  386.         .cart-footer .group-button .disabledBtn .right-btn{
  387.             background-color: #e1e1e1 !important;
  388.             border: 1px solid #e1e1e1 !important;
  389.         }
  390.         .blink {
  391.             animation: blinking .75s ease-in-out infinite alternate;
  392.         }
  393.         @keyframes blinking {
  394.             0% {opacity: 0;}
  395.             100% {opacity: 1;}
  396.         }
  397.     </style>
  398.     <div id="overlay">
  399.         <div id="overlay-text">処理中。。。</div>
  400.     </div>
  401.     {% if isMobile %}
  402.         <div class="sp wrapper-block-normal">
  403.             <div class="step d-flex flex-center">
  404.                 {% if LmCartType() == 3 %}
  405.                     <img src="https://img0.land-mark.biz/ut_img/public_images/order/flow7.gif" style="max-width: 80%;" alt="カートの商品"/>
  406.                 {% else %}
  407.                     {{ include('Cart/Parts/Step.twig') }}
  408.                 {% endif %}
  409.             </div>
  410.             {% set nextStep = app.user ? 'shopping' : 'shopping_entry' %}
  411.             <div class="ec-cartRole__error">
  412.                 {% for error in app.session.flashbag.get('eccube.front.cart.request.error') %}
  413.                     <div class="ec-alert-warning">
  414.                         <div class="ec-alert-warning__icon">
  415.                             <img src="{{ asset('assets/icon/exclamation-white.svg') }}">
  416.                         </div>
  417.                         <div class="ec-alert-warning__text">
  418.                             {{ error|trans|nl2br }}
  419.                         </div>
  420.                     </div>
  421.                 {% endfor %}
  422.             </div>
  423.             {% if totalQuantity > 0 %}
  424.                 <div class="remaining">入力完了まで:約2分(目安)</div>
  425.                 <div class="title-cart-contents">カートの中身</div>
  426.                 <div id="bodyContentRegular" style="width: 100%">
  427.                     <form name="form" id="form_cart" class="lm-cartRole" method="post" action="{{ url('cart') }}">
  428.                         <input type="hidden" name="OlToken" id="OlToken" value="{{ OlToken('matrix') }}">
  429.                         <input type="hidden" name="Hybrid[cart_item_id]" id="Hybrid_Cart_Item_Ids" value="">
  430.                         {% for CartIndex,Cart in Carts %}
  431.                             <div id="top_btn" class="sp button-group">
  432.                                 <a class="botton back_btn" href="{{ CartBackBtn() }}">
  433.                                     {{ GetCartBackBtnText() }}
  434.                                 </a>
  435.                                 <a
  436.                                     id="next_btn"
  437.                                     {% if isItemsStockAvailable and not isSusoageChange %}
  438.                                     class="next_btn big-btn"
  439.                                     href="{{ path('cart_buystep', {'cart_key':Cart.cart_key, 'next_step': nextStep}) }}"
  440.                                     {% else %}
  441.                                     class="next_btn big-btn disabledBtn"
  442.                                     {% endif %}
  443.                                 >
  444.                                     {{ GetCartNextBtnText() }}▶
  445.                                 </a>
  446.                             </div>
  447.                             <input type="hidden" name="CartType" value="{{ Cart.CartType }}">
  448.                             {% set cartKey = Cart.cart_key %}
  449.                             <div class="ec-cartRole__error">
  450.                                 {% for error in app.session.flashbag.get('eccube.front.cart.' ~ cartKey ~ '.request.error') %}
  451.                                     <div class="ec-alert-warning">
  452.                                         <div class="ec-alert-warning__icon">
  453.                                             <img src="{{ asset('assets/icon/exclamation-white.svg') }}">
  454.                                         </div>
  455.                                         <div class="ec-alert-warning__text">
  456.                                             {{ error|trans|nl2br }}
  457.                                         </div>
  458.                                     </div>
  459.                                 {% endfor %}
  460.                                 <div class="ec-alert-warning">
  461.                                     <div id="allError01" class="ec-alert-warning__text"></div>
  462.                                     <div id="allError02" class="ec-alert-warning__text"></div>
  463.                                     {{ ExclusionControl()|raw }}
  464.                                 </div>
  465.                                 {% set sampleLimitError = GetSampleLimitError() %}
  466.                                 {% if sampleLimitError is not empty %}
  467.                                     <div class="ec-alert-warning">
  468.                                         <div id="allError02" class="ec-alert-warning__text">{{ sampleLimitError }}</div>
  469.                                     </div>
  470.                                 {% endif %}
  471.                                 {% if not isItemsStockAvailable %}
  472.                                     <div class="ec-alert-warning">
  473.                                         <div id="allError02" class="ec-alert-warning__text">在庫切れの商品があります。他のカラー、サイズを選択するか、カートから削除してください。</div>
  474.                                     </div>
  475.                                 {% endif %}
  476.                                 {% if  isSusoageChange %}
  477.                                     <div class="ec-alert-warning">
  478.                                         <div id="allError02" class="ec-alert-warning__text">商品情報が更新さたため裾上げ内容を再設定してください。</div>
  479.                                     </div>
  480.                                 {% endif %}
  481.                             </div>
  482.                             <div class="carts-group pt-0">
  483.                                 {# for sessionKey, cartItems in cartsTransformed #}
  484.                                 <div id="Cart-{{ CartIndex }}"
  485.                                     class="cart-box{# sessionKey == 'GROUP_2_RESERVATION' ? ' yoyaku-cart' : '' #}{% if isYoyaku %} yoyaku-cart{% endif %}"
  486.                                     data-session-key="Cart-{{ CartIndex }}"
  487.                                 >
  488.                                     <div class="cart-title">
  489.                                         {% if isYoyaku %}
  490.                                             <p class="font-14">{# getCartSessionName(sessionKey) #}予約注文</p>
  491.                                         {% endif %}
  492.                                         <div class="clear-carts hover-pointer"
  493.                                              onclick="RemoveCart('Cart-{{ CartIndex }}')">
  494.                                             <p class="pt-4">すべてクリア</p>
  495.                                             <img src="/stylesheets/images/icons-svg/trash-icon.svg"
  496.                                                  alt="delete button"/>
  497.                                         </div>
  498.                                     </div>
  499.                                     {#                                        {% if RepartData is not null %} #}
  500.                                     {#                                            <p class="repart">{{'front.Cart.Repeat'|trans}} {{'ftont.Order_id.name'|trans}}:{{RepartData.ohid}}</p> #}
  501.                                     {#                                        {% endif %} #}
  502.                                     {{ include('Cart/Parts/Responsive.twig') }}
  503.                                 </div>
  504.                                 <div id="cart-explain">
  505.                                     ※カートに商品を入れた時点では、在庫は確保されません。「ご注文完了」時点で確保されます。
  506.                                 </div>
  507.                                 {# endfor #}
  508.                             </div>
  509.                             <div class="bg-white pt-1 pb-5">
  510.                                 <div id="total">
  511.                                     <div id="prices">
  512.                                         <div class="prices-box">
  513.                                             <div class="prices-title float-left">商品合計点数:</div>
  514.                                             <div class="prices-content color-red">{{ totalQuantity }}<span
  515.                                                     class="prices-unit fs-13">点</span></div>
  516.                                         </div>
  517.                                         {% if LargeDiscount > 0 %}
  518.                                             <div class="prices-box">
  519.                                                 <div
  520.                                                     class="prices-title">{{ 'common.total__with_separator'|trans }}</div>
  521.                                                 <div class="prices-content">{{ ProductTotal }}</div>
  522.                                             </div>
  523.                                             <div class="prices-box">
  524.                                                 <div class="prices-title">{{ ItemType(8) }}({{ LargeDiscountRitu }}%):
  525.                                                 </div>
  526.                                                 <div class="prices-content">-{{ LargeDiscount|FormatPrice|raw }}</div>
  527.                                             </div>
  528.                                         {% endif %}
  529.                                         {% if LmCartType() != 3 %}
  530.                                             <div class="prices-total">
  531.                                                 <div class="prices-title float-left">合計金額:</div>
  532.                                                 <div class="prices-content color-red">{{ totalPrice|FormatPrice|raw }}
  533.                                                     <span class="prices-unit fs-13">(税込)</span></div>
  534.                                             </div>
  535.                                         {% endif %}
  536.                                     </div>
  537.                                     {% if LmCartType() != 3 %}
  538.                                         <div id="prices-explain" class="py-12">
  539.                                             10,000円以上で送料無料、<br/>10万円以上で5%OFF、30万円以上で10%OFFです。
  540.                                         </div>
  541.                                     {% endif %}
  542.                                 </div>
  543.                                 <div class="Lm_footArea">
  544.                                     {% if LmCartType() < 3 %}
  545.                                         {% if BaseInfo.delivery_free_amount %}
  546.                                             {% if is_delivery_free[cartKey] %}
  547.                                                 <div class="delivery-free-info">
  548.                                                     <p class="title">10,000円<span
  549.                                                             style="font-size: 10px;">(税込)</span>以上のご注文のため、
  550.                                                     </p>
  551.                                                     <p class="title"><span>送料が無料</span>です。</p>
  552.                                                     <p style="font-size: 10px; color: #666666; margin-top: 5px; text-align: left; padding: 2px;">
  553.                                                         ※10,000円以上の場合、全国一律
  554.                                                         送料770円(税込)が無料サービスとなります。</p>
  555.                                                     <p style="font-size: 10px; color: #666666; margin-top: 5px; text-align: left; padding: 2px;">
  556.                                                         ※一部の地域(離島)につきましては、別途送料をご請求させていただきます。</p>
  557.                                                     <p style="font-size: 10px; color: #666666; margin-top: 5px; text-align: left; padding: 2px;">
  558.                                                         ※お支払い方法が「後払い」の場合は、後払い手数料が無料になります。</p>
  559.                                                 </div>
  560.                                             {% else %}
  561.                                                 <div class="free-ship-explain">
  562.                                                     <p class="free-ship-by-price">
  563.                                                         あと{{ (BaseInfo.DeliveryFreeAmount - totalPrice)|LmPrice }}
  564.                                                         で送料無料(※一部離島除く)です。</p>
  565.                                                     <p class="free-payment-fee">さらに、後払い手数料も無料になります。</p>
  566.                                                 </div>
  567.                                             {% endif %}
  568.                                         {% endif %}
  569.                                     {% endif %}
  570.                                 </div>
  571.                             </div>
  572.                             <div class="block-line"></div>
  573.                             <div id="botom_btn" class="sp button-group pt-5">
  574.                                 <a class="back_btn" href="{{ CartBackBtn() }}">
  575.                                     {{ GetCartBackBtnText() }}
  576.                                 </a>
  577.                                 <a
  578.                                     id="next_btn"
  579.                                     {% if isItemsStockAvailable and not isSusoageChange %}
  580.                                     class="next_btn big-btn"
  581.                                     href="{{ path('cart_buystep', {'cart_key':Cart.cart_key, 'next_step': nextStep}) }}"
  582.                                     {% else %}
  583.                                     class="next_btn big-btn disabledBtn"
  584.                                     {% endif %}
  585.                                 >
  586.                                     {{ GetCartNextBtnText() }}▶
  587.                                 </a>
  588.                             </div>
  589.                             <div class="mitsumori-button mb-10">
  590.                                 <a href="{{ url('mitsumori') }}?t=3" target="_blank">見積書をメールで送信する</a>
  591.                             </div>
  592.                             <div class="kakaku-confidence-button">
  593.                                 <a href="/kakaku-confidence/" target="_blank">
  594.                                     <img src="https://img0.land-mark.biz/ut_img/public_img/kakaku-confidence-sp.png" alt="empty cart"/>
  595.                                 </a>
  596.                             </div>
  597.                             <div class="block-line-medium"></div>
  598.                         {% endfor %}
  599.                     </form>
  600.                 </div>
  601.             {% else %}
  602.                 <div class="flex-center empty-cart">
  603.                     <img src="/stylesheets/images/icons-svg/empty-cart-warning.svg" alt="empty cart"/>
  604.                 </div>
  605.                 <div class="flex-center py-8 mb-10">
  606.                     <div id="noitem_btn">
  607.                         <a class="pc" href="{{ CartBackBtn() }}">◀ {{ 'front.cart.continue'|trans }}</a>
  608.                     </div>
  609.                 </div>
  610.             {% endif %}
  611.             {% if LmCartType() != 3 %}
  612.                 <div class="section-recent-post {% if totalQuantity <= 0 %} pt-0 {% endif %}">
  613.                     {% include 'Block/Sp/Item/lm_item_recently_checked_item.twig' %}
  614.                 </div>
  615.             {% endif %}
  616.         </div>
  617.     {% else %}
  618.         <div class="step text-center">
  619.             {% if LmCartType() == 3 %}
  620.                 <img src="https://img0.land-mark.biz/ut_img/public_images/order/flow7.gif" style="max-width: 80%;" alt="カートの商品"/>
  621.             {% else %}
  622.                 {{ include('Cart/Parts/Step.twig') }}
  623.             {% endif %}
  624.         </div>
  625.         <div class="search-list">
  626.             <form action="{{ url('item_searchlist') }}" method="GET">
  627.                 <input type="hidden" name="hantei" value="検索"/>
  628.                 <input class="search-input" type="text" name="searchtext" value=""
  629.                        placeholder="商品名・品番で検索 (※「Enter」キーで検索)"/>
  630.                 <input style="padding: 5px;" type="submit" name="" value="検索" data-loading="false">
  631.             </form>
  632.         </div>
  633.         {% if totalQuantity > 0 %}
  634.             <div id="title-bar" class="d-flex flex-center-vertial">
  635.                 <p class="titleText">
  636.                     {% set TImage = 'images/order/title_cart.gif' %}
  637.                     {% if LmCartType() == 3 %}
  638.                         {% set TImage = 'images/order/title_sample.gif' %}
  639.                     {% endif %}
  640.                     <img src="{{ TImage }}" alt="ショッピングカート" width="" height="28">
  641.                 </p>
  642.             </div>
  643.             <div id="bodyContentRegular" class="pc" style="width: 100%">
  644.                 <p class="cart-des">
  645.                     <strong>
  646.                         {% if LmCartType() == 3 %}
  647.                             貸出サンプルサービス申し込み商品の一覧です。
  648.                         {% else %}
  649.                             お客様のショッピングカート内の商品一覧です。
  650.                         {% endif %}
  651.                     </strong>
  652.                 </p>
  653.                 <div class="ec-cartRole__error">
  654.                     {% for error in app.session.flashbag.get('eccube.front.cart.request.error') %}
  655.                         <div class="ec-alert-warning">
  656.                             <div class="ec-alert-warning__icon">
  657.                                 <img src="{{ asset('assets/icon/exclamation-white.svg') }}">
  658.                             </div>
  659.                             <div class="ec-alert-warning__text">
  660.                                 {{ error|trans|nl2br }}
  661.                             </div>
  662.                         </div>
  663.                     {% endfor %}
  664.                 </div>
  665.                 <form name="form" id="form_cart" class="lm-cartRole" method="post" action="{{ url('cart') }}">
  666.                     <input type="hidden" name="OlToken" id="OlToken" value="{{ OlToken('matrix') }}">
  667.                     <input type="hidden" name="Hybrid[cart_item_id]" id="Hybrid_Cart_Item_Ids" value="">
  668.                     {% for CartIndex,Cart in Carts %}
  669.                         <input type="hidden" name="CartType" value="{{ Cart.CartType }}">
  670.                         {% set cartKey = Cart.cart_key %}
  671.                         <div class="ec-cartRole__error">
  672.                             {% for error in app.session.flashbag.get('eccube.front.cart.' ~ cartKey ~ '.request.error') %}
  673.                                 <div class="ec-alert-warning">
  674.                                     <div class="ec-alert-warning__icon">
  675.                                         <img src="{{ asset('assets/icon/exclamation-white.svg') }}">
  676.                                     </div>
  677.                                     <div class="ec-alert-warning__text">
  678.                                         {{ error|trans|nl2br }}
  679.                                     </div>
  680.                                 </div>
  681.                             {% endfor %}
  682.                             <div class="ec-alert-warning">
  683.                                 <div id="allError01" class="ec-alert-warning__text"></div>
  684.                                 <div id="allError02" class="ec-alert-warning__text"></div>
  685.                                 {{ ExclusionControl()|raw }}
  686.                             </div>
  687.                             {% set sampleLimitError = GetSampleLimitError() %}
  688.                             {% if sampleLimitError is not empty %}
  689.                                 <div class="ec-alert-warning">
  690.                                     <div id="allError02" class="ec-alert-warning__text">{{ sampleLimitError }}</div>
  691.                                 </div>
  692.                             {% endif %}
  693.                             {% if not isItemsStockAvailable %}
  694.                                 <div class="ec-alert-warning">
  695.                                     <div id="allError02" class="ec-alert-warning__text">在庫切れの商品があります。他のカラー、サイズを選択するか、カートから削除してください。</div>
  696.                                 </div>
  697.                             {% endif %}
  698.                             {% if  isSusoageChange %}
  699.                                 <div class="ec-alert-warning">
  700.                                     <div id="allError02" class="ec-alert-warning__text">商品情報が更新さたため裾上げ内容を再設定してください。</div>
  701.                                 </div>
  702.                             {% endif %}
  703.                         </div>
  704.                         <div class="carts-group">
  705.                             <div id="Cart-{{ CartIndex }}"
  706.                                 class="cart-box{# sessionKey == 'GROUP_2_RESERVATION' ? ' yoyaku-cart' : '' #}{% if isYoyaku %} yoyaku-cart{% endif %}"
  707.                                 data-session-key="Cart-{{ CartIndex }}"
  708.                             >
  709.                                 {# if isMixCart is not empty or sessionKey == 'GROUP_2_RESERVATION' #}
  710.                                 {% if isYoyaku %}
  711.                                     <div class="cart-title">
  712.                                         <p>{# getCartSessionName(sessionKey) #}予約注文</p>
  713.                                         <div class="clear-carts hover-pointer" onclick="RemoveCart('{{ CartIndex }}')">
  714.                                             <p>すべてクリア</p>
  715.                                             <img src="/stylesheets/images/icons-svg/trash-icon.svg"
  716.                                                  alt="delete button"/>
  717.                                         </div>
  718.                                     </div>
  719.                                 {% else %}
  720.                                     <div class="delete-all">
  721.                                         <div
  722.                                             class="clear-carts hover-pointer bg-none border-none d-flex flex-center-vertial"
  723.                                             onclick="RemoveCart('Cart-{{ CartIndex }}')">
  724.                                             <span class="text-gray-700 fs-12 pt-4">すべてクリア</span>
  725.                                             <img src="/stylesheets/images/icons-svg/trash_gray.svg"
  726.                                                  alt="icon delete all"/>
  727.                                         </div>
  728.                                     </div>
  729.                                 {% endif %}
  730.                                 {% if RepartData is not null %}
  731.                                     <p class="repart">{{ 'front.Cart.Repeat'|trans }} {{ 'ftont.Order_id.name'|trans }}
  732.                                         :{{ RepartData.ohid }}</p>
  733.                                 {% endif %}
  734.                                 {{ include('Cart/Parts/table.twig') }}
  735.                             </div>
  736.                         </div>
  737.                         <div class="cart-footer">
  738.                             <div class="footer-row font-20 mr-5">
  739.                                 <div class="item-title">{{ eccube_config.ESTIMATE_TEXT.Text20 }}:</div>
  740.                                 <div
  741.                                     class="item-value">{{ totalQuantity }}{{ eccube_config.ESTIMATE_TEXT.Text04 }}</div>
  742.                             </div>
  743.                             {% if LargeDiscount > 0 %}
  744.                                 <div class="footer-row font-20 mr-5">
  745.                                     <div class="item-title">{{ 'common.total__with_separator'|trans }}</div>
  746.                                     <div class="item-value">{{ ProductTotal|LmPrice }}</div>
  747.                                 </div>
  748.                                 <div class="footer-row font-20 mr-5">
  749.                                     <div class="item-title">{{ ItemType(8) }}({{ LargeDiscountRitu }}%):</div>
  750.                                     <div class="item-value">{{ LargeDiscount|LmPrice }}</div>
  751.                                 </div>
  752.                             {% endif %}
  753.                             {% if LmCartType() != 3 %}
  754.                                 <div class="footer-row font-24 mr-5">
  755.                                     <div class="item-title color-red">{{ 'front.cart_message01'|trans }}:</div>
  756.                                     <div class="item-value color-red font-bold">{{ totalPrice|LmPrice }}</div>
  757.                                 </div>
  758.                             {% endif %}
  759.                         </div>
  760.                         <div class="cart-footer">
  761.                             <div class="group-button">
  762.                                 <div class="button-group-wrapper" style="display: flex; align-items: center; gap: 0;">
  763.                                     <a class="left_btn mr-5" href="{{ CartBackBtn() }}">
  764.                                         <div class="button left-btn">
  765.                                             ◀
  766.                                             {% if LmCartType() == 3 %}
  767.                                                 {{ 'front.cart.type_3_back'|trans }}
  768.                                             {% else %}
  769.                                                 {{ 'front.cart.continue'|trans }}
  770.                                             {% endif %}
  771.                                         </div>
  772.                                     </a>
  773.                                     <a href="/kakaku-confidence/" target="_blank" class="ml-5">
  774.                                         <img src="https://img0.land-mark.biz/ut_img/public_images/top/kakaku-confidence.png" alt="empty cart"/>
  775.                                     </a>
  776.                                 </div>
  777.                                 <a class="right_btn{% if not isItemsStockAvailable or isSusoageChange %} disabledBtn{% endif %}" href="{{ path('cart_buystep', {'cart_key':cartKey}) }}">
  778.                                     <div class="button right-btn">
  779.                                         {% if LmCartType() == 3 %}
  780.                                             {{ 'front.cart.type_3_continue'|trans }}
  781.                                         {% else %}
  782.                                             次へ(レジへ進む)
  783.                                         {% endif %}
  784.                                         ▶
  785.                                     </div>
  786.                                 </a>
  787.                             </div>
  788.                         </div>
  789.                         <div class="cart-footer">
  790.                             <div class="group-message group-message-{{ LmCartType() }}">
  791.                                 {% if LmCartType() == 3 %}
  792.                                     <div class="sample color-red">
  793.                                         <p class="title fs-16 lh-19">サンプル申し込みにつきまして</p>
  794.                                         <p class="fs-13 lh-19">※10点まで。金額無制限です。</p>
  795.                                         <p class="fs-13 lh-19">※名入れ処理はできません。</p>
  796.                                         <p class="fs-13 lh-19">
  797.                                             ※通常購入の商品とサンプル申込みの商品を同一のカートに入れることはできません。</p>
  798.                                         <p class="fs-13 lh-19">
  799.                                             ※通常の購入を行う場合は、サンプル申込みが完了してからお願いいたします。</p>
  800.                                     </div>
  801.                                 {% else %}
  802.                                     <div class="quotation">
  803.                                         <button id="mitsumoriBtn2" class="SF-nonDisplay mBtnStyle">見積書<br>印刷・メールする
  804.                                         </button>
  805.                                     </div>
  806.                                     <div class="guide">
  807.                                         <p>{{ 'front.cart_message02'|trans|Base }}</p>
  808.                                         <p>{{ 'front.cart_message03'|trans|Base }}</p>
  809.                                         <p>{{ 'front.cart_message04'|trans }}</p>
  810.                                     </div>
  811.                                 {% endif %}
  812.                             </div>
  813.                             {% if LmCartType() < 3 %}
  814.                                 <div class="group-message-center">
  815.                                     {% if BaseInfo.delivery_free_amount %}
  816.                                         {% if is_delivery_free[cartKey] %}
  817.                                             <div class="free-shipping-message">
  818.                                                 <p class="title">10,000円<span class="title-1">(税込)</span>以上のご注文のため、
  819.                                                 </p>
  820.                                                 <p class="title"><span class="title-2">送料が無料</span>です。</p>
  821.                                                 <p>※10,000円以上の場合、全国一律
  822.                                                     送料770円(税込)が無料サービスとなります。</p>
  823.                                                 <p>
  824.                                                     ※一部の地域(離島)につきましては、別途送料をご請求させていただきます。</p>
  825.                                                 <p>※お支払い方法が「後払い」の場合は、後払い手数料が無料になります。</p>
  826.                                             </div>
  827.                                         {% else %}
  828.                                             <div class="free-shipping-message">
  829.                                                 <p>あと <span> {{ least[cartKey]|LmPrice }}</span><span>(税込)</span>
  830.                                                     で送料・代引手数料が無料です。</p>
  831.                                                 <p>{{ 'front.cart_message05'|trans|Base }}</p>
  832.                                                 <p>{{ 'front.cart_message06'|trans }}</p>
  833.                                                 <p>{{ 'front.cart_message07'|trans }}</p>
  834.                                             </div>
  835.                                         {% endif %}
  836.                                     {% endif %}
  837.                                 </div>
  838.                             {% endif %}
  839.                         </div>
  840.                     {% endfor %}
  841.                 </form>
  842.                 {% if LmCartType() < 3 %}
  843.                     {{ include('Cart/Parts/ItemAlsoBuy.twig') }}
  844.                 {% endif %}
  845.             </div>
  846.         {% else %}
  847.             <div class="ec-cartRole__error">
  848.                 {% for error in app.session.flashbag.get('eccube.front.cart.request.error') %}
  849.                     <div class="ec-alert-warning">
  850.                         <div class="ec-alert-warning__icon">
  851.                             <img src="{{ asset('assets/icon/exclamation-white.svg') }}">
  852.                         </div>
  853.                         <div class="ec-alert-warning__text">
  854.                             {{ error|trans|nl2br }}
  855.                         </div>
  856.                     </div>
  857.                 {% endfor %}
  858.             </div>
  859.             <div class="ec-alert-warning">
  860.                 {{ ExclusionControl()|raw }}
  861.             </div>
  862.             <div class="flex-center py-12">
  863.                 <img src="/stylesheets/images/icons-svg/empty-cart-warning.svg" alt="empty cart"/>
  864.             </div>
  865.             <div class="flex-center py-12">
  866.                 <div id="noitem_btn">
  867.                     <a class="pc" href="{{ CartBackBtn() }}">◀ {{ 'front.cart.continue'|trans }}</a>
  868.                 </div>
  869.             </div>
  870.         {% endif %}
  871.     {% endif %}
  872. {% endblock %}