Access Locations globally

Short description of issue

Cannot access Shopify Locations globally in Liquid

Reproduction steps

We use Locations for referencing retail stores and other types of inventory locations.

We would like to be able to loop through Locations on a page and list all locations with various information (opening hours, address, etc.)

At the moment it does not appear to be possible to access all Locations in Liquid wthout various hacks. This seems quite strange - why not provide a standard approach to this via a liquid variable?

Known workarounds

  1. Use Shopify Flow to maintain a Shop Metafield JSON containing locations
  2. Create a dummy product which has inventory activated on all locations, but stock set to 0. Then use this product to output all locations on a page using location availability list on the variant.

Additional info

Is this not a requested feature? We have a standard object for Locations, why can’t we use it?

Seems like the storefront API already supports this - why not liquid?

What type of topic is this

Feature request

Hey @Evaldas_Raisutis :waving_hand: - thanks for reaching out. At the moment, you’re right that locations are essentially “gated” behind product variants:

I think using a Metafield is the more robust workaround, but I definitely understand not having locations in general available as Liquid objects isn’t ideal.

Would your use case essentially just be having a generic “locations” object that can be surfaced on any page which you could then use to show general location info per what you share there, that sort of thing? I can’t guarantee anything on my end, but I’m happy to check to see if this is on the roadmap or if I can log a feature request for you at the very least. Hope to speak with you soon!

Hi Alan,

Yes exactly - we would just like to be able to access locations globally, much like the storefront API already allows already. Having some parity between the storefront API and liquid in this area would save some headaches.

Thanks @Evaldas_Raisutis - I’ll speak with some folks internally to see if we can confirm if this on the roadmap, and I’ll loop back here with you once I have more info to share. Appreciate your clarifications on this and speak with as soon as I have next steps :slight_smile:

Hey @Evaldas_Raisutis :waving_hand: - following up here. Just wanted to confirm this is something we’re looking at implementing in the medium term. I don’t have an exact turnaround time, but if you did have a specific shop/merchant you were working with that needed this implemented just let me know and I can look into this further for you!

Hope this helps!

Hey @Alan_G,

Hope its fine that I interfere. We do in fact have a merchant who needs this, as locations in this case refers to physical stores, but also stores that sell the products, including specific inventory to a selected store (location). A list of locations globally would allow us to present customers with a store selector. Customers can select pick up location from storefront homepage, and a store locator that shows store locations on a map, all from a single source.

Hi Alan, so awesome. As Mark (my colleague) has mentioned we do in fact have a concrete case for a Shopify Plus client, so it would be awesome if this could come sooner rather than later haha.

Hey @MarkAskoe and @Evaldas_Raisutis :waving_hand: thanks for following up! I’ll send you folks a DM here in a moment :slight_smile:

Hey @Alan_G ,

I’m wondering if you have any further information on this? We are very keen for a locations object in liquid - we’re doing a lot of workarounds just to get a list of location IDs, which would definitely be helped a lot if there was a locations object available.

Thank you so much,
Adam

Hey @adamwooding - thanks for checking in here.

Just confirming there isn’t a public global locations Liquid object available at the moment, and I don’t have a firm ETA I can share yet. The current public options are still using the Storefront API for pickup-supporting locations, or maintaining location data in a metafield/metaobject if you need to render it directly in Liquid across pages.

That said, if this is for a specific merchant/shop, I can set up a DM so we can grab the myshopify.com domain and a bit more detail on what you need exposed in Liquid, like whether it’s just location IDs or full location/address/metafield data. I can check what’s possible on our end from there.

Let me know if I can clarify anything on our end here!

Hey @Alan_G , thank you so much for your reply :folded_hands:t5:

My use case is actually for a public Shopify app, not a specific merchant. I’m building a theme extension which will show location opening hours, addresses, and other information.

As you suggested, we are currently maintaining a metaobject with location data, but it would be extremely helpful if there was a public global locations liquid object.

I hope that this is something that the Shopify team is able to make possible :slight_smile:

Hey @adamwooding - no worries, thanks for clarifying. That context is really helpful.

For a public app/theme extension use case, I definitely get why a shop-specific path doesn’t really solve this. For now, the most reliable public approach is still what you’re already doing: syncing the location data your app needs into a metaobject/metafield and rendering that in Liquid.

I definitely get that’s not super ideal, especially where the source data already exists on Shopify and you’re mostly needing IDs, opening hours, addresses, and related location details.

I’ll pass this along as additional app-scale/public distribution context for the feature request, since that’s a bit different from enabling something for a single merchant. If you’re open to sharing the exact fields your extension needs, like whether it’s just IDs/address data or also hours/location metafields/pickup details, that would be helpful context to include.

Let me know if I can clarify anything on our end here!