Purpose#
StoresStructuredData emits Schema.org JSON-LD (ItemList of LocalBusiness) for the store-locator page, so search engines and AI agents can answer local/maps and "nearest store" queries.Where it's rendered#
Rendered from Components/Stores/Default.liquid:{% render 'Reusables\StoresStructuredData\Default', groups: stores, organizationName: organizationName %}
model.Settings.Groups: a list of store groups, each with a title and a stores array.
Parent organization name; also used as a name fallback when a store has none.
Model shape (storefront example)#
[
{
"title": "Sample region",
"stores": [
{
"name": "Sample store",
"phone": "Sample text",
"email": "sample@example.com",
"url": "https://example.com/sample",
"latitude": 37.9838,
"longitude": 23.7275,
"address": {
"address1": "Sample street 1",
"city": "Sample city",
"state": "Sample state",
"postalCode": "00000",
"country": "Sample country"
}
}
]
}
]
Template behavior (Liquid + Alpine)#
Renders nothing when there are no groups, or when the total store count across all groups is 0.
Iterates every group's stores, emitting one ListItem per store with a running position counter across all groups.
Store name falls back to organizationName, then to the group's title, in that order.
address (as PostalAddress) and geo (as GeoCoordinates) are included only when the corresponding source fields are present; each address sub-field (streetAddress, addressLocality, addressRegion, postalCode, addressCountry) is optional and independently guarded.
Data contract (JS runtime)#
No client-side runtime state; all data is read directly from the Liquid render parameters at render time.JavaScript#
File: Reusables/StoresStructuredData/Default.js
Exposes: storesstructureddatareusabledefault (currently an empty object)The JSON-LD block is fully server-rendered; the global only reserves a unique name in the concatenated componentscripts.js bundle.Global Alpine stores#
None. This reusable does not read or update any Alpine store.Services / API calls#
None. All data (store groups) is passed in as a render parameter; there are no client-side API calls.Dependencies#
Liquid: Reusables/StoresStructuredData/Default.liquid
JS: Reusables/StoresStructuredData/Default.js
Translations: Reusables/StoresStructuredData/Default.json
Notes#
geo requires both latitude and longitude to be present; a store with only one of the two won't get a geo block.
Modified at 2026-07-24 07:43:52