{% sw_extends '@Storefront/storefront/page/checkout/cart/index.html.twig' %}
{% block page_checkout_cart_action_proceed %}
{% if employee_permission(['order']) %}
{{ parent() }}
{% endif %}
{% endblock %}
{% block page_checkout_aside_actions %}
{{ parent() }}
{% block page_checkout_cart_action_b2b_express_checkout %}
{% if context.extensions.b2bPlatformContext %}
{% set b2bPlatformConfig = context.extensions.b2bPlatformContext.config %}
{% set expressCheckoutSetting = b2bPlatformConfig.expressCheckoutSetting %}
{% if b2bPlatformConfig.enabledExpressCheckout and expressCheckoutSetting.active and expressCheckoutSetting.paymentMethod and expressCheckoutSetting.billingAddress and expressCheckoutSetting.shippingAddress %}
<div class="checkout-aside-action">
{% block page_checkout_cart_action_b2b_express_checkout_button %}
<button
data-url="{{ path('frontend.b2b_express_checkout.index') }}"
class="btn btn-block express-checkout-btn btn-primary"
title="{{ 'b2bPlatform.expressCheckout.buttonLabel'|trans }}"
data-express-checkout-modal="true"
data-toggle="modal"
data-modal-class="express-checkout-modal">
{{ 'b2bPlatform.expressCheckout.buttonLabel'|trans }}
</button>
{% endblock %}
</div>
{% endif %}
{% endif %}
{% endblock %}
{% if b2bPlatformConfig.enableCheckoutClearField %}
{% block page_checkout_cart_action_b2b_clear_basket %}
<div class="checkout-aside-action">
{% block page_checkout_cart_action_b2b_clear_basket_form %}
<form action="{{ path('frontend.checkout.cart.delete') }}" method="post"
data-form-csrf-handler="true">
{% block page_checkout_cart_action_b2b_clear_basket_form_csrf %}
{{ sw_csrf('frontend.checkout.cart.delete') }}
{% endblock %}
{% block page_checkout_cart_action_b2b_clear_basket_form_redirect %}
<input type="hidden"
name="redirectTo"
value="frontend.checkout.cart.page">
{% endblock %}
{% block page_checkout_cart_action_b2b_clear_basket_form_submit %}
<button type="submit"
title="{{ "checkout.clearBasket"|trans|striptags }}"
class="btn btn-light btn-block">{{ "checkout.clearBasket"|trans|striptags }}
</button>
{% endblock %}
</form>
{% endblock %}
</div>
{% endblock %}
{% endif %}
{% endblock %}
{% block page_checkout_cart_add_product_and_shipping %}
{{ parent() }}
{% set paymentMethod = context.paymentMethod %}
{% if paymentMethod.handlerIdentifier is same as ("B2bSellersCore\\Components\\Checkout\\Payment\\PaymentConditionPayment") %}
{% sw_include '@B2bSellersCore/storefront/page/checkout/includes/payment-condition.html.twig' %}
{% endif %}
{% endblock %}
{% block page_checkout_cart_table_items %}
{{ parent() }}
{% if b2b_feature_enabled('B2bBonusProgram') %}
{% sw_include '@B2bSellersCore/storefront/page/checkout/includes/cart-bonus-form.twig' with {
redirectTo: 'frontend.checkout.cart.page'
} %}
{% endif %}
{% endblock %}
{% block page_checkout_cart_shipping_costs %}
{% if b2b_feature_enabled('B2bProductLists') %}
{% if b2bProductListConfig.showProductListsFunction %}
{% set addedProducts = [] %}
{% set productLists = page.extensions.B2bProductLists.productLists %}
{% for lineItem in page.cart.lineitems %}
{% if lineItem.type == 'product' %}
{% set addedProducts = addedProducts|merge([{productId: lineItem.referencedId, quantity: lineItem.quantity}]) %}
{% endif %}
{% endfor %}
{% if addedProducts|length > 0 %}
<div class="col-md-8 cart-shipping-costs-container">
<div class="row">
<div class="col-12 col-md-6">
<form name="precalc"
method="post"
action="{{ path('frontend.checkout.configure') }}"
data-form-auto-submit="true">
{% block page_checkout_cart_shipping_costs_csrf %}
{{ parent() }}
{% endblock %}
{% block page_checkout_cart_shipping_costs_trigger %}
{{ parent() }}
{% endblock %}
{% block page_checkout_cart_shipping_costs_form_group %}
{{ parent() }}
{% endblock %}
</form>
</div>
<div class="col-12 col-md-6 text-md-right pt-3 pt-md-0">
{% block page_checkout_cart_product_list_add_items %}
{% sw_include '@B2bSellersCore/storefront/page/checkout/cart/cart-product-list-add-items.html.twig' %}
{% endblock %}
</div>
</div>
</div>
{% else %}
{{ parent() }}
{% endif %}
{% else %}
{{ parent() }}
{% endif %}
{% else %}
{{ parent() }}
{% endif %}
{% endblock %}