Solved

How to display different stock levels for multiple locations on a product page?

rutuuu
Shopify Partner
2 0 2

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!

Accepted Solutions (2)

PurplePartner
Shopify Partner
178 18 30

This is an accepted solution.

Hi @rutuuu,

 

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!

Did you find my response useful? Mark it as "Accepted solution" so others can see it, or just like it.

View solution in original post

Kalen_Jordan
Shopify Partner
452 16 66

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:

 

Screenshot-2024-04-16-at-8.29.25 AM-1920x814.png

View solution in original post

Replies 4 (4)

PurplePartner
Shopify Partner
178 18 30

This is an accepted solution.

Hi @rutuuu,

 

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!

Did you find my response useful? Mark it as "Accepted solution" so others can see it, or just like it.
rutuuu
Shopify Partner
2 0 2

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

PurplePartner
Shopify Partner
178 18 30

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. 

Did you find my response useful? Mark it as "Accepted solution" so others can see it, or just like it.

Kalen_Jordan
Shopify Partner
452 16 66

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:

 

Screenshot-2024-04-16-at-8.29.25 AM-1920x814.png