Store locator guide
Add a store locator to Shopify without an app
What you’ll need
A spreadsheet of your locations (CSV with a header row)
How to get this: A spreadsheet of your locations
- One row per shop or stockist: name, address, and latitude and longitude if you have them.
- Save it as CSV (File › Download › CSV in Google Sheets, or Save As › CSV in Excel).
Latitude and longitude for each location (a free batch geocoder fills them in from addresses)
How to get this: Latitude and longitude for each location
US: the free Census batch geocoder (10,000 addresses per file). Elsewhere: copy coordinates from a map app.
The theme editor (to add a Custom Liquid block; no code editing)
How to get this: The theme editor
- Online Store › Themes › Edit theme (on a copy of your theme if you want to test first).
- Add section or Add block › Custom Liquid, paste the code, then Save.
Set it up
- Put your locations in a spreadsheet with a header row: Name, Address, City, State, Zip, and optionally Phone, Website and Hours. Latitude and Longitude columns are used as they are.
- Load it in the Store Locator Builder. Locations without coordinates get them from the free Census batch geocoder (US) or a map app.
- In Shopify: Online Store › Pages › Add page, title “Find a store”, and Save.
- Online Store › Themes › Customize. In the page menu at the top choose Pages › Create template, name it store-locator (based on Default page) and create it. Sections added in the theme editor belong to a template, so adding the locator to the Default page template would put it on every page that uses it, such as About us.
- In the new template click Add section › Custom Liquid, paste the code and Save.
- Back in Online Store › Pages, open Find a store, set Theme template to store-locator and Save.
- Add the page to your menu in Content › Menus so shoppers can find it.
What shoppers get
- A street map with a pin per location; tapping a pin shows the name, address and a Directions link to Google Maps.
- A list beside the map (above it on phones) they can filter by typing a town, state, ZIP code or store name.
- Near me: with the shopper’s permission, the browser’s location sorts the list by distance in miles or kilometres. The location never leaves their device.
- Phone numbers are tap-to-call links on phones.
Why it’s free
Most store locator apps pay for Google Maps and pass the cost on. This one uses MapLibre GL JS, an open-source map library, with tiles from OpenFreeMap, which needs no API key and has no usage limits for websites. The map shows the attribution OpenStreetMap’s license requires: “OpenFreeMap © OpenMapTiles Data from OpenStreetMap”.
Updating locations
Edit your spreadsheet, load it in the builder again, and replace the code in the Custom Liquid section. Keep the CSV with coordinates the builder gives you, so you don’t need to look them up again.
Questions
How many locations can it show?
Hundreds. The locations are stored in the section itself, about 150 to 250 characters each, and filtering happens in the shopper’s browser. For thousands of locations, split them into one page per region.
Does it slow down my page?
The map library (about 1 MB, cached by the browser) only loads when the locator scrolls near the screen, so the rest of the page loads as before. The list shows straight away.
Can shoppers search by address?
They can filter by any word in a location’s name or address, such as a town, state or ZIP code. Turning a typed address into a position needs a paid geocoding service, so the Near me button uses the browser’s own location instead.
Related tools and guides
- Liquid Snippet Studio
More no-app theme code