Looks and fit data
Toile reads a handful of metafields — custom fields on products, variants and collections. A theme cannot create metafield definitions itself, so you create them once, in your Shopify admin under Settings → Custom data. The namespace and key must match exactly.
Everything here is optional. When a field is empty, the feature that uses it simply does not appear; nothing breaks and no empty boxes are shown.
Looks
A look is an ordinary collection that holds the pieces of one outfit.
Definitions to create
| Where | Namespace and key | Type | Used for |
|---|---|---|---|
| Collection | custom.look_image | File (image) | The photograph of the outfit. If empty, the collection image is used. |
| Collection | custom.look_hotspots | JSON | Points on that photograph, one per piece. |
| Product | custom.looks | Collection reference (list) | Which looks a product belongs to. |
Making a look
- Create a collection, for example Look 04 — Wool coat and wide trousers, and add the productsin the outfit.
- On the collection, set look_image to the outfit photograph.
- Set look_hotspots to a list of points.
xandyare percentages from the top-left cornerof the photograph;handleis the product's handle (the last part of its web address):``
json [ { "handle": "wool-overcoat", "x": 48, "y": 36 }, { "handle": "wide-trousers", "x": 52, "y": 74 } ]``A point whose product is not in the collection is skipped.
- On each product in the look, add the collection to looks. This is what lists the look on theproduct page; Shopify has no fast way to look it up the other way round.
Where looks appear
- Shop the look and Lookbook sections on any page.
- Collection pages: add a Look row block to the Product grid section and choose after which rowit appears.
- Product pages: the Appears in looks block lists the looks a product belongs to.
- Cart: pieces from looks already in the cart are suggested to complete them.
Shoppers can add every available piece of a look in one step. If a piece is sold out, the others are added and the shopper is told which one was not.
Fit data
Definitions to create
| Where | Namespace and key | Type | Example |
|---|---|---|---|
| Variant | custom.measurements | JSON | {"chest": 96, "waist": 80, "length": 68} |
| Product | custom.fit | Single line text | runs_small, true_to_size or runs_large |
| Product | custom.fit_notes | Single line text | Sleeves are long; most people turn them up once. |
| Product | custom.model_info | JSON | {"height": 178, "size": "M"} |
Measurements
Enter each variant's garment measurements in centimeters, measured flat. These names are translated by the theme: chest, waist, hip, length, sleeve, shoulder, inseam. Any other name is shown as you typed it.
With measurements in place, the product page shows:
- a size table built from the data, with the selected size highlighted;
- a size finder: the shopper types their own measurement and is told which size fits, or that theyare between two sizes. The numbers stay in their browser — nothing is saved or sent, and the pagesays so;
- a Size guide link next to the size option, which opens the table;
- the key measurements of the chosen size on each cart line.
Fit
Leave custom.fit empty for true-to-size garments: no note is shown. Use the exact values above, not your own wording — the theme translates them, so a store in several languages shows the right words in each. Put anything else in custom.fit_notes.
Model information
custom.model_info adds a line under the gallery: Model is 178cm and wears M.
Photos per color
With Show only the selected color's media on (Product information section, on by default), picking a color shows that color's photos and the photos every color shares — not the whole set.
The theme works out which photo belongs to which color in this order:
- Alt text. A photo whose alt text is exactly a color's name (
Navy) belongs to that color.So does one tagged#Color_Navy; list several colors with commas (#Color_Navy,Black) for aphoto that belongs to more than one. A photo tagged with every color is shared. - Order. Set a photo on each color's variants. That photo starts the color's group, and everyphoto after it belongs to the same color until the next color's photo. Photos placed before thefirst color's photo are shared and always show.
Nothing is filtered unless at least two colors have their own photo. The Featured product section has the same switch, along with the product page's layout, gallery and image ratio settings.
Product story
Turn on Use the product's story in an Image with text section placed on a product template, and its image, heading and text come from three product metafields (blocks you add show after them). The editorial product template has one under the details already. Create these definitions:
| Where | Namespace and key | Type |
|---|---|---|
| Product | custom.story_image | File (image) |
| Product | custom.story_heading | Single line text |
| Product | custom.story_text | Rich text |
A product without a story image does not show the section at all. The same switch, Hide when the image is empty, is on the Image with text and Image banner sections.