custom/plugins/HyBuys/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_container %}
  6.     {% if page.cart.lineItems.count is same as(0) %}
  7.         {% sw_include '@Storefront/storefront/utilities/alert.html.twig' with {
  8.             type: "info",
  9.             content: "checkout.cartEmpty"|trans|sw_sanitize
  10.         } %}
  11.         {% set messages = app.flashes %}
  12.         {% if messages.danger|length > 0 %}
  13.             <div class="flashbags">
  14.                 {% sw_include '@Storefront/storefront/utilities/alert.html.twig' with { type: 'danger', list: messages.danger } %}
  15.             </div>
  16.         {% endif %}
  17.     {% else %}
  18.         {{ parent() }}
  19.     {% endif %}
  20. {% endblock %}
  21. {% block page_checkout_main_content %}
  22.     {% block page_checkout_cart %}
  23.         {% block page_checkout_cart_product_table %}
  24.             <ul class="cart_items">
  25.                 {% block page_checkout_cart_table_header %}
  26.                     {# @deprecated tag:v6.5.0 - Template `cart-product-header.html.twig` is deprecated. Use `storefront/component/checkout/cart-header.html.twig` instead. #}
  27. {#                    {% sw_include '@Storefront/storefront/component/checkout/cart-header.html.twig' %}#}
  28.                 {% endblock %}
  29.                 {% block page_checkout_cart_table_items %}
  30.                     {% for lineItem in page.cart.lineItems %}
  31.                             {% block page_checkout_cart_table_item %}
  32.                                 {% block page_checkout_item %}
  33.                                     {# @deprecated tag:v6.5.0 - Template `checkout-item.html.twig` is deprecated. Use `storefront/component/line-item/line-item.html.twig` instead. #}
  34.                                     {% sw_include '@Storefront/storefront/component/line-item/line-item.html.twig' %}
  35.                                 {% endblock %}
  36.                             {% endblock %}
  37.                     {% endfor %}
  38.                 {% endblock %}
  39.             </ul>
  40.         {% endblock %}
  41.         {% block page_checkout_cart_hidden_line_items_information %}
  42.             {% sw_include '@Storefront/storefront/component/checkout/hidden-line-items-information.html.twig' with {
  43.                 cart: page.cart,
  44.                 lineItems: page.cart.lineItems
  45.             } %}
  46.         {% endblock %}
  47.         {% block page_checkout_cart_add_product_and_shipping %}
  48.             <div class="row">
  49.                 {% block page_checkout_cart_add_product %}
  50.                     <div class="col-md-4 cart-add-product-container">
  51.                         <form action="{{ path('frontend.checkout.product.add-by-number') }}"
  52.                               data-form-csrf-handler="true"
  53.                               class="cart-add-product"
  54.                               method="post">
  55.                             {% block page_checkout_cart_add_product_csrf %}
  56.                                 {{ sw_csrf('frontend.checkout.product.add-by-number') }}
  57.                             {% endblock %}
  58.                             {% block page_checkout_cart_add_product_redirect %}
  59.                                 <input type="hidden"
  60.                                        name="redirectTo"
  61.                                        value="frontend.checkout.cart.page">
  62.                             {% endblock %}
  63.                             {% block page_checkout_cart_add_product_input_group %}
  64.                                 <div class="input-group">
  65.                                     {% block page_checkout_cart_add_product_label %}
  66.                                         <label class="{{ visuallyHiddenClass }}" for="addProductInput">
  67.                                             {{ "checkout.addProductLabel"|trans|sw_sanitize }}
  68.                                         </label>
  69.                                     {% endblock %}
  70.                                     {% block page_checkout_cart_add_product_input %}
  71.                                         <input type="text"
  72.                                                name="number"
  73.                                                class="form-control"
  74.                                                id="addProductInput"
  75.                                                placeholder="{{ "checkout.addProductPlaceholder"|trans|striptags }}"
  76.                                                aria-label="{{ "checkout.addProductLabel"|trans|striptags }}"
  77.                                                aria-describedby="addProductButton"
  78.                                                required="required">
  79.                                     {% endblock %}
  80.                                     {% block page_checkout_cart_add_product_submit %}
  81.                                         {# @deprecated tag:v6.5.0 - Bootstrap v5 removes `input-group-append` wrapper and uses elements as direct childs of `input-group` #}
  82.                                         {% if feature('v6.5.0.0') %}
  83.                                             <button class="btn btn-secondary"
  84.                                                     type="submit"
  85.                                                     id="addProductButton">
  86.                                                 {% sw_icon 'checkmark' %}
  87.                                             </button>
  88.                                         {% else %}
  89.                                             <div class="input-group-append">
  90.                                                 <button class="btn btn-secondary"
  91.                                                         type="submit"
  92.                                                         id="addProductButton">
  93.                                                     {% sw_icon 'checkmark' %}
  94.                                                 </button>
  95.                                             </div>
  96.                                         {% endif %}
  97.                                     {% endblock %}
  98.                                 </div>
  99.                             {% endblock %}
  100.                         </form>
  101.                     </div>
  102.                 {% endblock %}
  103.                 {% block page_checkout_cart_shipping_costs %}
  104.                     <div class="col-md-8 cart-shipping-costs-container">
  105.                         <form name="precalc"
  106.                               method="post"
  107.                               action="{{ path('frontend.checkout.configure') }}"
  108.                               data-form-auto-submit="true">
  109.                             {% block page_checkout_cart_shipping_costs_csrf %}
  110.                                 {{ sw_csrf('frontend.checkout.configure') }}
  111.                             {% endblock %}
  112.                             {% block page_checkout_cart_shipping_costs_trigger %}
  113.                                 <a class="btn btn-link cart-shipping-costs-btn"
  114.                                 {{ dataBsToggleAttr }}="collapse"
  115.                                 href="#collapseShippingCost"
  116.                                 role="button"
  117.                                 aria-expanded="false"
  118.                                 aria-controls="collapseExample">
  119.                                 {{ "checkout.shippingCosts"|trans|sw_sanitize }}
  120.                                 {% block page_checkout_cart_shipping_costs_trigger_icon %}
  121.                                     {% sw_icon 'arrow-medium-right' style { 'pack':'solid', 'size': 'sm' } %}
  122.                                 {% endblock %}
  123.                                 </a>
  124.                             {% endblock %}
  125.                             {% block page_checkout_cart_shipping_costs_form_group %}
  126.                                 <div class="collapse" id="collapseShippingCost">
  127.                                     {% block page_checkout_cart_shipping_costs_form_group_country %}
  128.                                         {% if not context.customer %}
  129.                                             <div class="form-group">
  130.                                                 <label
  131.                                                     for="countryId">{{ "checkout.shippingCountry"|trans|sw_sanitize }}</label>
  132.                                                 <select class="{{ formSelectClass }}" type="text" id="countryId"
  133.                                                         name="countryId">
  134.                                                     {% for country in page.countries %}
  135.                                                         <option value="{{ country.id }}"
  136.                                                             {{ country.id == context.shippingLocation.country.id ? 'selected="selected"' : '' }}>
  137.                                                             {{ country.translated.name }}
  138.                                                         </option>
  139.                                                     {% endfor %}
  140.                                                 </select>
  141.                                             </div>
  142.                                         {% endif %}
  143.                                     {% endblock %}
  144.                                     {% block page_checkout_cart_shipping_costs_form_group_payment_method %}
  145.                                         <div class="form-group">
  146.                                             <label
  147.                                                 for="paymentMethodId">{{ "checkout.paymentMethod"|trans|sw_sanitize }}</label>
  148.                                             <select class="{{ formSelectClass }}" type="text" id="paymentMethodId"
  149.                                                     name="paymentMethodId">
  150.                                                 {% if context.paymentMethod.id not in page.paymentMethods.ids %}
  151.                                                     <option value="{{ context.paymentMethod.id }}"
  152.                                                             selected="selected"
  153.                                                             disabled="disabled">
  154.                                                         {{ context.paymentMethod.translated.name }} {{ "checkout.notAvailableSuffix"|trans|sw_sanitize }}
  155.                                                     </option>
  156.                                                 {% endif %}
  157.                                                 {% for payment in page.paymentMethods %}
  158.                                                     <option value="{{ payment.id }}"
  159.                                                         {% if payment.id == context.paymentMethod.id %} selected="selected"{% endif %}>
  160.                                                         {{ payment.translated.name }}
  161.                                                     </option>
  162.                                                 {% endfor %}
  163.                                             </select>
  164.                                         </div>
  165.                                     {% endblock %}
  166.                                     {% block page_checkout_cart_shipping_costs_form_group_shipping_method %}
  167.                                         <div class="form-group">
  168.                                             <label
  169.                                                 for="shippingMethodId">{{ "checkout.shippingMethod"|trans|sw_sanitize }}</label>
  170.                                             <select class="{{ formSelectClass }}" type="text" id="shippingMethodId"
  171.                                                     name="shippingMethodId">
  172.                                                 {% if context.shippingMethod.id not in page.shippingMethods.ids %}
  173.                                                     <option value="{{ context.shippingMethod.id }}"
  174.                                                             selected="selected"
  175.                                                             disabled="disabled">
  176.                                                         {{ context.shippingMethod.translated.name }} {{ "checkout.notAvailableSuffix"|trans|sw_sanitize }}
  177.                                                     </option>
  178.                                                 {% endif %}
  179.                                                 {% for shipping in page.shippingMethods %}
  180.                                                     <option value="{{ shipping.id }}"
  181.                                                         {% if shipping.id == context.shippingMethod.id %} selected="selected"{% endif %}>
  182.                                                         {{ shipping.translated.name }}
  183.                                                     </option>
  184.                                                 {% endfor %}
  185.                                             </select>
  186.                                         </div>
  187.                                     {% endblock %}
  188.                                     <input type="hidden" name="redirectTo" value="frontend.checkout.cart.page">
  189.                                 </div>
  190.                             {% endblock %}
  191.                         </form>
  192.                     </div>
  193.                 {% endblock %}
  194.             </div>
  195.         {% endblock %}
  196.     {% endblock %}
  197. {% endblock %}
  198. {% block page_checkout_aside_actions %}
  199.     {% block page_checkout_cart_add_promotion %}
  200.         {% block page_checkout_cart_add_promotion_input_group %}
  201.             <div class="summary_block">
  202.                 {% block page_checkout_cart_add_promotion_label %}
  203.                 <div class="block_title">{{ "checkout.addPromotionLabel"|trans|sw_sanitize }}</div>
  204.                 <div class="block_inner">
  205.                     {% endblock %}
  206.                     {% block page_checkout_cart_add_promotion_input %}
  207.                     <form action="{{ path('frontend.checkout.promotion.add') }}"
  208.                           class="cart-add-promotion promo_code"
  209.                           data-form-csrf-handler="true"
  210.                           method="post">
  211.                         {% block page_checkout_cart_add_promotion_csrf %}
  212.                             {{ sw_csrf('frontend.checkout.promotion.add') }}
  213.                         {% endblock %}
  214.                         {% block page_checkout_cart_add_promotion_forward %}
  215.                             <input type="hidden"
  216.                                    name="redirectTo"
  217.                                    value="frontend.checkout.cart.page">
  218.                         {% endblock %}
  219.                         <label>
  220.                             <span class="label">Promo code</span>
  221.                             <input type="text"
  222.                                    name="code"
  223.                                    id="addPromotionInput"
  224.                                    placeholder="{{ "checkout.addPromotionPlaceholder"|trans|striptags }}"
  225.                                    aria-label="{{ "checkout.addPromotionLabel"|trans|striptags }}"
  226.                                    aria-describedby="addPromotion"/>
  227.                         </label>
  228.                         {% endblock %}
  229.                         {% block page_checkout_cart_add_promotion_submit %}
  230.                         <button class="secondary_btn"
  231.                                 type="submit"
  232.                                 id="addPromotion"
  233.                                 aria-label="promocode apply">APPLY
  234.                         </button>
  235.                     </form>
  236.                 </div>
  237.                 {% endblock %}
  238.             </div>
  239.         {% endblock %}
  240.     {% endblock %}
  241.     {% block page_checkout_cart_action_proceed %}
  242.         {# @deprecated tag:v6.5.0 - Bootstrap v5 removes `btn-block` class, use `d-grid` wrapper instead #}
  243.         {% if feature('v6.5.0.0') %}
  244.             <a href="{{ path('frontend.checkout.confirm.page') }}"
  245.                class="primary_btn"
  246.                title="{{ "checkout.proceedLink"|trans|striptags }}">{{ "checkout.proceedLink"|trans|sw_sanitize }}</a>
  247.         {% else %}
  248.             <a href="{{ path('frontend.checkout.confirm.page') }}"
  249.                class="primary_btn"
  250.                title="{{ "checkout.proceedLink"|trans|striptags }}">{{ "checkout.proceedLink"|trans|sw_sanitize }}</a>
  251.         {% endif %}
  252.     {% endblock %}
  253. {% endblock %}