- Getting Started
- Liquid reference
- Filters reference
- Tags reference
- Localization
- Theme structure
- Theme sections
- Theme assets
- Theme config
- Theme layout
- Theme templates
-
- article.liquid
- blog.liquid
- cart.liquid
- collection.liquid
- customer/account.liquid
- customer/addresses.liquid
- customer/details.liquid
- customer/login.liquid
- customer/order.liquid
- customer/register.liquid
- customer/reset-password.liquid
- home.liquid
- page.no-heading.liquid
- products.liquid
- search.liquid
- list-collections.liquid
- store-locator.liquid
- 404.liquid
- customer/activate_account.liquid
- customer/orders.liquid
- Submission
store-locator.liquid
The store-locator.liquid template renders the shop's store locations and pickup points. It is loaded when a visitor goes to the /store-locator URL.
Loop through the locations array to output each store. Every item is a location object with attributes such as location.name, location.phone, location.email and its address fields. More info ›
{% for location in locations %}
<strong>{{ location.name }}</strong>
{% if location.phone %}
<a href="tel:{{ location.phone }}">{{ location.phone }}</a>
{% endif %}
<address>
{{ location.address1 }}<br>
{{ location.city }}, {{ location.zip }}<br>
{{ location.province }}, {{ location.country }}
</address>
{% endfor %}
location.formatted
Returns the full address as a single string. It is useful for building a link to a map service so visitors can navigate to the store.
<a href="https://www.google.com/maps?q={{ location.formatted }}" target="_blank">
{{ 'general.store_locator.navigate' | t }}
</a>
When the shop has no locations, show a fallback message instead of an empty list.
{% if locations.size > 0 %}
<!-- render locations -->
{% else %}
<p>{{ 'general.store_locator.location_not_found' | t }}</p>
{% endif %}