custom/static-plugins/custom-quantity-field/src/Resources/views/storefront/component/product/card/action.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Parent/storefront/component/product/card/action.html.twig' %}
  2.  {% block component_product_box_action_form %}
  3.      {% block component_product_box_action_buy_redirect_input %}
  4.          {{ parent() }}
  5.      {% endblock %}
  6.      {% block page_product_detail_buy_product_buy_info %}
  7.          {{ parent() }}
  8.      {% endblock %}
  9.      {% if config("WexoCustomQuantityField").config.quantityListingPage %}
  10.          {% block page_product_detail_custom_quantity_field %}
  11.              <div class=" custom-quantity-field-advanced d-flex flex-row" data-custom-quantity="true">
  12.                  {% block page_product_detail_custom_quantity_field_select %}
  13.                      <div class="custom-quantity-field-column d-flex flex-wrap pr-2">
  14.                          <div class="custom-quantity-field-wrapper d-inline-flex justify-content-between"
  15.                               id="quantityData"
  16.                               data-maxPurchase="{{ product.calculatedMaxPurchase }}"
  17.                               data-minPurchase="{{ product.minPurchase }}"
  18.                               data-purchaseSteps="{{ product.purchaseSteps }}"
  19.                               data-autoSubmit="0">
  20.                              {% block page_product_detail_custom_quantity_field_select_button_minus %}
  21.                                  <button type="button"
  22.                                          class="btn-secondary custom-quantity-field-button is-minus flex-column
  23.                                          align-content-center"
  24.                                          aria-label="lineItemBtnMinus[{{ product.id }}]">
  25.                                      {% sw_icon 'minus' style { 'size': 'sm' } %}
  26.                                  </button>
  27.                              {% endblock %}
  28.                              {% block page_product_detail_custom_quantity_field_select_input_field %}
  29.                                  <label class="mb-0 pb-1 pt-1">
  30.                                      <input id="lineItems[{{ product.id }}][quantity]"
  31.                                             class="custom-quantity-field-input h-100"
  32.                                             name="lineItems[{{ product.id }}][quantity]" type="text"
  33.                                             value="{{ product.minPurchase }}">
  34.                                  </label>
  35.                              {% endblock %}
  36.                              {% block page_product_detail_custom_quantity_field_select_button_plus %}
  37.                                  <button type="button"
  38.                                          class="btn-secondary custom-quantity-field-button is-plus flex-column
  39.                                          align-content-center"
  40.                                          aria-label="lineItemBtnPlus[{{ product.id }}]">
  41.                                      {% sw_icon 'plus' style { 'size': 'sm' } %}</button>
  42.                              {% endblock %}
  43.                          </div>
  44.                      </div>
  45.                  {% endblock %}
  46.                  {% block page_product_detail_custom_quantity_field_button %}
  47.                      <div class="d-flex flex-wrap custom-quantity-field-btn">
  48.                          <button class="btn btn-block btn-buy"
  49.                                  title="{{ "listing.boxAddProduct"|trans|striptags }}">
  50.                              {% sw_icon 'cart' style {
  51.                                  'color': 'color-cart',
  52.                                  'size': 'lg'
  53.                              } %}
  54.                          </button>
  55.                      </div>
  56.                  {% endblock %}
  57.              </div>
  58.          {% endblock %}
  59.      {% else %}
  60.          <button class="btn btn-block btn-buy"
  61.                  title="{{ "listing.boxAddProduct"|trans|striptags }}">
  62.              {{ "listing.boxAddProduct"|trans|sw_sanitize }}
  63.          </button>
  64.      {% endif %}
  65.  {% endblock %}