FROM CACHE - en_header

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

davecole
New Member
2 0 0

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.


Replies 0 (0)