All things Shopify and commerce
Hello!
I am currently working on a store with multiple locations and all have different stocks. So like location 1 has 3 and location 2 has 5 stocks, I need to determine the stocks for each instead of getting the total variant quantity {{ variant.inventory_quantity }}.
I would like to show the product variant quantity on the product page like this:
Location 1: 3 in stock
Location 2: 5 in stock
Location 3: 63 in stock
Location 4: 5 in stock
and so on...
May I know how to achieve that and is that possible?
Thank you!
Solved! Go to the solution
This is an accepted solution.
Hi @anomyous,
Thanks for being part of the Shopify community! What you're saying is possible, but you need to add a custom code that will display the quantity of the product based on the Inventory Location rather than on the Total Inventory Available. That's something any tech-savvy Shopify Partner can help with, me included, so do not hesitate to reach out if you need this kind of feature.
May I know what you're looking to achieve by doing this though? Maybe I can offer a better option. Thanks!
This is an accepted solution.
Actually you don't necessarily need custom code for this. This is a workflow combined with a code snippet you can use to do this:
Show Inventory Levels By Location On Your Product Page
Looks like this:
This is an accepted solution.
Hi @anomyous,
Thanks for being part of the Shopify community! What you're saying is possible, but you need to add a custom code that will display the quantity of the product based on the Inventory Location rather than on the Total Inventory Available. That's something any tech-savvy Shopify Partner can help with, me included, so do not hesitate to reach out if you need this kind of feature.
May I know what you're looking to achieve by doing this though? Maybe I can offer a better option. Thanks!
I am trying to fetch multiple location inventory quantity not the total inventory .
i want to display below content in my product page
for example:- library Hamilton : Available 5 books in stock
library Toronto : Available 4 books in stock
where library Hamilton and library Toronto are location name which is added in shopify admin with there available inventory quantity
Yep! That would be possible, but a Shopify Partner needs to check your theme and build the custom code needed for the feature. If you'd like help from my side, just DM me.
Hello! I am currently trying to add a custom theme to our site that will show the warehouse and in-store quantity. Can you show me how to do this?
It is possible to do like ikea? Showing in what store do I have stock
Hi, @BernardoPaixao!
Yes, that would be possible as long as you set up multiple warehouses in Shopify. Once you do that, extract the information and use custom code to display pick up availability based on warehouse.
I would like to have a Google Meet first to make sure we're on the same page regarding the complete functionalities and features you're looking for. You can DM me and set up a call for later.
Thanks!
Hi, how can you say that it can be done? With liquid to boot. We are trying everything, even via API, but with variant.inventory_quantity only the quantity of the location that has the most stock is returned. Try with the dawn theme itself which has the functionality built-in. Furthermore, it is impossible to understand if a location that only offers shipping and not in-store pickup has stocks. This is crazy stuff, how can you offer a service on Shopify that you describe as professional, but then there are these absurd things?
This is an accepted solution.
Actually you don't necessarily need custom code for this. This is a workflow combined with a code snippet you can use to do this:
Show Inventory Levels By Location On Your Product Page
Looks like this:
Did someone find a solution to this because I try to do the same? I only can get the sum of all stock levels on the product page.
Hi @vanderschueren, as explained before, you need to apply a custom code that is different based on your theme. I recommend reaching out to a Shopify Partner for support.
Thanks for the answer! However, I know how to code and have located the code for the product stock level. The only thing I am missing is how I can fetch the seperate stock levels in Liquid or Javascript.
Did you manage to find a solution? I'm currently trying to do exactly the same thing.
Not sure this is possible without having an external server resource - however i'm happy to be proved wrong.
You can mimic the pickup_availabilty files, which gets the .store_availabilities array, showing whether a product is available at that location, but doesn't give the inventory of that variant, just that its available, you also need the localpickup to be enabled for each location, so doesn't really work for those showing "warehouse" stock, which appears to be the main reason people wanting to show this.
The only way i can see do this is to go through partners.shopify, create your own app on your own server, then use the unstable version of the admin api to get inventory level at location based on the inventory.id gained from querying against the variant, then return a simple array of inventory:location to display on the store.
Having only worked on shopify for a month i'm staggered at how such basic requirements have to be (for most users) outsourced to paid apps.. this is so simple to create on open source carts..
Hi @anomyous,
It sounds like you're looking for a way to display product quantities based on inventory locations. A custom solution or snippet from Kalen_jordan could definitely work well for your needs, but it does require some technical knowledge. You can reach out to any partner and they should be able to do it.
If you're a store owner seeking a ready-made solution, you might want to check out my recently built app, Multilocation Stock Info. It shows stock levels directly on your product page and its also display pickup locations.
If this doesn't fulfill your requirements, could you share what you're hoping to accomplish with this? Perhaps I can suggest a more suitable alternative. Thank you!
Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025Discover opportunities to improve SEO with new guidance available from Shopify’s growth...
By Jacqui May 1, 2025