Quantity on product pages whit stock limit

Quantity on product pages whit stock limit

Andreas3dvue
Tourist
9 0 2

Hi

Im using Dawn 15.2 version and used Dawn 4.0 version before.

I added this code in a customized liquid on product pages in my old theme for showing my inventory quantity:

 

{% assign current_variant = product.selected_or_first_available_variant %}

  <div class="inventoryNote form__label">

  {% if current_variant.available %}

    {% if current_variant.inventory_quantity > 0 and current_variant.inventory_quantity <= 10 %}We have {{ current_variant.inventory_quantity }} in stock

{% elsif current_variant.inventory_quantity > 10 %}We have more than 10 in stock

    {% endif %}

  {% endif %}

</div>

 

Now they have this option in product page when customize, but now they show the whole stock level i have for the selected product, in my old theme it displayed "we have more than 10 in stock" and i wonder if i can change this somewhere in the Dawn 15.2 code so its more liked my old theme? I attaching a pic below of dawn 15.2 code

quantity stock level.png

Thanks in advance

Andreas

Replies 0 (0)