custom/plugins/SchilderSysteme/src/Resources/views/storefront/page/product-detail/buy-widget-form.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/page/product-detail/buy-widget-form.html.twig' %}
  2. {% block page_product_detail_buy_container %}
  3.     {% if buyable %}
  4.         <div class="buy-widget-container">
  5.             {% block page_product_detail_buy_quantity_container %}
  6.                 <div class="px-0 col product-detail-quantity-select-wrapper d-flex align-items-center">
  7.                     <label for="lineItems[{{ product.id }}][quantity]" class="product-detail-quantity-select-label">
  8.                         {{ "detail.quantity"|trans|sw_sanitize }}
  9.                     </label>
  10.                     <select name="lineItems[{{ product.id }}][quantity]"
  11.                             id="lineItems[{{ product.id }}][quantity]"
  12.                             class="custom-select product-detail-quantity-select">
  13.                         {% for quantity in range(product.minPurchase, product.calculatedMaxPurchase, product.purchaseSteps) %}
  14.                             <option value="{{ quantity }}">
  15.                                 {{ quantity }}
  16.                                 {% if quantity == 1 %}
  17.                                     {% if product.translated.packUnit %} {{ product.translated.packUnit }}{% endif %}
  18.                                 {% else %}
  19.                                     {% if product.translated.packUnitPlural %}
  20.                                         {{ product.translated.packUnitPlural }}
  21.                                     {% elseif product.translated.packUnit %}
  22.                                         {{ product.translated.packUnit }}
  23.                                     {% endif %}
  24.                                 {% endif %}
  25.                             </option>
  26.                         {% endfor %}
  27.                     </select>
  28.                 </div>
  29.             {% endblock %}
  30.             {% block page_product_detail_buy_redirect_input %}
  31.                 {# fallback redirect back to detail page is deactivated via js #}
  32.                 <input type="hidden"
  33.                        name="redirectTo"
  34.                        value="frontend.detail.page">
  35.                 <input type="hidden"
  36.                        name="redirectParameters"
  37.                        data-redirect-parameters="true"
  38.                        value='{"productId": "{{ product.id }}"}'>
  39.             {% endblock %}
  40.             {% block page_product_detail_buy_product_buy_info %}
  41.                 <input type="hidden"
  42.                        name="lineItems[{{ product.id }}][id]"
  43.                        value="{{ product.id }}">
  44.                 <input type="hidden"
  45.                        name="lineItems[{{ product.id }}][type]"
  46.                        value="product">
  47.                 <input type="hidden"
  48.                        name="lineItems[{{ product.id }}][referencedId]"
  49.                        value="{{ product.id }}">
  50.                 <input type="hidden"
  51.                        name="lineItems[{{ product.id }}][stackable]"
  52.                        value="1">
  53.                 <input type="hidden"
  54.                        name="lineItems[{{ product.id }}][removable]"
  55.                        value="1">
  56.             {% endblock %}
  57.             {% block page_product_detail_product_buy_meta %}
  58.                 <input type="hidden"
  59.                        name="product-name"
  60.                        value="{{ product.translated.name }}">
  61.                 <input type="hidden"
  62.                        name="brand-name"
  63.                        value="{{ product.manufacturer.getName() }}">
  64.             {% endblock %}
  65.             {% block page_product_detail_buy_button_container %}
  66.                 {% block page_product_detail_buy_button %}
  67.                     <button class="btn btn-primary btn-buy"
  68.                             title="{{ "detail.addProduct"|trans|striptags }}"
  69.                             aria-label="{{ "detail.addProduct"|trans|striptags }}">
  70.                         {{ "detail.addProduct"|trans|sw_sanitize }}
  71.                         <span>{% sw_icon 'cart' style {
  72.                                 'namespace': 'Tuerschild_2',
  73.                             } %} </span>
  74.                     </button>
  75.                 {% endblock %}
  76.             {% endblock %}
  77.         </div>
  78.     {% endif %}
  79. {% endblock %}