app/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. {#
  9. {% set Carts = get_all_estimate_carts() %}
  10. {% set totalPrice = get_estimate_carts_total_price() %}
  11. #}
  12. {% set totalQuantity = get_estimate_carts_total_quantity() %}
  13. <div class="ec-cartNaviWrap">
  14.     <div class="ec-cartNavi">
  15.         <a href="{{ is_new_reception_stopped() ? url('info') : url('estimate_cart') }}">
  16.             <svg width="17" height="16" viewBox="0 0 17 16" fill="none" xmlns="http://www.w3.org/2000/svg">
  17.                 <path d="M15.4626 3.68038H12.6776C12.5964 2.67778 12.1407 1.74249 11.4012 1.06056C10.6618 0.378621 9.69273 0 8.68684 0C7.68094 0 6.7119 0.378621 5.97245 1.06056C5.233 1.74249 4.77732 2.67778 4.69605 3.68038H1.91105C1.50263 3.68038 1.11093 3.84263 0.822135 4.13142C0.533338 4.42022 0.371094 4.81191 0.371094 5.22034V14.46C0.371094 14.8685 0.533338 15.2602 0.822135 15.549C1.11093 15.8378 1.50263 16 1.91105 16H15.4626C15.871 16 16.2627 15.8378 16.5515 15.549C16.8403 15.2602 17.0026 14.8685 17.0026 14.46V5.22034C17.0026 4.81191 16.8403 4.42022 16.5515 4.13142C16.2627 3.84263 15.871 3.68038 15.4626 3.68038ZM8.68684 1.83244C9.20523 1.83249 9.70624 2.01933 10.0981 2.35871C10.4899 2.6981 10.7464 3.16731 10.8204 3.68038H6.55323C6.62729 3.16731 6.88373 2.6981 7.27558 2.35871C7.66743 2.01933 8.16845 1.83249 8.68684 1.83244ZM15.1546 14.1521H2.21904V5.52833H4.68296V6.4523C4.68296 6.69735 4.78031 6.93236 4.95358 7.10564C5.12686 7.27892 5.36188 7.37627 5.60693 7.37627C5.85198 7.37627 6.087 7.27892 6.26028 7.10564C6.43356 6.93236 6.5309 6.69735 6.5309 6.4523V5.52833H10.8428V6.4523C10.8428 6.69735 10.9401 6.93236 11.1134 7.10564C11.2867 7.27892 11.5217 7.37627 11.7667 7.37627C12.0118 7.37627 12.2468 7.27892 12.4201 7.10564C12.5934 6.93236 12.6907 6.69735 12.6907 6.4523V5.52833H15.1546V14.1521Z" fill="currentColor"/>
  18.             </svg>
  19.             <span class="ec-cartNavi__badge">{{ totalQuantity|number_format }}</span>
  20.         </a>
  21.         {# <div class="ec-cartNavi__label">
  22.             <div class="ec-cartNavi__price">{{ totalPrice|price }}</div>
  23.         </div> #}
  24.     </div>
  25.     {# {% if totalQuantity > 0 %}
  26.         <div class="ec-cartNaviIsset">
  27.             {% for Cart in Carts %}
  28.                 {% for CartItem in Cart.CartItems %}
  29.                     {% set ProductClass = CartItem.ProductClass %}
  30.                     {% set Product = ProductClass.Product %}
  31.                     <div class="ec-cartNaviIsset__cart">
  32.                         <div class="ec-cartNaviIsset__cartImage">
  33.                             <img src="{{ asset(Product.MainListImage|no_image_product, 'save_image') }}" alt="{{ Product.name }}">
  34.                         </div>
  35.                         <div class="ec-cartNaviIsset__cartContent">
  36.                             <div class="ec-cartNaviIsset__cartContentTitle">{{ Product.name }}
  37.                                 <div class="ec-font-size-1">
  38.                                     {% if ProductClass.ClassCategory1 and ProductClass.ClassCategory1.id %}
  39.                                         {{ ProductClass.ClassCategory1.ClassName.name }}:{{ ProductClass.ClassCategory1 }}
  40.                                     {% endif %}
  41.                                     {% if ProductClass.ClassCategory2 and ProductClass.ClassCategory2.id %}
  42.                                         <br>{{ ProductClass.ClassCategory2.ClassName.name }}:{{ ProductClass.ClassCategory2 }}
  43.                                     {% endif %}
  44.                                 </div>
  45.                             </div>
  46.                             <div class="ec-cartNaviIsset__cartContentPrice">
  47.                                 {{ CartItem.price|price }}
  48.                                 <div class="ec-cartNaviIsset__cartContentTax">{{ '税込'|trans }}</div>
  49.                             </div>
  50.                             <div class="ec-cartNaviIsset__cartContentNumber">{{ '数量'|trans }} {{ CartItem.quantity|number_format }}</div>
  51.                         </div>
  52.                     </div>
  53.                 {% endfor %}
  54.             {% endfor %}
  55.             <div class="ec-cartNaviIsset__action">
  56.                 <a class="ec-blockBtn--action" href="{{ url('cart') }}">{{ 'カートへ進む'|trans }}</a>
  57.                 <a class="ec-blockBtn ec-cartNavi--cancel">{{ 'キャンセル'|trans }}</a>
  58.             </div>
  59.         </div>
  60.     {% else %}
  61.         <div class="ec-cartNaviNull">
  62.             <div class="ec-cartNaviNull__message">
  63.                 <p>{{ '現在カート内に商品はございません。'|trans }}</p>
  64.             </div>
  65.         </div>
  66.     {% endif %} #}
  67. </div>