How to add a "Back In Stock" Label To A Product Image

Hi everyone! I am wanting to add a “back in stock”, “low in stock” label to product image on collection page. Same as when a product is sold out it has the “sold out” label on top of the image of the product in collection page.

Does anyone know how I can put that “back in stock” label for my products?

My theme is November

https://themeforest.net/item/november-multipurpose-sections-shopiy-theme/28416448

Thanks!

  1. In the theme editor, find the template file responsible for rendering the collection page. Typically, this file is named collection.liquid or collection-grid-item.liquid. Look for the code that generates the product image and its associated elements.

  2. Within the code for the product image, add conditional statements to check the stock level of the product. You can use liquid code to access the stock level and display the appropriate label based on the conditions. For example:

{% if product.variants.first.inventory_quantity <= 0 %}
  Sold Out
{% elsif product.variants.first.inventory_quantity <= 5 %}
  Low in Stock
{% elsif product.variants.first.inventory_quantity > 0 %}
  Back in Stock
{% endif %}

Hi! i’m looking to also add a “Low Stock” badge to collection images when qty is under 25 - i don’t have these exact liquid files in my theme though (Stiletto), can you help me locate which liquid file and where I would place this? Thank you!!

url: seniqbrand.com