src/Eccube/Resource/template/default/Block/cart.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. {% set Carts = get_all_carts() %}
  9. {% set totalPrice = get_carts_total_price() %}
  10. {% set totalQuantity = get_carts_total_quantity() %}
  11. <div class="ec-cartNaviWrap">
  12.     <div class="ec-cartNavi">
  13.         <img src="{{ asset('assets/img/icon03.png', 'user_data') }}" alt="" width="23">
  14.         <div class="ec-cartNavi__label">
  15.             <div class="ec-cartNavi__price">{{ totalPrice|price }}</div>
  16.         </div>
  17.     </div>
  18.     {% if totalQuantity > 0 %}
  19.         <div class="ec-cartNaviIsset">
  20.             {% for Cart in Carts %}
  21.                 {% for CartItem in Cart.CartItems %}
  22.                     {% set ProductClass = CartItem.ProductClass %}
  23.                     {% set Product = ProductClass.Product %}
  24.                     <a href="{{ url('product_detail', {'id': Product.id }) }}">
  25.                     <div class="ec-cartNaviIsset__cart">
  26.                         <div>
  27.                             <div class="ec-cartNaviIsset__cartContentTitle cart_name" data-id="{{ProductClass.ClassCategory1.id}}">{{ Product.name }} {% if ProductClass.ClassCategory1 and ProductClass.ClassCategory1.id %}{{ ProductClass.ClassCategory1 }}{% endif %}</div>
  28.                             <div class="ec-cartNaviIsset__cartContentPrice">
  29.                                 {{ CartItem.price|price }}
  30.                                 <div class="ec-cartNaviIsset__cartContentTax">{{ '税込'|trans }}</div>
  31.                             </div>
  32.                         </div>
  33.                     </div>
  34.                     </a>
  35.                 {% endfor %}
  36.             {% endfor %}
  37.             <div class="ec-cartNaviIsset__action">
  38.                 <a class="ec-blockBtn--action" href="{{ url('cart') }}">{{ 'カートへ進む'|trans }}</a>
  39.                 <a class="ec-blockBtn ec-cartNavi--cancel">{{ 'キャンセル'|trans }}</a>
  40.             </div>
  41.         </div>
  42.     {% else %}
  43.         <div class="ec-cartNaviNull">
  44.             <div class="ec-cartNaviNull__message">
  45.                 <p>{{ '現在カート内に商品はございません。'|trans }}</p>
  46.             </div>
  47.         </div>
  48.     {% endif %}
  49. </div>