Metafields and metaobjects
The Shopify metafields and metaobjects the theme reads, their types, and the files that read them.
This repository defines none of this data. The definitions live in Shopify admin under Settings > Custom data, and staff edit values on each product, page, collection or metaobject entry.
Nothing guarantees any of these values are set, so the theme must work when each one is absent.
Product metafields the theme owns
| Metafield | Type | Drives | Read by |
|---|---|---|---|
custom.pay_in_store_amount | Number | Pay-in-clinic price for a treatment | snippets/medispa-calendar-config.liquid |
custom.enable_pay_in_store | Boolean | Whether the pay-in-clinic option shows | snippets/medispa-calendar-config.liquid |
custom.enable_checkout | Boolean | Whether the deposit option shows. Absent means enabled | snippets/medispa-calendar-config.liquid |
custom.klaviyo_booking_form_id_desktop | Text | Booking form, desktop | snippets/medispa-calendar-config.liquid |
custom.klaviyo_booking_form_id_mobile | Text | Booking form, mobile | snippets/medispa-calendar-config.liquid |
custom.klaviyo_form_id_desktop | Text | Offers popup, desktop | snippets/pdp-offers-cta.liquid, snippets/product-form-redesign-medispa.liquid |
custom.klaviyo_form_id_mobile | Text | Offers popup, mobile | snippets/pdp-offers-cta.liquid, snippets/product-form-redesign-medispa.liquid |
custom.max_allowed_popups | Number | Nothing. No script reads the value Liquid writes | snippets/popup-logic.liquid, only when the popup blacklist has entries |
custom.medispa_location | Text | Clinic association | snippets/location-contact-details.liquid, snippets/product-accordion.liquid |
custom.colour_swatch_data | JSON | Swatch rendering and filters | snippets/product-form-redesign.liquid, snippets/select-options-modal.*.liquid |
custom.related_products | List | Related treatments and callouts | sections/medispa-*.liquid, layout/theme.discovery-bar.liquid |
custom.displayed_rrp | Number | Recommended retail price shown beside the price | sections/pdp-main.liquid, sections/product-template-redesign*.liquid |
custom.enable_pre_order | Boolean | Pre-order behaviour | snippets/pdp-atc-button.liquid, snippets/product-form-redesign*.liquid |
custom.pre_order_message | Text | Pre-order wording | snippets/pdp-atc-button.liquid, snippets/product-form-redesign*.liquid |
gift_product.product | Product | Gift tied to this product | layout/theme.liquid |
gift_product.required_quantity | Number | Quantity required to unlock it | layout/theme.liquid |
Page metafields
| Metafield | Type | Drives |
|---|---|---|
custom.pay_in_store | Boolean | Overrides custom.enable_pay_in_store for every treatment on the page |
custom.medispa_landing_page | Reference | Australia only. Supplies offer_price. Absent on Hong Kong |
The theme detects custom.pay_in_store by the metafield's type, not its value, so an explicit false still
overrides. Delete the metafield to give control back to each product.
Collection metafields
| Metafield | Type | Drives | Read by |
|---|---|---|---|
custom.klaviyo_form_id_desktop | Text | Klaviyo form opened on collection pages, desktop | snippets/popup-logic.liquid |
custom.klaviyo_form_id_mobile | Text | Klaviyo form opened on collection pages, below 768 px | snippets/popup-logic.liquid |
When routes.root_url has a language or market prefix, the snippet appends it to the key with hyphens changed to
underscores. Under /zh-TW, for example, it reads custom.klaviyo_form_id_desktop_zh_TW. The snippet only runs while
the popup manager is enabled. See Operations: popups.
Metaobjects
| Definition | Fields the theme reads | Used by |
|---|---|---|
medispa_locations | display_name, address, display_phone_number, phone_number, store_hours | The booking calendar's clinic tabs and details panel |
minicart_free_gifts | Entry list | The mini-cart Free gift block |
product_bundles | Entry list | Bundle display |
The mini-cart's Free gift block takes the definition name as a setting, with minicart_free_gifts as the default. If
the setting names a definition that does not exist, the block renders nothing and shows no error.
Metafields owned by apps
The theme reads these, but the apps own them. Do not write to them, and expect them to disappear when the app is uninstalled.
| Namespace | App |
|---|---|
hulkapps_wishlist | HulkApps Wishlist |
spr | Shopify Product Reviews |
secomapp | Secomapp Free Gifts |
etranslate | eTranslate |
product_schema | A structured data app |
shappify_qb, shappify_bundle | Shappify |
brodev_scn | BroDev |
stamped | Stamped reviews |
sf_product_tabs, sf_collection_footer | Shopify FD tabs |
loox | Loox reviews |
opinew_metafields | Opinew reviews |
Several of these belong to apps the store no longer uses, and the Liquid that reads them is still present. See Legacy and unused code.
Reading a metafield safely
Use an explicit fallback chain instead of assuming the value exists. snippets/medispa-calendar-config.liquid checks
the product's own value, then a page override, then a theme setting, then a literal default.
For a boolean that can be false on purpose, test type instead of the value, or pass allow_false: true to the
default filter. Without that, Liquid's default treats false as absent and replaces a deliberate "off" with the
fallback, and no error appears.
Related
- Operations: Medispa booking explains how staff edit these.
- Architecture: Medispa booking explains how they combine.