We have several physical locations of our stores. We would like to let our customers know how many products are in stock at which location. For example:
123 Main St - 4 in stock
456 Other St - 2 in stock
I have created a private app and tested the InventoryItems and Location APIs with Postman and I am able to make requests, but I am not sure how to integrate this with my theme on Shopify.
Solved! Go to the solution
This is an accepted solution.
In order to have inventory information available on your online store (i.e. within your theme), this data needs to exist within Liquid (Shopify's language that acts as the data layer for your online store). Since you are not able to get inventory information on a per location basis within liquid, one option to display this data within your theme you could employ metafields to populate the inventory values from your private application, which you can then access from within your theme.
Here is an article that outlines how to use metafields within your theme:
Additionally, here is our official documentation regarding metafields in Liquid and REST API.
If you are looking for a more extensive solution you can also check out my app which lets you display inventory information per location on the product pafge and more :)