in stock text

I_Sell_Online
Tourist
5 0 1

Hello,

I am using the OOTSB Turbo theme.

I have selected to display the number of stock items I have left.  However, they have a settings.inventory_threshold variable which maxes out at 100.

I thought I could modify the code to add a generic, "More than 100 in stock" message easily by putting in an extra else if condition in the product-form.liquid file.  But it never seems to display.

Can someone please tell me what I am missing?  Why does my in_stock_text not display for items with more than 100 in stock?

This product has 300 items in stock.  https://learningdevelopments.co.nz/products/pressure-sensitive-conductive-sheet-velostat-linqstat 

{% if product.available %}
    {% if settings.display_inventory_left %}
      <div class="items_left">
        {% if variant.inventory_management == blank %}
        <i>{{order_on_demand_pre_text}} <a href="{{order_on_demand_href}}" target="_blank">{{order_on_demand_text}}</a></i>
        {% elsif variant.inventory_quantity <= 0 %}
        <i>{{back_order_pre_text}} <a href="{{back_order_href}}" target="_blank">{{back_order_text}}</a></i>
        {% endif %}
        
        {% if variant.inventory_management != blank and variant.inventory_quantity > 0 %}
          {% capture items_left_text %}
            {% if variant.inventory_quantity == 1 %}
              {{ 'products.product.items_left_count.one' | t }}
            {% else %}
              {{ 'products.product.items_left_count.other' | t }}
            {% endif %}
          {% endcapture %}
          {% if variant.inventory_quantity <= settings.inventory_threshold %}
            {{ variant.inventory_quantity }} {{ items_left_text }}
          {% elsif variant.inventory_quantity >= settings.inventory_threshold %}
        {{ in_stock_text }}
          {% endif %}
        
        {% endif %}
      </div>
 
    {% endif %}
  {% endif %}

 

0 Likes