Documentation menu

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.

Metaobject definitions #

Create these in Settings > Metafields and metaobjects, under metaobject definitions, with Add definition.

Lead time #

SettingValue
NameLead time
Typelead_time
Display nameLabel
AccessStorefronts: on
Field nameKeyAdmin typeAPI typeValidationRequired
LabellabelSingle line text, one valuesingle_line_text_fieldNoneYes
Min weeksmin_weeksIntegernumber_integerOptional: minimum 0No
Max weeksmax_weeksIntegernumber_integerOptional: minimum 0No
NotenoteMulti-line textmulti_line_text_fieldNoneNo

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 #

SettingValue
NameFabric grade
Typefabric_grade
Display nameName
AccessStorefronts: on
Field nameKeyAdmin typeAPI typeValidationRequired
NamenameSingle line text, one valuesingle_line_text_fieldNoneYes
Sort ordersort_orderIntegernumber_integerNoneNo
DescriptiondescriptionMulti-line textmulti_line_text_fieldNoneNo
Price noteprice_noteSingle line text, one valuesingle_line_text_fieldNoneNo
Lead timelead_timeMetaobject, one entrymetaobject_referenceMetaobject definition: Lead timeNo
  • 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 #

SettingValue
NameFabric
Typefabric (or the type set in Theme settings > Fabrics and samples > Fabric metaobject type)
Display nameName
AccessStorefronts: on
Active-draft statusOn
Field nameKeyAdmin typeAPI typeValidationRequired
NamenameSingle line text, one valuesingle_line_text_fieldNoneYes
Swatch imageswatch_imageFile, one filefile_referenceAccepted file types: ImagesYes
Swatch colorswatch_colorColorcolorNoneNo
Large imagelarge_imageFile, one filefile_referenceAccepted file types: ImagesNo
GallerygalleryFile, list of fileslist.file_referenceAccepted file types: ImagesNo
GradegradeMetaobject, one entrymetaobject_referenceMetaobject definition: Fabric gradeNo
MaterialmaterialSingle line text, one valuesingle_line_text_fieldOptional: Limit to preset choicesNo
Color familycolor_familySingle line text, list of valueslist.single_line_text_fieldOptional: Limit to preset choicesNo
FeaturesfeaturesSingle line text, list of valueslist.single_line_text_fieldOptional: Limit to preset choicesNo
CompositioncompositionSingle line text, one valuesingle_line_text_fieldNoneNo
CarecareRich textrich_text_fieldNoneNo
Lead timelead_timeMetaobject, one entrymetaobject_referenceMetaobject definition: Lead timeNo
Sample variantsample_variantProduct variant, one variantvariant_referenceNoneNo
Sort ordersort_orderIntegernumber_integerOptional: minimum 0No
  • 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.
SettingValue
NameFabric gallery
Typefabric_gallery
Display nameLabel
AccessStorefronts: on
Field nameKeyAdmin typeAPI typeValidationRequired
FabricfabricMetaobject, one entrymetaobject_referenceMetaobject definition: FabricYes
ImagesimagesFile, list of fileslist.file_referenceAccepted file types: ImagesYes
LabellabelSingle line text, one valuesingle_line_text_fieldNoneNo

The label is for you, for example "Harlow sofa / Oat Linen". Shoppers don't see it.

Product group (complete the set) #

SettingValue
NameProduct group
Typeproduct_group
Display nameName
AccessStorefronts: on
Field nameKeyAdmin typeAPI typeValidationRequired
NamenameSingle line text, one valuesingle_line_text_fieldNoneYes
ProductsproductsProduct, list of productslist.product_referenceNoneNo

Metafield definitions #

Create these in Settings > Metafields and metaobjects > Products (or Variants) with Add definition. Type custom. followed by the key in Namespace and key.

OwnerNameNamespace and keyAdmin typeAPI typeValidationStorefrontsTier
ProductLead timecustom.lead_timeMetaobject, one entrymetaobject_referenceMetaobject definition: Lead timeOn1
VariantLead timecustom.lead_timeMetaobject, one entrymetaobject_referenceMetaobject definition: Lead timeOn1
ProductFabricscustom.fabricsMetaobject, list of entrieslist.metaobject_referenceMetaobject definition: FabricOn2
ProductFabric galleriescustom.fabric_galleriesMetaobject, list of entrieslist.metaobject_referenceMetaobject definition: Fabric galleryOn3
ProductShared imagescustom.shared_mediaFile, list of fileslist.file_referenceAccepted file types: ImagesOn3
ProductProduct groupcustom.product_groupMetaobject, one entrymetaobject_referenceMetaobject definition: Product groupOnExtra
ProductWidthcustom.widthDimensiondimensionNoneOnExtra
ProductDepthcustom.depthDimensiondimensionNoneOnExtra
ProductHeightcustom.heightDimensiondimensionNoneOnExtra
ProductSeat heightcustom.seat_heightDimensiondimensionNoneOnExtra
ProductSeat depthcustom.seat_depthDimensiondimensionNoneOnExtra
ProductArm heightcustom.arm_heightDimensiondimensionNoneOnExtra
VariantWidth, Depth, Height (and the other dimension keys)custom.width, custom.depth, custom.heightDimensiondimensionNoneOnExtra

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 #

WhatWhere it showsControlled by
Line item property Lead time, for example "6–8 weeks"Checkout, the order in your admin, order emails if you add the snippetTheme settings > Lead times > Save lead time on the order: Visible at checkout (Lead time)
Line item property _lead_timeThe order in your admin onlySame setting: Admin only (_lead_time)
Cart attribute Longest lead timeThe order in your admin (Additional details), order emails with the snippetTheme 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.