I would like to display my products’ inventory location on my website’s product page. The product’s inventory location can be found under the according product:
I’m having a similar problem. The “store_availabilities” liquid object is always empty. I have tried enabling/re-enabling Local Pickup on the one location that we have but the backend still returns nothing when trying to access it via liquid. Strangely enough, I am able to access the same information via the Storefront API.
I also tried the exact same theme code on another development store with Local Pickup enabled and everything works fine. I’m convinced there is a backend issue here but Shopify support keeps directing me to contact a Shopify Expert to have a look at the theme code.
Hello @Josh18 ,
I am very sure that there is a problem with Shopify’s backend.
Like you, I have enabled the “local pickup” option. I have checked if my location has the needed product variant in stock. I have read the Shopify Devs. But nothing seems to work.
The variant.store_availabilities array is always empty.
I have stopped working on this problem.
Our app allows you to display inventory by location. It also allows customers to select a store that smooths out the whole shopping experience, don’t the website. It is very similar to how Target and other big box retailers handle this issue, so it’s a great app for brick-and-mortar stores on Shopify. Because it provides the best user experience for customers using your website.
If you have any issues with the implementation just drop us a line. We’re always willing to help our customers as best we can.
Also, here is a video that describes the app and provides an overview. You may find this helpful in deciding if the app is right for you and best solves the issue.
Currently, accessing location-specific stock levels directly through Liquid is not possible. To retrieve this information, you will need to use the Shopify Admin API via a custom app.
Alternatively, there are several apps available in the Shopify App Store that can help achieve this functionality. I recently developed an app called MultiLoca: Location Stock Info. It displays product inventory by location directly on the product page
Hi!
I had the same issue, and after some trial and error, I managed to display the locations where I have available stock using this code:
{% for availability in product.selected_or_first_available_variant.store_availabilities %}
{% if availability.available %}
- {{ availability.location.name }}
{% endif %}
{% endfor %}
Even with just one available location, it works.
Be aware that the store’s address must be filled in (otherwise the location won’t show), and it seems that enabling local pickup is also required.
Make sure the product you’re testing actually has stock in at least one location.