Help with the quantity selector in Debut theme

Ciro_1
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-{{ section.id }}">{{ 'products.product.quantity' | t }}</label>
                  <input type="number" id="Quantity-{{ section.id }}" 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
                  >
                </div>
           </div>
         {% 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

 

Reply 1 (1)

Trevor
Community Moderator
3389 459 976

@Ciro_1 

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