custom/plugins/FourtwosixShippingCostsCalculator/src/Resources/views/storefront/layout/header/top-bar.html.twig line 1

Open in your IDE?
  1. {% sw_extends "@Storefront/storefront/layout/header/top-bar.html.twig" %}
  2. {% block layout_header_top_bar_language %}
  3.     {% set countries = page.countries ? page.countries : page.extensions["FourtwosixShippingCostsCalculator"]["countries"].elements %}
  4.     <form name="precalc"
  5.           method="post"
  6.           action="{{ path('frontend.checkout.configure') }}"
  7.           data-form-auto-submit="true"
  8.           class="d-flex my-3"
  9.     >
  10.         {# @deprecated tag:v6.5.0 - Block page_checkout_cart_shipping_costs_csrf will be removed. #}
  11.         {{ block("page_checkout_cart_shipping_costs_csrf", "@Storefront/storefront/page/checkout/cart/index.html.twig") }}
  12.         {% block page_checkout_cart_shipping_costs_form_group_country %}
  13.             {% if not context.customer %}
  14.                 <div class="form-group d-flex ml-3 m-0">
  15.                         <label class="text-nowrap align-self-center mr-2 m-0" for="countryId">{{ "checkout.shippingCountry"|trans|sw_sanitize }}</label>
  16.                         <select class="form-select form-control" type="text" id="countryId" name="countryId">
  17.                             {% for country in countries %}
  18.                                 <option value="{{ country.id }}"
  19.                                         {{ country.id == context.shippingLocation.country.id ? 'selected="selected"' : '' }}>
  20.                                     {{ country.translated.name }}
  21.                                 </option>
  22.                             {% endfor %}
  23.                         </select>
  24.                     </div>
  25.             {% endif %}
  26.         {% endblock %}
  27.         {% block page_checkout_cart_shipping_costs_form_group_zip %}
  28.             {% if not context.customer %}
  29.                 <div class="form-group d-flex ml-3 m-0">
  30.                     <label class="text-nowrap align-self-center mr-2 m-0" data-input-name="zipcode" for="zipcode">{{ "address.zipcodeLabel"|trans|sw_sanitize }}</label>
  31.                     <input class="form-control" type="text" id="zipcode" value="{{ context.shippingLocation.address.zipcode }}" name="zipcode" placeholder="{{ "address.zipcodePlaceholder"|trans|sw_sanitize }}">
  32.                  </div>
  33.             {% endif %}
  34.         {% endblock %}
  35.         {% block page_checkout_cart_shipping_costs_form_group_shipping_method %}
  36.             <div class="form-group mx-3 m-0 d-none">
  37.                     <label class="text-nowrap align-self-center mr-2 m-0" for="shippingMethodId">{{ "checkout.shippingMethod"|trans|sw_sanitize }}</label>
  38.                     <select class="form-select form-control" type="text" id="shippingMethodId" name="shippingMethodId">
  39.                         {% for shipping in page.shippingMethods ?? [context.shippingMethod] %}
  40.                             <option value="{{ shipping.id }}"
  41.                                     {% if shipping.id == context.shippingMethod.id %} selected="selected"{% endif %}>
  42.                                 {{ shipping.translated.name }}
  43.                             </option>
  44.                         {% endfor %}
  45.                     </select>
  46.               </div>
  47.         {% endblock %}
  48.         <input type="hidden" name="redirectTo" value="frontend.checkout.cart.page">
  49.       </form>
  50.     {{ parent() }}
  51. {% endblock %}