PlutocracyMercury developer docs

MercuryConfig

window._mercury: the MERCURY.* shop metafields and page context, lowercase keys.

Type: object

FieldTypeDescription
locale optionalstring
currency optionalstring
delimiter optionalstring | null
sizemapping optionalany
colourmapping optionalnull | { [key]: string }
Fields
FieldTypeDescription
[key: string]string

Any further keys.

facetmapping optionalany
imagemapping optionalnull | { [key]: string }
Fields
FieldTypeDescription
[key: string]string

Any further keys.

grid optionalnull | { [key]: any }

The store's grid layout (MERCURY.GRID). When absent the bundle requests grid_config.

Fields
FieldTypeDescription
[key: string]any

Any further keys.

bypasstoken optionalstring | null

Storefront bypass token (MERCURY.BYPASSTOKEN).

myshopify optionalstring

The shop's myshopify domain (used for preview links).

collection optionalstring

Collection handle, or "search".

designmode optionalboolean
kit optionalnull | 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.