custom/static-plugins/NdTheme/src/Resources/views/storefront/page/checkout/cart/index.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/page/checkout/cart/index.html.twig' %}
  2. {% block base_head %}
  3.     {% sw_include '@Storefront/storefront/page/checkout/cart/meta.html.twig' %}
  4. {% endblock %}
  5. {% block page_checkout_address_products %}{% endblock %}
  6. {% block page_checkout_container %}
  7.     {% if page.cart.lineItems.count is same as(0) %}
  8.         {% sw_include '@Storefront/storefront/utilities/alert.html.twig' with {
  9.             type: "info",
  10.             content: "checkout.cartEmpty"|trans|sw_sanitize
  11.         } %}
  12.         {% set messages = app.flashes %}
  13.         {% if messages.danger|length > 0 %}
  14.             <div class="flashbags">
  15.                 {% sw_include '@Storefront/storefront/utilities/alert.html.twig' with { type: 'danger', list: messages.danger } %}
  16.             </div>
  17.         {% endif %}
  18.     {% else %}
  19.         {{ parent() }}
  20.     {% endif %}
  21. {% endblock %}
  22. {% block page_checkout_main_content %}
  23.     {% block page_checkout_cart %}
  24.         {% block page_checkout_cart_header %}
  25.             {% set cartCount = 0 %}
  26.             {% for item in page.cart.lineItems.elements %}
  27.                 {% set cartCount = cartCount + item.quantity %}
  28.             {% endfor %}
  29.             <h1 class="cart-main-header mb-8 mt-4 lg:mb-10">
  30.                 {{ "checkout.cartHeader"|trans|sw_sanitize }}
  31.                 <span class="cart-number-of-items text-grey-600 font-medium text-xs ml-2 md:text-base md:ml-4">
  32.                  {{ cartCount }} {% if cartCount == 1 %}{{ "pages.cart.cartItem"|trans|sw_sanitize }}{% else %}{{ "pages.cart.cartItems"|trans|sw_sanitize }}{% endif %}
  33.                 </span>
  34.             </h1>
  35.         {% endblock %}
  36.         {% block page_checkout_cart_product_table %}
  37.             <div class="card checkout-product-table">
  38.                 <div class="card-body grid grid-gap-6 md:grid-gap-10">
  39.                     {% block page_checkout_cart_table_header %}
  40.                         {% sw_include '@Storefront/storefront/page/checkout/cart/cart-product-header.html.twig' %}
  41.                     {% endblock %}
  42.                     {% block page_checkout_cart_table_items %}
  43.                         {% for lineItem in page.cart.lineItems %}
  44.                             {% block page_checkout_cart_table_item %}
  45.                                 {% block page_checkout_item %}
  46.                                     {% sw_include '@Storefront/storefront/page/checkout/checkout-item.html.twig' %}
  47.                                 {% endblock %}
  48.                             {% endblock %}
  49.                         {% endfor %}
  50.                     {% endblock %}
  51.                 </div>
  52.             </div>
  53.         {% endblock %}
  54.         {% block page_checkout_cart_hidden_line_items_information %}
  55.             {% sw_include '@Storefront/storefront/component/checkout/hidden-line-items-information.html.twig' with {
  56.                 cart: page.cart,
  57.                 lineItems: page.cart.lineItems
  58.             } %}
  59.         {% endblock %}
  60.         {% block page_checkout_cart_add_product_and_shipping %}
  61.             {# Removed quick ATC via product number && quick shippingcost calculator #}
  62.         {% endblock %}
  63.     {% endblock %}
  64. {% endblock %}
  65. {% block page_checkout_aside_actions %}
  66.     <div class="checkout-aside-action">
  67.         {% block page_checkout_cart_add_promotion %}
  68.             <form action="{{ path('frontend.checkout.promotion.add') }}"
  69.                   class="cart-add-promotion"
  70.                   data-form-csrf-handler="true"
  71.                   method="post">
  72.                 {% block page_checkout_cart_add_promotion_csrf %}
  73.                     {{ sw_csrf('frontend.checkout.promotion.add') }}
  74.                 {% endblock %}
  75.                 {% block page_checkout_cart_add_promotion_forward %}
  76.                     <input type="hidden"
  77.                            name="redirectTo"
  78.                            value="frontend.checkout.cart.page">
  79.                 {% endblock %}
  80.                 {% block page_checkout_cart_add_promotion_input_group %}
  81.                     <div class="input-group checkout-aside-add-code"
  82.                          x-data='{codeValue: "", show: false}'>
  83.                         {% block page_checkout_cart_add_promotion_label %}
  84.                             <label class="flex justify-between" for="addPromotionInput" @click="show = !show">
  85.                                 {{ "checkout.addPromotionLabel"|trans|sw_sanitize }}
  86.                                 <div class="w-5 h-5" :class="show ? 'rotate-180' : 'rotate-0'">
  87.                                     {% sw_icon 'chevron-down' style{'pack': 'hero', 'class': 'stroke w-5 h-5'} %}
  88.                                 </div>
  89.                             </label>
  90.                         {% endblock %}
  91.                         {% block page_checkout_cart_add_promotion_input %}
  92.                             <input type="text"
  93.                                    name="code"
  94.                                    class="form-control bg-transparent mt-2"
  95.                                    id="addPromotionInput"
  96.                                    placeholder="{{ "checkout.addPromotionPlaceholder"|trans|striptags }}"
  97.                                    aria-label="{{ "checkout.addPromotionLabel"|trans|striptags }}"
  98.                                    aria-describedby="addPromotion"
  99.                                    required="required"
  100.                                    x-model="codeValue"
  101.                                    x-show="show"
  102.                             >
  103.                         {% endblock %}
  104.                         {% block page_checkout_cart_add_promotion_submit %}
  105.                             <div class="input-group-append mt-2 opacity-20 transition"
  106.                                  :class="codeValue.length > 0 ? 'block opacity-100' : 'hidden'"
  107.                                  x-show="show">
  108.                                 <button class="btn btn-primary w-full"
  109.                                         type="submit"
  110.                                         id="addPromotion">
  111.                                     {{ "checkout.addPromotionLabel"|trans|sw_sanitize }}
  112.                                 </button>
  113.                             </div>
  114.                         {% endblock %}
  115.                     </div>
  116.                 {% endblock %}
  117.             </form>
  118.         {% endblock %}
  119.     </div>
  120.     {% block page_checkout_cart_action_proceed %}
  121.         {% if page.cart %}
  122.             {% set summary = page.cart %}
  123.         {% elseif page.order %}
  124.             {% set summary = page.order %}
  125.         {% endif %}
  126.         <div class="checkout-aside-action fixed left-0 bottom-0 w-full bg-white shadow-2xl z-50">
  127.             <div class="boxed-layout py-4 flex grid-gap-4 justify-between">
  128.                 <div class="total-price">
  129.                     <div class="total-price-label">Te betalen:</div>
  130.                     <div class="total-price-value text-2xl font-medium text-black">{{ summary.price.rawTotal }}</div>
  131.                 </div>
  132.                 <a href="{{ path('frontend.checkout.confirm.page') }}"
  133.                    class="btn btn-primary begin-checkout-btn"
  134.                    title="{{ "checkout.proceedLink"|trans|striptags }}">
  135.                     {% sw_icon 'bag' %}
  136.                     {{ "checkout.proceedLink"|trans|sw_sanitize }}
  137.                 </a>
  138.             </div>
  139.         </div>
  140.     {% endblock %}
  141. {% endblock %}
  142. {% block base_footer %}
  143.     <footer class="footer-main bg-blue-1000">
  144.         {% sw_include '@Storefront/storefront/layout/footer/footer.html.twig' %}
  145.     </footer>
  146. {% endblock %}