Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

Re: store_availability.available flag returning 'true' for store locations with 0 inventory

store_availability.available flag returning 'true' for store locations with 0 inventory

davecole
Visitor
2 0 1

For all our customer-facing product pages, we use the store_availability object to determine which of our 8 locations have an item in stock and list those locations to the user. (see https://shopify.dev/api/liquid/objects/storeavailability for reference). This is done by checking store_availability.available for each location. The problem we're running into is that for products that have an inventory quantity of 0 in stock for a given location, store_availability.available is till reporting as true for those locations.

 

For instance:
On our Admin Product page, an item will show Availabilities of 0 for 5/8 locations.
On the consumer-facing product page, iterating through all the locations for that product (only 1 variant) shows the item is available at all 8 locations.


Reply 1 (1)

Forsel
New Member
4 0 0

Hi Davecole. Did you ever fix this? I'm encountering the same problem and was about to make a post for it.