app/template/magamar/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 data-device="pc" class="ec-cartNaviWrap device-only">
  12.     <div class="ec-cartNavi">
  13.         <div class="cart-menu__item menu-price">
  14.             <span class="menu-item__number menu-itemicon">{{ totalQuantity|number_format }}</span>
  15.             <span class="menu-item__price">{{ totalPrice|price }}</span>
  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.                     <div class="ec-cartNaviIsset__cart">
  25.                         <div class="ec-cartNaviIsset__cartContent">
  26.                             <div class="ec-cartNaviIsset__cartContentTitle">{{ Product.name }}</div>
  27.                             <div class="ec-cartNaviIsset__cartContentDetail">
  28.                                 <div class="ec-cartNaviIsset__cartContentPrice">{{ CartItem.price|price }}<span class="ec-cartNaviIsset__cartContentTax">{{ '(税込)'|trans }}</span></div>
  29.                                 <div class="ec-cartNaviIsset__cartContentNumber">{{ '数量:'|trans }} {{ CartItem.quantity|number_format }}</div>
  30.                             </div>
  31.                         </div>
  32.                     </div>
  33.                 {% endfor %}
  34.             {% endfor %}
  35.             <div class="ec-cartNaviIsset__action">
  36.                 <a class="ec-blockBtn--action" href="{{ url('cart') }}">{{ '注文へ進む'|trans }}</a>
  37.                 <a class="ec-blockBtn ec-cartNavi--cancel">{{ 'キャンセル'|trans }}</a>
  38.             </div>
  39.         </div>
  40.     {% else %}
  41.         <div class="ec-cartNaviNull">
  42.             <div class="ec-cartNaviNull__message">
  43.                 <p>{{ 'カゴに商品は入っていません'|trans }}</p>
  44.             </div>
  45.         </div>
  46.     {% endif %}
  47. </div>
  48. <div data-device="mobile" class="ec-cartNaviWrap device-only">
  49.     <div class="ec-cartNavi">
  50.         <div class="cart-menu__item menu-basket">
  51.             <a href="{{ url('cart') }}">
  52.                 <img src="{{ asset('assets/img/common/icon_basket_gray.svg') }}">
  53.                 {% if totalQuantity > 0 %}
  54.                 <span class="menu-item__number">{{ totalQuantity|number_format }}</span>
  55.                 {% endif %}
  56.             </a>
  57.         </div>
  58.     </div>
  59. </div>