Help with the quantity selector in Debut theme

New Member
4 0 0

Hello to everyone! I have modified the product-template.liquid in order to does not show the quantity selector when a product is out of stock. This is the block:


            {% if section.settings.show_quantity_selector %}
              {% if current_variant.inventory_quantity !=0 %}
          <div class="product-form__controls-group">
                <div class="product-form__item">
                  <label for="Quantity-{{ }}">{{ 'products.product.quantity' | t }}</label>
                  <input type="number" id="Quantity-{{ }}" max="{{ product.selected_or_first_available_variant.inventory_quantity}}" 
                    max="{{ product.selected_or_first_available_variant.inventory_quantity}}"
                    name="quantity" value="1" min="1" pattern="[0-9]*"
                    class="product-form__input product-form__input--quantity" data-quantity-input
         {% endif %}
        {% endif %}
The problem is that this does not allow to show the quantity selector for the product whose I do not track the quantity. How do I implement this code in order to show the quantity selector for the product without tracked quantity?
Thank you very much


Community Moderator
Community Moderator
2951 383 594


If you're still needing help with this, then I would recommend contacting Shopify Support to see if our Themes team is able to make this change on your behalf. To be eligible for their assistance, you'll need to be using a Shopify free theme and on a paid account. You can contact Shopify Support by logging into your store through the help center, searching your question/issue, then selecting "continue" at the bottom of the page that displays the search results. 

If the Themes team is unable to assist you with this, then I would recommend hiring a Shopify Expert if another community member is unable to provide guidance on how to make this change. 

Trevor | Community Moderator @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog