Show quantity on product page on Star theme?

New Member
1 0 1


I sell items if very limited quantities, sometimes only one or two. How do I show " Only 1 in Stock" or "Only 2 in Stock" on the product page right above the Add to Cart Button? I am using the Star theme.  


Shopify Partner
277 76 91

You can follow the tutorial here:

If you found my answer helpful, please LIKE and ACCEPT. ☕
If you're not comfortable with code, please modify code files at your own risk.
Do NOT give out your passwords unless absolutely necessary.
Shopify Partner
7292 1721 2292


Editing your theme code to add this feature.

In the Section directory, find the product-template.liquid file or which file responsible for product template, and add the following code where you want to show the QAUNTITY, in this example we’ve added this after the product title:

{% comment %} Inventory tracking on product page {% endcomment %}
    <div id="variant-inventory" class="{% unless current_variant.available %} hide {% endunless %}">
      {% if current_variant.inventory_management == "shopify" and current_variant.inventory_policy != "continue" %}
      We have {{ current_variant.inventory_quantity }} in stock.
      {% else %}
      This product is available.
      {% endif %}

Hope this works.


If helpful then please Like and Accept Solution | Email: | Instagram: @dmw.webartisan
Check here PageFly App to customize your pages | Bag is a cart drawer that maximizes your sales. View app →
Shopify Partner
2979 320 499

@vintagemaya - are you familiar with liquid code editing? if yes then you can do it , if no then I recommend to add one of us as staff and we can do it. If you want you can  contact me on email given below.

You are welcome to contact me, my email -
Free Shopify solutions/tutorials on youtube
#1 page builder app on Shopify - for FREE! PageFly