via Storefront API and say JS - nope, Storefront API 5uck5 even more in that regard (I mean, it’s awesome otherwise, but for inventory it just says yep, got some, nope got none which is meh)
via Admin API - yup, but this is where you enter the realm of needing private / public app, app proxy to relay back to Liquid template and most importantly some VERY aggressive caching because with the API bucket throttling, hitting the API for every product page view would result in tears and very offensive language
Are you doing this with Liquid Objects or using API and storing the inventory levels at your end? I can’t find a way to do this using the Objects, so I m just curious.
We recently built a Select A Store app for Shopify. It allows consumers to select their preferred store and then browse your Shopify website. This way, your consumers can see the inventory available at their preferred location as they shop your website. (It’s the same way the big box retailers do it.) It provides the best user experience all the way through the checkout flow.
Consumers can also toggle to see the inventory available at other locations too.
Here is a video so you can see an overview of how the app works as well as see it in action on some other brick-and-mortar retailers using Shopify.
Hope this helps with a great user experience on your website for your customers!
I am also looking for a good work around. We are a manufacturer that ships every thing out of one location. We have two forms of inventory “Finished Goods” and “Sub-Assemblies”. And, when we are out of stock on both of them, the items is “Built to order”. Currently we can only show a total of the inventories. We thought by making two locations, “Finished Goods” and “Sub-Assemblies”, that we could find a way to show the stock of each. But with no luck. We tried one app that stated they could do that, but they could not have it say “Built to order” when there is no stock. Is there an app and some code that could help with this? We do not need maps and store info as we are just one location. It seems most apps that I have found are built for fancy maps and info.
As KarlOffenberger mentioned, location inventory data is not accessible directly through Liquid. To retrieve that information, you’ll need to use the Admin API, which can be accomplished by creating a custom app.
I developed an app called MultiLoca: Location Stock Info that addresses this exact issue. It helps you display location inventory on product page as you suggested. I encourage you to check it out!