How can I sort my online store by location?

How can I sort my online store by location?

NickyAnderson
Visitor
3 0 0

Is there a way to get your online store to sort by location if you have multiple locations set up?

We have a second store opening in a city and we are wanting customers to be able to essentially look at what's stocked at the store that's closest to them rather than looking at everything offered in both stores within the city. I figured this would be an obvious filter to have if you're allowing multiple locations but apparently not as I can't seem to find anything at all talking about this.

Replies 2 (2)

andrija_obradov
Shopify Partner
10 0 1

Hello, 
So as far as I know, there are not any location filters, but there is a solution that comes to my mind. If you are using the free Shopify App, called "Search and Discovery, you could set up a custom filter (in this situation store_location), by creating a store_location metafiled. Then you could add it as a custom filter inside the app. Alternatively, if you don't use this or any app, you could also accomplish this by tweaking the code a little bit.

andrija_obradov_0-1681935901015.png

andrija_obradov_1-1681935976215.png

 

david-jose
Excursionist
25 1 6

You can implement the solution from @andrija_obradov, which is pretty smart, but then you'll have to use some other app to sync the values of your locations with that specific metafield.

 

We were going to do this for one of our clients in the past, and from what I recall there was no simple way to set it up. You'll need a developer that knows what they're doing in order to create a custom switch to show/hide products based on their availability in different locations.

If helpful, please Like & Accept this Solution to help others.
Connect with me on Linkedin or check my website.