Dawn 2.0 - Adding quantity available to product page

VividFrameworks
New Member
2 0 0

I feel like this really shouldn't be that difficult. Would anybody have the code that I need to copy and paste into the product page template?

Replies 21 (21)
mstav2u
Excursionist
21 0 1

I haven't received any answer to what I want with the quantity.  I did purchase an app which shows the available amount in stock, but the counter goes on forever and I don't feel it should go past the amount in stock and this is what I'm looking for.  If someone has a code, just give me the steps on how to implement it to make this work like I feel it should.  Maybe it isn't possible, but still hoping there's someone that can let me know.  Thanks and hopefully answers will be coming. 

jm-design
Excursionist
25 1 5

I would also like to know! As I am having the same issue with variants.

SpotterJ
Explorer
49 1 8

Any luck?

Learning something new every day
BecEnglishCeram
New Member
2 0 1

I ended up having to get theme support to resolve the issue with variant products. They added the "Inventory" block which I couldn't access. I've asked why it wasn't available for me to add, when I get a reply I'll update you. I'm also going to play around with a better message than"Stock:"

This is how it displays on my live website https://becenglishceramics.com/products/green-tea-side-plate?variant=41249832763584:

BecEnglishCeram_0-1639274106829.png

 

BecEnglishCeram_1-1639274138124.png

 

SpotterJ
Explorer
49 1 8

Thank you.

The excellent @PaulNewton gave some background information on this issue on this topic: https://community.shopify.com/c/technical-q-a/klaviyo-and-quot-display-on-policy-continue-true-quot-...

 

I wasn't aware about the theme help, that's excellent. 

 

Oh, and nice products, btw!

Learning something new every day
BecEnglishCeram
New Member
2 0 1
sellingstuff
Shopify Partner
18 0 0

I would also like some help on this. I think it gets added in global.js but I can't find where to update it from

OliviaMichaelCo
Explorer
54 3 7

This worked perfectly for me, except when there’s zero stock it shows “Just 0 in stock”. Is there a simple change to this that I can make to only work when I have more than 1 in stock but fewer than 6 in stock? I only want to add this when I get below 6 of a product. 

 

Thanks

 

<DIV>{% if product.variants.first.inventory_management == "shopify" and product.variants.first.inventory_quantity > 0 %}
We currently have {{ product.variants.first.inventory_quantity }} in stock.
{% endif %}</DIV>

mstav2u
Excursionist
21 0 1

It looks like the quantity counter goes on forever though and that's what I want to avoid.  For example I know it says stock 2, but if customers click on 6 to add to cart it is then that they get a message you can't add more to your cart.  I don't know but I am trying to find a way to show if there are 6 in stock, then the counter stops at 6.  This make sense?  

mstav2u
Excursionist
21 0 1

And this code is put where? Thanks.