Show inventory exclusive to location selected by customer

Hello!

As mentioned in the subject, I am trying to figure out how to display inventory available specific to a location based on customer’s input

Hopefully this image gives you an idea of what I’m trying to accomplish. For example, if Blueberry Ice has 5 available in St. Catharines and 0 available in Brampton then the following should occur. If the customer selects St. Catharines, they should be able to add it to their cart and if the customer selects Brampton it should show as sold out.

I put a Custom Liquid block in the Default Page template (all our products currently use Default Page template) with the following code to create the dropdown shown in the image above:

.myDiv { text-align: center; } #area { text-align: center; }

Delivery Area:

From my understanding, I’d need to use jQuery to get the options selected by the customer, then I’d need logic like if select = Brampton then show inventory for Brampton (which I have no idea how to do), and then jQuery again to force reload the page.

Any and ALL help is appreciated!

Current theme is Dawn 13.0.1

Thank you

1 Like

Hi @jiajiowdjioajwi

Thanks for posting. I hope your day is going well!

While posting your location inventory on your site isn’t a native option, you can easily achieve this with an app like Product Inventory Information.

This app provides you the ability to show your customers your inventory by location on the product and cart pages. Please note, this is a third party app developed outside of Shopify. As such, any specific questions should be directed to the developer listed on the app listing.

In the meantime, I’d love if you could provide your store’s URL so I can take a look and provide any relative feedback.

Thank you

Hi @jiajiowdjioajwi ! Were you able to achieve what you wanted?

You need to create an app block that takes geolocation and then fetches inventory for that location using the admin API and a custom app.

If you don’t want to write code, you can consider my app, MultiLoca: Location Stock Info, which retrieves customers’ geolocation and assigns the nearest location to each customer. Customers can also choose their location. Once a location is selected, the customer will be able to see the stock for that location only.