# Size Chart

The size chart metafield gives every product a "Size Chart" link on the PDP. Click it, a modal opens with whatever size info you've set up.

## Setting up the metafield

1. Shopify admin → **Settings** → **Custom data** → **Products**
2. **Add definition**
3. Fill in:
   * **Name**: Size Chart
   * **Namespace and key**: `custom.size_chart`
   * **Type**: **Rich text** (this is important — not single-line text)
4. Save

The "Rich text" type is what lets you embed a table inside the metafield value, which is what most size charts are.

## Filling in the size chart per product

1. Open a product in admin
2. Scroll to **Metafields**
3. Find **Size Chart**
4. Click into the rich text editor
5. Paste or type your size chart

The rich text editor in Shopify supports:

* Tables (this is what you'll mostly use)
* Bold, italic, links
* Bullet lists
* Headings

## Example: simple size chart

Most apparel brands use a table. Here's the rough structure:

| Size | Chest | Length | Sleeve |
| ---- | ----- | ------ | ------ |
| S    | 38"   | 27"    | 24"    |
| M    | 40"   | 28"    | 25"    |
| L    | 42"   | 29"    | 26"    |
| XL   | 44"   | 30"    | 27"    |

Paste it into the rich text editor as a table.

## Sharing one size chart across many products

Manually filling in the same chart on 200 t-shirts is painful. Two strategies:

* **Bulk import via Matrixify/Excelify** — export all products, fill in the size chart column once, paste it everywhere, re-import
* **Use product tags + custom liquid** — tag products with `size:tshirt`, then create one rich-text metafield template per category. Requires light theme customization (we can do this for you via [WEBEXP](https://webexp.dev/pages/hire-us)).

For most brands, just doing it once per product type via Matrixify is the right move.

## What if the modal doesn't open?

If you've added the metafield value but clicking "Size Chart" on the PDP does nothing:

* Make sure the metafield **type** is **Rich text** (not Single line text)
* Check the namespace and key are exactly `custom.size_chart`
* Hard refresh the storefront (`Cmd + Shift + R`)

If you used a different type (like Single line text), the value won't render correctly inside the modal — you'll need to delete the definition, recreate it as Rich text, and re-fill values.

## Removing the size chart on a product

If a product doesn't need a size chart (e.g., a sticker pack), just leave the metafield empty for that product. DRIFT only shows the size chart link if the metafield has a value.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.webexp.dev/drift/drift-studio/metafields/size-chart.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
