Display variant inventory quantity with locations on product page (Minimal theme)

ledprofiles
New Member
5 0 0

Hi,

I applied the suggested code on below link to display the variant inventory quantity on my product page. And that worked great!

Now I want to adjust the code to take it to the next level. I want to add the inventory quantity by location (We have multiple locations). To show like availability on location A is X and location B is Y.

Any chance someone worked on it before?

https://community.shopify.com/c/Shopify-Design/Display-variant-inventory-quantity-on-product-page-Mi...

Replies 15 (15)

pvoulg
Shopify Partner
178 26 59

Hi @ledprofiles,

Unfortunately, this is not possible just by adding code to your product template. Liquid doesn't have access to location inventory levels (just the total), so unless that changes, there' no way to do that yet. You can look into apps that offer this functionality.

Panos Voulgaris
Creative director / Partner @ MALVI
Founder @ function( )
ledprofiles
New Member
5 0 0

thanks for your quick reply. Unfortunately I even could not find a free or paid app that shows the variant quantities per location. Any suggestion?

pvoulg
Shopify Partner
178 26 59

I found the following at the app store:

Can't vouch for any of those, because we've never used any, but they seem to have 14-day trials, so you can check them out.

Panos Voulgaris
Creative director / Partner @ MALVI
Founder @ function( )
Sebastian_Young
Shopify Partner
116 6 37

In the documentation for variant.store_availabilities, it says "Returns an array of store_availability objects if variant.selected is true." For variant.selected to be true, the variant must be specified as a URL parameter. However, I'm still not able to get it to return anything, even with this in place.

pvoulg
Shopify Partner
178 26 59

Hi @Sebastian_Young,

The variant.store_availabilities only shows if a variant is stocked in a specific location (mostly used to determine if a product can be picked up from a location), it doesn't come with stock levels. There's an implementation example here: https://shopify.dev/tutorials/add-store-availability

Panos Voulgaris
Creative director / Partner @ MALVI
Founder @ function( )
Sebastian_Young
Shopify Partner
116 6 37

Thanks @pvoulg. I don't need actual levels per location, just whether it is available at a location, but I still can't get it to return anything. I've seen that example implementation, which is not exactly what I'm trying to achieve. Essentially I just need to know, for each variant, if it is available at one of our two locations. Any idea on how to do this?

pvoulg
Shopify Partner
178 26 59

So, yeah, as far as I can tell, this seems to be a Liquid bug or error. Some have noted that pickup needs to be enabled for all locations for it to work, whereas others have said that this doesn't work even when they are enabled. I will investigate further and get back to you if I figure anything out.

Panos Voulgaris
Creative director / Partner @ MALVI
Founder @ function( )
Sebastian_Young
Shopify Partner
116 6 37

Thanks @pvoulg. We don't have pickup enabled because that requires multi-origin shipping to be enabled. I haven't enabled this, and don't think I want to, given that it's irreversible!

JesperUnna
Excursionist
12 0 9

Did you find a good solution? I am looking into the same thing right now. 

I am currently installing Arigato Automation Flow app, which should be able to tag products based on location availability, and even add metadata to products regarding how many are in stock.

Read more here:
https://www.apps.bonify.io/arigato-automation-shopify/actions/add-tags-product

https://www.apps.bonify.io/arigato-automation-shopify/workflows/display-inventory-location 

I am hopeful that this will solve the problem.

Rahul-LMP
Excursionist
43 0 7

@pvoulg  can we get on a call I would like to get some work done and need consultation for displaying local inventory levels and display inventory that is in another location and is only available for delivery . so for example I have 2 locations in Shopify, Louisville & offsite - 

Louisville location displays only Louisville inventory 

offsite location ( we are adding products that are drop shipped, in this location )  - this diplays inventory in louisville + offsite available for delivery , so on drop ship products pick up option would not be avialble 

 

please email me at rahul@buildmyplace.com

Keegan10
Shopify Partner
10 0 0

Hello, 

 

If you would also like to let your customers select a store we built the app for that. Your customers can select a store and then browse your whole catalog seeing the inventory available at their preferred location. Its the same way the big box retailers do it because it is the best user experience. 

https://apps.shopify.com/metastock

 

Here's a video that briefly overviews the user experience and shows some example sites. Of course, consumers can also see the inventory at each location. 

Cpuga
Shopify Partner
38 0 5

Hello, when is ur app gonan be avaible?

 

Regards,

anz
Shopify Partner
1 0 0

Is there a way to filter products by location showing only products' variants corresponding to availability in that location?

pythagoryan
Excursionist
21 0 9

This app is okay but not great. The cart error handling doesn't work well at all. I need an app that can prevent customer from checking out if their entire cart isn't available for pickup at any location. Also I'm unable to edit button text, input placeholders, etc.

Ryan R. Irwin
Director of Technology
SkyCo Distro & Hazel Sky Smoke Shop

thk116
Excursionist
36 0 7

Experienced similar issue seeing liquid data for product > variants > variant > store availabilities > store availability > location

 

I only see inventory reflected from our first location which also has store pickup enabled. Additional locations which also all do not have store pickup enabled do not reflect in product.available, variant.available, variant.store_availabilities[index].location. Shopify admin product clearly shows multiple locations with corresponding inventory per location.

A related thread
https://community.shopify.com/c/technical-q-a/shopify-liquid-store-availability-is-empty/m-p/2114885...