MercuryConfig
window._mercury: the MERCURY.* shop metafields and page context, lowercase keys.
Type: object
| Field | Type | Description | ||||||
|---|---|---|---|---|---|---|---|---|
locale optional | string | |||||||
currency optional | string | |||||||
delimiter optional | string | null | |||||||
sizemapping optional | any | |||||||
colourmapping optional | null | { [key]: string } | Fields
| ||||||
facetmapping optional | any | |||||||
imagemapping optional | null | { [key]: string } | Fields
| ||||||
grid optional | null | { [key]: any } | The store's grid layout (MERCURY.GRID). When absent the bundle requests grid_config. Fields
| ||||||
bypasstoken optional | string | null | Storefront bypass token (MERCURY.BYPASSTOKEN). | ||||||
myshopify optional | string | The shop's myshopify domain (used for preview links). | ||||||
collection optional | string | Collection handle, or "search". | ||||||
designmode optional | boolean | |||||||
kit optional | null | Manifest | The MERCURY.KIT metafield. |
Example (illustrative)
{
"locale": "string",
"currency": "AUD",
"delimiter": "string",
"sizemapping": null,
"colourmapping": {
"key": "#1f6feb"
},
"facetmapping": null,
"imagemapping": {
"key": "string"
},
"grid": {
"key": null
},
"bypasstoken": "<token>",
"myshopify": "example-store.myshopify.com",
"collection": "string",
"designmode": false,
"kit": {
"sdk": "string",
"app": {
"url": "https://cdn.shopify.com/s/files/1/0000/0001/files/linen-shirt.jpg"
},
"bundles": [
{
"url": "https://cdn.shopify.com/s/files/1/0000/0001/files/linen-shirt.jpg"
}
],
"flags": {}
}
}Declared in api-types/src/kit-contract/v1/theme.ts.