custom/plugins/b2bsellerscore/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 page_checkout_cart_action_proceed %}
  3.     {% if employee_permission(['order']) %}
  4.         {{ parent() }}
  5.     {% endif %}
  6. {% endblock %}
  7. {% block page_checkout_aside_actions %}
  8.     {{ parent() }}
  9.     {% block page_checkout_cart_action_b2b_express_checkout %}
  10.         {% if context.extensions.b2bPlatformContext %}
  11.             {% set b2bPlatformConfig = context.extensions.b2bPlatformContext.config %}
  12.             {% set expressCheckoutSetting = b2bPlatformConfig.expressCheckoutSetting %}
  13.             {% if b2bPlatformConfig.enabledExpressCheckout and expressCheckoutSetting.active and expressCheckoutSetting.paymentMethod and expressCheckoutSetting.billingAddress and expressCheckoutSetting.shippingAddress %}
  14.                 <div class="checkout-aside-action">
  15.                     {% block page_checkout_cart_action_b2b_express_checkout_button %}
  16.                         <button
  17.                                 data-url="{{ path('frontend.b2b_express_checkout.index') }}"
  18.                                 class="btn btn-block express-checkout-btn btn-primary"
  19.                                 title="{{ 'b2bPlatform.expressCheckout.buttonLabel'|trans }}"
  20.                                 data-express-checkout-modal="true"
  21.                                 data-toggle="modal"
  22.                                 data-modal-class="express-checkout-modal">
  23.                             {{ 'b2bPlatform.expressCheckout.buttonLabel'|trans }}
  24.                         </button>
  25.                     {% endblock %}
  26.                 </div>
  27.             {% endif %}
  28.         {% endif %}
  29.     {% endblock %}
  30.     {% if b2bPlatformConfig.enableCheckoutClearField %}
  31.         {% block page_checkout_cart_action_b2b_clear_basket %}
  32.             <div class="checkout-aside-action">
  33.                 {% block page_checkout_cart_action_b2b_clear_basket_form %}
  34.                     <form action="{{ path('frontend.checkout.cart.delete') }}" method="post"
  35.                           data-form-csrf-handler="true">
  36.                         {% block page_checkout_cart_action_b2b_clear_basket_form_csrf %}
  37.                             {{ sw_csrf('frontend.checkout.cart.delete') }}
  38.                         {% endblock %}
  39.                         {% block page_checkout_cart_action_b2b_clear_basket_form_redirect %}
  40.                             <input type="hidden"
  41.                                    name="redirectTo"
  42.                                    value="frontend.checkout.cart.page">
  43.                         {% endblock %}
  44.                         {% block page_checkout_cart_action_b2b_clear_basket_form_submit %}
  45.                             <button type="submit"
  46.                                     title="{{ "checkout.clearBasket"|trans|striptags }}"
  47.                                     class="btn btn-light btn-block">{{ "checkout.clearBasket"|trans|striptags }}
  48.                             </button>
  49.                         {% endblock %}
  50.                     </form>
  51.                 {% endblock %}
  52.             </div>
  53.         {% endblock %}
  54.     {% endif %}
  55. {% endblock %}
  56. {% block page_checkout_cart_add_product_and_shipping %}
  57.     {{ parent() }}
  58.     {% set paymentMethod = context.paymentMethod %}
  59.     {% if paymentMethod.handlerIdentifier is same as ("B2bSellersCore\\Components\\Checkout\\Payment\\PaymentConditionPayment") %}
  60.         {% sw_include '@B2bSellersCore/storefront/page/checkout/includes/payment-condition.html.twig' %}
  61.     {% endif %}
  62. {% endblock %}
  63. {% block page_checkout_cart_table_items %}
  64.     {{ parent() }}
  65.     {% if b2b_feature_enabled('B2bBonusProgram') %}
  66.         {% sw_include '@B2bSellersCore/storefront/page/checkout/includes/cart-bonus-form.twig' with {
  67.             redirectTo: 'frontend.checkout.cart.page'
  68.         } %}
  69.     {% endif %}
  70. {% endblock %}
  71. {% block page_checkout_cart_shipping_costs %}
  72.     {% if b2b_feature_enabled('B2bProductLists') %}
  73.         {% if b2bProductListConfig.showProductListsFunction %}
  74.             {% set addedProducts = [] %}
  75.             {% set productLists = page.extensions.B2bProductLists.productLists %}
  76.             {% for lineItem in page.cart.lineitems %}
  77.                 {% if lineItem.type == 'product' %}
  78.                     {% set addedProducts = addedProducts|merge([{productId: lineItem.referencedId, quantity: lineItem.quantity}]) %}
  79.                 {% endif %}
  80.             {% endfor %}
  81.             {% if addedProducts|length > 0 %}
  82.                 <div class="col-md-8 cart-shipping-costs-container">
  83.                     <div class="row">
  84.                         <div class="col-12 col-md-6">
  85.                             <form name="precalc"
  86.                                   method="post"
  87.                                   action="{{ path('frontend.checkout.configure') }}"
  88.                                   data-form-auto-submit="true">
  89.                                 {% block page_checkout_cart_shipping_costs_csrf %}
  90.                                     {{ parent() }}
  91.                                 {% endblock %}
  92.                                 {% block page_checkout_cart_shipping_costs_trigger %}
  93.                                     {{ parent() }}
  94.                                 {% endblock %}
  95.                                 {% block page_checkout_cart_shipping_costs_form_group %}
  96.                                     {{ parent() }}
  97.                                 {% endblock %}
  98.                             </form>
  99.                         </div>
  100.                         <div class="col-12 col-md-6 text-md-right pt-3 pt-md-0">
  101.                             {% block page_checkout_cart_product_list_add_items %}
  102.                                 {% sw_include '@B2bSellersCore/storefront/page/checkout/cart/cart-product-list-add-items.html.twig' %}
  103.                             {% endblock %}
  104.                         </div>
  105.                     </div>
  106.                 </div>
  107.             {% else %}
  108.                 {{ parent() }}
  109.             {% endif %}
  110.         {% else %}
  111.             {{ parent() }}
  112.         {% endif %}
  113.     {% else %}
  114.         {{ parent() }}
  115.     {% endif %}
  116. {% endblock %}