Definitions reference
This page lists every definition Weft reads, with the exact type and key. The step-by-step guides (lead times, fabrics, galleries, complete the set, dimensions) tell you when to create each one.
How to read the tables:
- Name is what you type in the admin. You can change it.
- Key or Type must match exactly. Shopify fills it in from the name, so check it before saving.
- Admin type is what you pick under Select type. API type is the same type as the Admin API names it, for developers.
- Storefronts access must be on for every definition. Without it the theme can't read the data.
Create these in Settings > Metafields and metaobjects, under metaobject definitions, with Add definition.
Lead time #
| Setting | Value |
|---|
| Name | Lead time |
| Type | lead_time |
| Display name | Label |
| Access | Storefronts: on |
| Field name | Key | Admin type | API type | Validation | Required |
|---|
| Label | label | Single line text, one value | single_line_text_field | None | Yes |
| Min weeks | min_weeks | Integer | number_integer | Optional: minimum 0 | No |
| Max weeks | max_weeks | Integer | number_integer | Optional: minimum 0 | No |
| Note | note | Multi-line text | multi_line_text_field | None | No |
What the theme does with each field:
- Label is the text shoppers see on the product page and product cards, for example "Made to order, 6–8 weeks".
- Min weeks and Max weeks build the short form used in the cart ("Ships in 6–8 weeks"), on the order ("Lead time: 6–8 weeks"), in the sticky add to cart bar and for estimated ship dates. Leave both empty and the theme uses the label instead.
- Note shows under the lead time when the Lead time block's "Show the lead time note" is on.
Fabric grade #
| Setting | Value |
|---|
| Name | Fabric grade |
| Type | fabric_grade |
| Display name | Name |
| Access | Storefronts: on |
| Field name | Key | Admin type | API type | Validation | Required |
|---|
| Name | name | Single line text, one value | single_line_text_field | None | Yes |
| Sort order | sort_order | Integer | number_integer | None | No |
| Description | description | Multi-line text | multi_line_text_field | None | No |
| Price note | price_note | Single line text, one value | single_line_text_field | None | No |
| Lead time | lead_time | Metaobject, one entry | metaobject_reference | Metaobject definition: Lead time | No |
- Name is the group heading, for example "Grade B, Bouclé and weaves".
- Sort order puts grades in order, lowest number first. A grade without a number sorts as 99. Fabrics without any grade come last.
- Price note shows next to the grade heading in the fabric dialog and the fabric library, for example "Included" or "From +$300". In the picker on the product page, the theme shows the real price difference from your variant prices and uses the note only when it can't work one out.
- Lead time applies to every fabric in this grade, unless the fabric or variant has its own.
Fabric #
| Setting | Value |
|---|
| Name | Fabric |
| Type | fabric (or the type set in Theme settings > Fabrics and samples > Fabric metaobject type) |
| Display name | Name |
| Access | Storefronts: on |
| Active-draft status | On |
| Field name | Key | Admin type | API type | Validation | Required |
|---|
| Name | name | Single line text, one value | single_line_text_field | None | Yes |
| Swatch image | swatch_image | File, one file | file_reference | Accepted file types: Images | Yes |
| Swatch color | swatch_color | Color | color | None | No |
| Large image | large_image | File, one file | file_reference | Accepted file types: Images | No |
| Gallery | gallery | File, list of files | list.file_reference | Accepted file types: Images | No |
| Grade | grade | Metaobject, one entry | metaobject_reference | Metaobject definition: Fabric grade | No |
| Material | material | Single line text, one value | single_line_text_field | Optional: Limit to preset choices | No |
| Color family | color_family | Single line text, list of values | list.single_line_text_field | Optional: Limit to preset choices | No |
| Features | features | Single line text, list of values | list.single_line_text_field | Optional: Limit to preset choices | No |
| Composition | composition | Single line text, one value | single_line_text_field | None | No |
| Care | care | Rich text | rich_text_field | None | No |
| Lead time | lead_time | Metaobject, one entry | metaobject_reference | Metaobject definition: Lead time | No |
| Sample variant | sample_variant | Product variant, one variant | variant_reference | None | No |
| Sort order | sort_order | Integer | number_integer | Optional: minimum 0 | No |
- Name is the fabric's name as shoppers see it. It must be the definition's display name: when you link a product's Fabric option to the fabric list, Shopify names each option value after the entry's display name, and the theme matches option values to fabrics by that name.
- Swatch image is the small square in the picker, cart and product cards. Use a square photo of the cloth, at least 400 × 400 px. If you only have colors, you can untick Required and fill in Swatch color instead.
- Large image is the preview in the fabric dialog and the fabric library, and the image that zooms. Use 2000 px or wider.
- Gallery holds close-ups of the fabric. The product gallery can add them after the product photos.
- Material, Color family and Features become the filter chips in the fabric dialog and the fabric library, and search terms. Preset choices keep spelling consistent, for example Color family: Neutral, White, Gray, Black, Brown, Red, Pink, Yellow, Green, Blue; Features: Performance, Pet-friendly, Outdoor, Stain-resistant.
- Composition, for example "55% linen, 45% cotton", shows under the fabric name. If it's empty, the theme shows Material.
- Care shows in the fabric preview and in the "Materials and care" detail row.
- Sample variant is only needed when your sample product's option values don't use the same names as your fabrics. See samples.
- Sort order sets the order of fabrics within a grade on the fabric library page, lowest number first. Fabrics without a number follow, by name. Leave the field out if alphabetical order suits you.
Fabric gallery (tier 3) #
| Setting | Value |
|---|
| Name | Fabric gallery |
| Type | fabric_gallery |
| Display name | Label |
| Access | Storefronts: on |
| Field name | Key | Admin type | API type | Validation | Required |
|---|
| Fabric | fabric | Metaobject, one entry | metaobject_reference | Metaobject definition: Fabric | Yes |
| Images | images | File, list of files | list.file_reference | Accepted file types: Images | Yes |
| Label | label | Single line text, one value | single_line_text_field | None | No |
The label is for you, for example "Harlow sofa / Oat Linen". Shoppers don't see it.
Product group (complete the set) #
| Setting | Value |
|---|
| Name | Product group |
| Type | product_group |
| Display name | Name |
| Access | Storefronts: on |
| Field name | Key | Admin type | API type | Validation | Required |
|---|
| Name | name | Single line text, one value | single_line_text_field | None | Yes |
| Products | products | Product, list of products | list.product_reference | None | No |
Create these in Settings > Metafields and metaobjects > Products (or Variants) with Add definition. Type custom. followed by the key in Namespace and key.
| Owner | Name | Namespace and key | Admin type | API type | Validation | Storefronts | Tier |
|---|
| Product | Lead time | custom.lead_time | Metaobject, one entry | metaobject_reference | Metaobject definition: Lead time | On | 1 |
| Variant | Lead time | custom.lead_time | Metaobject, one entry | metaobject_reference | Metaobject definition: Lead time | On | 1 |
| Product | Fabrics | custom.fabrics | Metaobject, list of entries | list.metaobject_reference | Metaobject definition: Fabric | On | 2 |
| Product | Fabric galleries | custom.fabric_galleries | Metaobject, list of entries | list.metaobject_reference | Metaobject definition: Fabric gallery | On | 3 |
| Product | Shared images | custom.shared_media | File, list of files | list.file_reference | Accepted file types: Images | On | 3 |
| Product | Product group | custom.product_group | Metaobject, one entry | metaobject_reference | Metaobject definition: Product group | On | Extra |
| Product | Width | custom.width | Dimension | dimension | None | On | Extra |
| Product | Depth | custom.depth | Dimension | dimension | None | On | Extra |
| Product | Height | custom.height | Dimension | dimension | None | On | Extra |
| Product | Seat height | custom.seat_height | Dimension | dimension | None | On | Extra |
| Product | Seat depth | custom.seat_depth | Dimension | dimension | None | On | Extra |
| Product | Arm height | custom.arm_height | Dimension | dimension | None | On | Extra |
| Variant | Width, Depth, Height (and the other dimension keys) | custom.width, custom.depth, custom.height | Dimension | dimension | None | On | Extra |
Notes:
custom.fabrics can have a different namespace and key if you set Theme settings > Fabrics and samples > Fabric list metafield to match. All other keys are fixed in version 1.0.0.
- You don't fill in
custom.fabrics by hand. Once the product's Fabric option is linked to it, Shopify keeps it in the same order as the option values and blocks direct edits. See link the Fabric option.
- The Dimensions block reads width, depth and height. The Dimensions detail row reads all six. Both read the selected variant's value first and fall back to the product's. See dimensions per size.
Data the theme writes to carts and orders #
| What | Where it shows | Controlled by |
|---|
Line item property Lead time, for example "6–8 weeks" | Checkout, the order in your admin, order emails if you add the snippet | Theme settings > Lead times > Save lead time on the order: Visible at checkout (Lead time) |
Line item property _lead_time | The order in your admin only | Same setting: Admin only (_lead_time) |
Cart attribute Longest lead time | The order in your admin (Additional details), order emails with the snippet | Theme settings > Lead times > Save the longest lead time on the order |
The cart and the cart drawer show the lead time worked out from your current data, not the value saved when the item was added. If you change a lead time, carts update on their next view. The cart attribute follows.