custom/plugins/fourtwosixAddPurchaseUnit/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_quantity_container %}
  3.     <div class="col-12 col-md-4 mb-2">
  4.         {% set selectQuantityThreshold = 100 %}
  5.         {% block page_product_detail_buy_quantity %}
  6.             <div class="fourtwosix-add-unit">
  7.                 {% if (product.calculatedMaxPurchase - product.minPurchase) / product.purchaseSteps > selectQuantityThreshold %}
  8.                     {% block page_product_detail_buy_quantity_input_group %}
  9.                         <div class="input-group">
  10.                             {% block page_product_detail_buy_quantity_input %}
  11.                                 <div class="d-flex">
  12.                                     {{parent()}}
  13.                                     {% if page.product.unit != null %}
  14.                                         <input class="form-control w-25" type="text" placeholder="{{page.product.unit.shortCode}}" readonly>
  15.                                     {% endif %}
  16.                                 </div>
  17.                             {% endblock %}
  18.                             {% block page_product_detail_buy_quantity_input_unit %}
  19.                                 {{parent()}}
  20.                             {% endblock %}
  21.                         </div>
  22.                     {% endblock %}
  23.                 {% else %}
  24.                     {% block page_product_detail_buy_quantity_select %}
  25.                         <div class="d-flex">
  26.                             {{parent()}}
  27.                             {% if page.product.unit != null %}
  28.                                 <input class="form-control w-25" type="text" placeholder="{{page.product.unit.shortCode}}" readonly>
  29.                             {% endif %}
  30.                         </div>
  31.                     {% endblock %}
  32.                 {% endif %}
  33.             </div>
  34.         {% endblock %}
  35.     </div>
  36. {% endblock %}
  37. {% block page_product_detail_buy_button_container %}
  38.     <div class="col-12 col-md-8">
  39.         {% block page_product_detail_buy_button %}
  40.             {{parent()}}
  41.         {% endblock %}
  42.     </div>
  43. {% endblock %}