Showing correct variant quantity

Showing correct variant quantity

davidre
New Member
6 0 0

Hello,

 

I need some help displaying the correct inventory quantity for variants.  The quantity shown is always the quantity of the variant with the most in stock.  I need it to show the quantity of the selected variant.

Screenshot 2025-03-27 091615.png

In the example above, it should say "We have 0 in stock"

 Any help would be appreciated

Replies 2 (2)

TheUntechnickle
Shopify Partner
456 49 114

Hi @davidre,

 

Thanks for reaching out!

 

We understand the issue — it looks like the inventory quantity being displayed is always that of the variant with the highest stock, rather than the currently selected variant.

 

To resolve this, we'll first need to review how your current setup is fetching the inventory data. If it's possible to tweak it to pull the stock level of the selected variant instead, we can make that change directly.

 

If not, we can help set up a custom or private Shopify app that makes GraphQL calls to fetch the correct variant inventory dynamically and update the display accordingly.

 

We’d love to help you get this sorted! Let us know how you’d like to proceed, and we can take it from there.

 

Best,
Shubham | Untechnickle

Helping for free: hello@untechnickle.com


Don't forget to say thanks, it'll make my day - just send me an email! 


Get Revize for Free | Let your shoppers edit orders post-purchase | Get Zero Support Tickets | #1 Order Editing + Upsell App

Dotsquares
Shopify Partner
390 25 52

Hi @davidre 

This issue typically occurs when the product page fails to dynamically update the inventory based on the selected variant. To resolve this, ensure that the product template includes the appropriate JavaScript to display the correct stock quantity for the chosen variant.

Need to Update JavaScript to dynamically reflect the selected variant’s inventory and Modify Variant Options to include inventory data, ensuring accurate stock display.

Let me know if you need detailed assistance.

Dotsquares Ltd


Problem Solved? ✔ Accept and Like solution to help future merchants.


Shopify Partner Directory | Trustpilot | Portfolio