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

Open in your IDE?
  1. {% extends 'default_frame.twig' %}
  2. {% set body_class = 'cart_page' %}
  3. {% block main %}
  4.   <div class="ec-registerRole">
  5.       
  6. <div class="error_other1">
  7.                   ※地金型商品は、クレジットカード決済の対象外となっております。<br>
  8.                   そのため、クレジットカード決済対象商品と同時にカートへ入れてご購入いただくことはできません。<br><br>
  9.                   誠にお手数をおかけいたしますが、地金型商品につきましては、<br>
  10.                   カード決済対象商品とは分けて、個別にご購入手続きをお願い申し上げます。
  11.                 </div>      
  12.       
  13.     <div class="kaso_h1title">
  14.       <p>Shopping Cart</p>
  15.       <h1>ショッピングカート</h1>
  16.     </div>
  17.     <div class="ec-cartRole">
  18.       <div class="ec-cartRole__progress">
  19.         <ul class="ec-progress">
  20.           {% set step = 1 %}
  21.           <li class="ec-progress__item is-complete">
  22.             <div class="ec-progress__number">{{ step }}{% set step = step + 1 %}
  23.             </div>
  24.             <div class="ec-progress__label">{{ 'カートの商品'|trans }}
  25.             </div>
  26.           </li>
  27.           <li class="ec-progress__item">
  28.             <div class="ec-progress__number">{{ step }}{% set step = step + 1 %}
  29.             </div>
  30.             <div class="ec-progress__label">{{ 'ご注文内容確認'|trans }}
  31.             </div>
  32.           </li>
  33.           <li class="ec-progress__item">
  34.             <div class="ec-progress__number">{{ step }}{% set step = step + 1 %}
  35.             </div>
  36.             <div class="ec-progress__label">{{ '完了'|trans }}
  37.             </div>
  38.           </li>
  39.         </ul>
  40.       </div>
  41.       {% set productStr = app.session.flashbag.get('eccube.front.request.product') %}
  42.       {% for error in app.session.flashbag.get('eccube.front.request.error') %}
  43.         {% set idx = loop.index0 %}
  44.         <div class="ec-cartRole__error">
  45.           <div class="ec-alert-warning">
  46.             <div class="ec-alert-warning__icon"><img src="{{ asset('assets/icon/exclamation-white.svg') }}"></div>
  47.             <div class="ec-alert-warning__text">
  48.               {% if productStr[idx] is defined %}
  49.                 {{ error|trans({'%product%':productStr[idx]})|nl2br }}
  50.               {% else %}
  51.                 {{ error|trans|nl2br }}
  52.               {% endif %}
  53.             </div>
  54.           </div>
  55.         </div>
  56.       {% endfor %}
  57.       {% for error in app.session.flashbag.get('eccube.front.cart.error') %}
  58.         <div class="ec-cartRole__error">
  59.           <div class="ec-alert-warning">
  60.             <div class="ec-alert-warning__icon"><img src="{{ asset('assets/icon/exclamation-white.svg') }}"></div>
  61.             <div class="ec-alert-warning__text">
  62.               {{ error|trans|nl2br }}
  63.             </div>
  64.           </div>
  65.         </div>
  66.       {% endfor %}
  67.       {% if totalQuantity > 0 %}
  68.         <div class="ec-cartRole__totalText">
  69.           <p>
  70.             {% if hasNegotiatedItems %}
  71.               <span style="color: #666; text-decoration: line-through;">{{ totalPrice|price }}</span><br>
  72.               {{ '商品の合計金額は「<strong style="color: #28a745;">%price%</strong>」です。'|trans({ '%price%': negotiatedTotalPrice|price })|raw }}
  73.               <span style="color: #28a745; font-size: 0.9em;"><i class="fa-solid fa-circle-check"></i> 交渉価格適用</span>
  74.             {% else %}
  75.               {{ '商品の合計金額は「<strong>%price%</strong>」です。'|trans({ '%price%': totalPrice|price })|raw }}
  76.             {% endif %}
  77.           </p>
  78.         </div>
  79.         {% if Carts|length > 1 %}
  80.           <div class="ec-cartRole__error">
  81.             <div class="ec-alert-warning">
  82.               <div class="ec-alert-warning__text">
  83.                 {{ '同時購入できない商品がカートに含まれています。'|trans|nl2br }}
  84.               </div>
  85.             </div>
  86.           </div>
  87.         {% endif %}
  88. <p id="cart_item__point_info" class="message">
  89.     ポイント制度をご利用になられる場合は、会員登録後ログインしてくださいますようお願い致します。<br>
  90.     ポイントは商品購入時に1pt=<strong class="text-primary">¥ 1</strong>として利用することができます。<br>
  91.     ※ポイントは合計 10,000円以上のお買い物で利用することができます。
  92. </p>
  93.         <form name="form" id="form_cart" class="ec-cartRole" method="post" action="{{ url('cart') }}">
  94.           {% for CartIndex,Cart in Carts %}
  95.             {% set cartKey = Cart.cart_key %}
  96.             {% for error in app.session.flashbag.get('eccube.front.cart.' ~ cartKey ~ '.request.error') %}
  97.               <div class="ec-cartRole__error">
  98.                 <div class="ec-alert-warning">
  99.                   <div class="ec-alert-warning__icon"><img src="{{ asset('assets/icon/exclamation-white.svg') }}"></div>
  100.                   <div class="ec-alert-warning__text">
  101.                     {{ error|trans|nl2br }}
  102.                   </div>
  103.                 </div>
  104.               </div>
  105.             {% endfor %}
  106.             <div class="ec-cartRole__cart">
  107.               <div class="ec-cartTable">
  108.                 <ol class="ec-cartHeader">
  109.                   <li class="ec-cartHeader__label">{{ '削除'|trans }}</li>
  110.                   <li class="ec-cartHeader__label">{{ '商品内容'|trans }}</li>
  111.                   <li class="ec-cartHeader__label">{{ '数量'|trans }}</li>
  112.                   <li class="ec-cartHeader__label">{{ '小計'|trans }}</li>
  113.                 </ol>
  114.                 {% for CartItem in Cart.CartItems %}
  115.                   {% set ProductClass = CartItem.ProductClass %}
  116.                   {% set Product = ProductClass.Product %}
  117.                   <ul class="ec-cartRow">
  118.                     <li class="ec-cartRow__delColumn">
  119.                       <a
  120.                         href="{{ url('cart_handle_item', {'operation': 'remove', 'productClassId': ProductClass.id }) }}" {{ csrf_token_for_anchor() }}
  121.                         class="ec-icon" data-method="put" data-message="カートから商品を削除してもよろしいですか?">
  122.                         <img src="{{ asset('assets/icon/cross.svg') }}" alt="delete">
  123.                       </a>
  124.                     </li>
  125.                     <li class="ec-cartRow__contentColumn">
  126.                       <div class="ec-cartRow__img">
  127.                         <a target="_blank" href="{{ url('product_detail', {id : Product.id} ) }}">
  128.                           <img src="{{ asset(Product.MainListImage|no_image_product, 'save_image') }}"
  129.                                alt="{{ Product.name }}"/>
  130.                         </a>
  131.                       </div>
  132.                       <div class="ec-cartRow__summary">
  133.                         <div class="ec-cartRow__name">
  134.                           <a target="_blank"
  135.                              href="{{ url('product_detail', {id : Product.id} ) }}">{{ Product.name }}</a>
  136.                           {% if ProductClass.ClassCategory1 and ProductClass.ClassCategory1.id %}
  137.                             <br>{{ ProductClass.ClassCategory1.ClassName.name }}:{{ ProductClass.ClassCategory1 }}
  138.                           {% endif %}
  139.                           {% if ProductClass.ClassCategory2 and ProductClass.ClassCategory2.id %}
  140.                             <br>{{ ProductClass.ClassCategory2.ClassName.name }}:{{ ProductClass.ClassCategory2 }}
  141.                           {% endif %}
  142.                         </div>
  143.                         {% if negotiationPrices[Product.id] is defined %}
  144.                           <div class="ec-cartRow__unitPrice" style="font-weight: bold; color: #28a745;">
  145.                             <i class="fa-solid fa-circle-check"></i> 価格交渉成立<br>
  146.                             <span style="color: #666; text-decoration: line-through;">{{ CartItem.price|price }}</span><br>
  147.                             <span style="color: #28a745;">交渉価格:{{ negotiationPrices[Product.id]|price }}</span>
  148.                           </div>
  149.                           <div class="ec-cartRow__sutbtotalSP">
  150.                             {{ '小計:'|trans }}<span style="color: #666; text-decoration: line-through;">{{ CartItem.total_price|price }}</span><br>
  151.                             <span style="color: #28a745; font-weight: bold;">→ {{ negotiatedSubtotals[Product.id]|price }}</span>
  152.                           </div>
  153.                         {% else %}
  154.                           <div class="ec-cartRow__unitPrice">{{ CartItem.price|price }}</div>
  155.                           <div class="ec-cartRow__sutbtotalSP">{{ '小計:'|trans }}{{ CartItem.total_price|price }}</div>
  156.                         {% endif %}
  157.                       </div>
  158.                     </li>
  159.                     <li class="ec-cartRow__amountColumn">
  160.                       <div class="ec-cartRow__amount">{{ CartItem.quantity|number_format }}</div>
  161.                       <div class="ec-cartRow__amountSP">{{ '数量:'|trans }}{{ CartItem.quantity|number_format }}</div>
  162.                       <div class="ec-cartRow__amountUpDown">
  163.                         {% if CartItem.quantity > 1 %}
  164.                           <a
  165.                             href="{{ url('cart_handle_item', {'operation': 'down', 'productClassId': ProductClass.id}) }}" {{ csrf_token_for_anchor() }}
  166.                             class="ec-cartRow__amountDownButton load-overlay" data-method="put" data-confirm="false">
  167.                             <span class="ec-cartRow__amountDownButton__icon"><img
  168.                                 src="{{ asset('assets/icon/minus-dark.svg') }}" alt="reduce"></span>
  169.                           </a>
  170.                         {% else %}
  171.                           <div class="ec-cartRow__amountDownButtonDisabled">
  172.                             <span class="ec-cartRow__amountDownButton__icon"><img
  173.                                 src="{{ asset('assets/icon/minus.svg') }}" alt="reduce"></span>
  174.                           </div>
  175.                         {% endif %}
  176.                         <a
  177.                           href="{{ url('cart_handle_item', {'operation': 'up', 'productClassId': ProductClass.id}) }}" {{ csrf_token_for_anchor() }}
  178.                           class="ec-cartRow__amountUpButton load-overlay" data-method="put" data-confirm="false">
  179.                           <span class="ec-cartRow__amountUpButton__icon"><img
  180.                               src="{{ asset('assets/icon/plus-dark.svg') }}" alt="increase"></span>
  181.                         </a>
  182.                       </div>
  183.                     </li>
  184.                     <li class="ec-cartRow__subtotalColumn">
  185.                       {% if negotiationPrices[Product.id] is defined %}
  186.                         <div class="ec-cartRow__sutbtotal">
  187.                           <span style="color: #666; text-decoration: line-through; font-size: 0.9em;">{{ CartItem.total_price|price }}</span><br>
  188.                           <span style="color: #28a745; font-weight: bold;">{{ negotiatedSubtotals[Product.id]|price }}</span>
  189.                         </div>
  190.                       {% else %}
  191.                         <div class="ec-cartRow__sutbtotal">{{ CartItem.total_price|price }}</div>
  192.                       {% endif %}
  193.                     </li>
  194.                   </ul>
  195.                 {% endfor %}
  196.               </div>
  197.             </div>
  198.             <div class="ec-cartRole__progress">
  199.               {% if BaseInfo.delivery_free_amount and BaseInfo.delivery_free_quantity %}
  200.                 <br/>
  201.                 {% if is_delivery_free[cartKey] %}
  202.                   {{ '現在送料無料です。'|trans }}
  203.                 {% else %}
  204.                   {{ 'あと「<strong>%price%</strong>」または「<strong>%quantity%個</strong>」のお買い上げで<strong class="ec-color-red">送料無料</strong>になります。'|trans({ '%price%': least[cartKey]|price, '%quantity%': quantity[cartKey]|number_format })|raw }}
  205.                 {% endif %}
  206.               {% elseif BaseInfo.delivery_free_amount %}
  207.                 <br/>
  208.                 {% if is_delivery_free[cartKey] %}
  209.                   {{ '現在送料無料です。'|trans }}
  210.                 {% else %}
  211.                   {{ 'あと「<strong>%price%</strong>」のお買い上げで<strong class="ec-color-red">送料無料</strong>になります。'|trans({ '%price%': least[cartKey]|price })|raw }}
  212.                 {% endif %}
  213.               {% elseif BaseInfo.delivery_free_quantity %}
  214.                 <br/>
  215.                 {% if is_delivery_free[cartKey] %}
  216.                   {{ '現在送料無料です。'|trans }}
  217.                 {% else %}
  218.                   {{ 'あと「<strong>%quantity%個</strong>」のお買い上げで<strong class="ec-color-red">送料無料</strong>になります。'|trans({ '%quantity%': quantity[cartKey]|number_format })|raw }}
  219.                 {% endif %}
  220.               {% endif %}
  221.             </div>
  222.             <div class="ec-cartRole__actions">
  223.               <div class="ec-cartRole__total">
  224.                 {% if hasNegotiatedItems and negotiatedCartTotals[cartKey] is defined and negotiatedCartTotals[cartKey] != Cart.totalPrice %}
  225.                   {{ '合計:'|trans }}<span style="color: #666; text-decoration: line-through; font-size: 0.9em;">{{ Cart.totalPrice|price }}</span><br>
  226.                   <span class="ec-cartRole__totalAmount" style="color: #28a745;">
  227.                     <i class="fa-solid fa-circle-check"></i> {{ negotiatedCartTotals[cartKey]|price }}
  228.                   </span>
  229.                 {% else %}
  230.                   {{ '合計:'|trans }}<span class="ec-cartRole__totalAmount">{{ Cart.totalPrice|price }}</span>
  231.                 {% endif %}
  232.               </div>
  233.               <a class="ec-blockBtn--action"
  234.                  href="{{ path('cart_buystep', {'cart_key':cartKey}) }}">{{ 'レジに進む'|trans }}</a>
  235.               {% if loop.last %}
  236.                 {% if app.session.get('header_footer_layout') == 'plaza' %}
  237.                   <a class="ec-blockBtn--cancel"
  238.                      href="{{ path('plaza_product_list') }}">{{ 'お買い物を続ける'|trans }}</a>
  239.                 {% else %}
  240.                   <a class="ec-blockBtn--cancel" href="{{ path('homepage') }}">{{ 'お買い物を続ける'|trans }}</a>
  241.                 {% endif %}
  242.               {% endif %}
  243.             </div>
  244.           {% endfor %}
  245.         </form>
  246.       {% else %}
  247.         {% for CartIndex,Cart in Carts %}
  248.           {% set cartKey = Cart.cart_key %}
  249.           {% for error in app.session.flashbag.get('eccube.front.cart.' ~ cartKey ~ '.request.error') %}
  250.             <div class="ec-cartRole__error">
  251.               <div class="ec-alert-warning">
  252.                 <div class="ec-alert-warning__icon"><img src="{{ asset('assets/icon/exclamation-white.svg') }}"></div>
  253.                 <div class="ec-alert-warning__text">
  254.                   {{ error|trans|nl2br }}
  255.                 </div>
  256.               </div>
  257.             </div>
  258.           {% endfor %}
  259.         {% endfor %}
  260.         <div class="ec-role">
  261.           <div class="ec-off3Grid">
  262.             <div class="ec-off3Grid__cell">
  263.               <div class="ec-alert-warning">
  264.                 <div class="ec-alert-warning__icon"><img src="{{ asset('assets/icon/exclamation-white.svg') }}"></div>
  265.                 <div class="ec-alert-warning__text">{{ '現在カート内に商品はございません。'|trans }}</div>
  266.               </div>
  267.             </div>
  268.           </div>
  269.         </div>
  270.       {% endif %}
  271.     </div>
  272.   </div>
  273. {% endblock %}