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