{% sw_extends '@Storefront/storefront/page/checkout/cart/index.html.twig' %}
{% block base_head %}
{% sw_include '@Storefront/storefront/page/checkout/cart/meta.html.twig' %}
{% endblock %}
{% block page_checkout_address_products %}{% endblock %}
{% block page_checkout_container %}
{% if page.cart.lineItems.count is same as(0) %}
{% sw_include '@Storefront/storefront/utilities/alert.html.twig' with {
type: "info",
content: "checkout.cartEmpty"|trans|sw_sanitize
} %}
{% set messages = app.flashes %}
{% if messages.danger|length > 0 %}
<div class="flashbags">
{% sw_include '@Storefront/storefront/utilities/alert.html.twig' with { type: 'danger', list: messages.danger } %}
</div>
{% endif %}
{% else %}
{{ parent() }}
{% endif %}
{% endblock %}
{% block page_checkout_main_content %}
{% block page_checkout_cart %}
{% block page_checkout_cart_header %}
{% set cartCount = 0 %}
{% for item in page.cart.lineItems.elements %}
{% set cartCount = cartCount + item.quantity %}
{% endfor %}
<h1 class="cart-main-header mb-8 mt-4 lg:mb-10">
{{ "checkout.cartHeader"|trans|sw_sanitize }}
<span class="cart-number-of-items text-grey-600 font-medium text-xs ml-2 md:text-base md:ml-4">
{{ cartCount }} {% if cartCount == 1 %}{{ "pages.cart.cartItem"|trans|sw_sanitize }}{% else %}{{ "pages.cart.cartItems"|trans|sw_sanitize }}{% endif %}
</span>
</h1>
{% endblock %}
{% block page_checkout_cart_product_table %}
<div class="card checkout-product-table">
<div class="card-body grid grid-gap-6 md:grid-gap-10">
{% block page_checkout_cart_table_header %}
{% sw_include '@Storefront/storefront/page/checkout/cart/cart-product-header.html.twig' %}
{% endblock %}
{% block page_checkout_cart_table_items %}
{% for lineItem in page.cart.lineItems %}
{% block page_checkout_cart_table_item %}
{% block page_checkout_item %}
{% sw_include '@Storefront/storefront/page/checkout/checkout-item.html.twig' %}
{% endblock %}
{% endblock %}
{% endfor %}
{% endblock %}
</div>
</div>
{% endblock %}
{% block page_checkout_cart_hidden_line_items_information %}
{% sw_include '@Storefront/storefront/component/checkout/hidden-line-items-information.html.twig' with {
cart: page.cart,
lineItems: page.cart.lineItems
} %}
{% endblock %}
{% block page_checkout_cart_add_product_and_shipping %}
{# Removed quick ATC via product number && quick shippingcost calculator #}
{% endblock %}
{% endblock %}
{% endblock %}
{% block page_checkout_aside_actions %}
<div class="checkout-aside-action">
{% block page_checkout_cart_add_promotion %}
<form action="{{ path('frontend.checkout.promotion.add') }}"
class="cart-add-promotion"
data-form-csrf-handler="true"
method="post">
{% block page_checkout_cart_add_promotion_csrf %}
{{ sw_csrf('frontend.checkout.promotion.add') }}
{% endblock %}
{% block page_checkout_cart_add_promotion_forward %}
<input type="hidden"
name="redirectTo"
value="frontend.checkout.cart.page">
{% endblock %}
{% block page_checkout_cart_add_promotion_input_group %}
<div class="input-group checkout-aside-add-code"
x-data='{codeValue: "", show: false}'>
{% block page_checkout_cart_add_promotion_label %}
<label class="flex justify-between" for="addPromotionInput" @click="show = !show">
{{ "checkout.addPromotionLabel"|trans|sw_sanitize }}
<div class="w-5 h-5" :class="show ? 'rotate-180' : 'rotate-0'">
{% sw_icon 'chevron-down' style{'pack': 'hero', 'class': 'stroke w-5 h-5'} %}
</div>
</label>
{% endblock %}
{% block page_checkout_cart_add_promotion_input %}
<input type="text"
name="code"
class="form-control bg-transparent mt-2"
id="addPromotionInput"
placeholder="{{ "checkout.addPromotionPlaceholder"|trans|striptags }}"
aria-label="{{ "checkout.addPromotionLabel"|trans|striptags }}"
aria-describedby="addPromotion"
required="required"
x-model="codeValue"
x-show="show"
>
{% endblock %}
{% block page_checkout_cart_add_promotion_submit %}
<div class="input-group-append mt-2 opacity-20 transition"
:class="codeValue.length > 0 ? 'block opacity-100' : 'hidden'"
x-show="show">
<button class="btn btn-primary w-full"
type="submit"
id="addPromotion">
{{ "checkout.addPromotionLabel"|trans|sw_sanitize }}
</button>
</div>
{% endblock %}
</div>
{% endblock %}
</form>
{% endblock %}
</div>
{% block page_checkout_cart_action_proceed %}
{% if page.cart %}
{% set summary = page.cart %}
{% elseif page.order %}
{% set summary = page.order %}
{% endif %}
<div class="checkout-aside-action fixed left-0 bottom-0 w-full bg-white shadow-2xl z-50">
<div class="boxed-layout py-4 flex grid-gap-4 justify-between">
<div class="total-price">
<div class="total-price-label">Te betalen:</div>
<div class="total-price-value text-2xl font-medium text-black">{{ summary.price.rawTotal }}</div>
</div>
<a href="{{ path('frontend.checkout.confirm.page') }}"
class="btn btn-primary begin-checkout-btn"
title="{{ "checkout.proceedLink"|trans|striptags }}">
{% sw_icon 'bag' %}
{{ "checkout.proceedLink"|trans|sw_sanitize }}
</a>
</div>
</div>
{% endblock %}
{% endblock %}
{% block base_footer %}
<footer class="footer-main bg-blue-1000">
{% sw_include '@Storefront/storefront/layout/footer/footer.html.twig' %}
</footer>
{% endblock %}