templates/web/customer/items_list/product/parts/common.change-qty-block.twig line 1

Open in your IDE?
  1. {##
  2.  # Change quantity template
  3.  #}
  4. {% set productId = this.getProductId() %}
  5. {% set cart = this.getCart() %}
  6. {% set productStockAvailabilityPolicy = this.getProductStockAvailabilityPolicy() %}
  7. {% set increaseQtyAttributes = {} %}
  8. {% if productStockAvailabilityPolicy.isAllStockInCart(cart) %}
  9.   {% set increaseQtyAttributes = {'disabled': 'disabled'} %}
  10. {% endif %}
  11. <div class="change-qty">
  12.   {{ widget('\\XLite\\View\\Button\\Simple',
  13.     label=t('Decrease product amount by 1'),
  14.     style='regular-main-button decrease-qty icon-minus productid-' ~ productId) }}
  15.   <input class="qty-in-cart form-control" id="{{ this.getFieldId() }}" type="text" readonly="readonly" value="{{ productStockAvailabilityPolicy.getInCartAmount(cart) }}">
  16.   <label for="{{ this.getFieldId() }}" class="visually-hidden">{{ t('Product amount in cart') }}</label>
  17.   <span class="increase-qty-container">
  18.     {{ widget('\\XLite\\View\\Button\\Simple',
  19.       label=t('Increase product amount by 1'),
  20.       attributes=increaseQtyAttributes,
  21.       style='regular-main-button increase-qty icon-plus productid-' ~ productId) }}
  22.     <span class="out-of-stock-tooltip tooltip">
  23.       <span class="caption">{{ this.getAllStockInCartTooltipText() }}</span>
  24.     </span>
  25.   </span>
  26. </div>