Setup overview
Weft's made-to-order features read data you keep in your Shopify admin: lead times, fabrics, fabric grades, fabric photos and product groups. Shopify doesn't let themes create that data structure for you, so you create it once. After that, you only add entries, such as a new fabric.
The setup is split into tiers. Each tier works on its own, and you can stop after any of them.
The four tiers #
| Tier | What shoppers get | What you create | Time |
|---|---|---|---|
| 0 | Option buttons with price differences, Shopify's own image and color swatches, variant images, one default lead time everywhere | Nothing | None |
| 1 | A lead time per product, fabric, fabric grade or variant, on the product page, product cards, the sticky add to cart bar, the cart and the order | 1 metaobject definition and 2 metafield definitions, then 2 to 5 lead time entries | 20 minutes |
| 2 | The fabric picker with grades, search and filters, the fabric library page, the fabric strip, fabric samples in the cart | 2 metaobject definitions and 1 metafield definition, 1 entry per fabric, the Fabric option linked on each product, 1 sample product | 1 hour, plus about 2 minutes per fabric |
| 3 | Photos that change with the selected fabric | 1 metaobject definition and 2 metafield definitions, 1 entry per product and fabric | About 3 minutes per product and fabric |
Extras that you can add at any time:
- Complete the set: 1 metaobject definition and 1 metafield definition.
- Dimensions: up to 6 dimension metafield definitions.
Words used in these docs #
Metafield. An extra field on a product or variant, such as "Lead time". You create its definition once in Settings, then fill in a value on each product.
Metaobject. A small record type of your own, such as "Fabric" with a name, swatch image and grade. You create its definition once, then add one entry per fabric.
Type and key. The internal names the theme reads. Weft expects exact names, such as the metaobject type fabric or the metafield custom.lead_time. The display names (for example "Fabric" or "Lead time") can be anything.
Where to click #
- Definitions: in your Shopify admin, go to Settings > Metafields and metaobjects.
- Metafield definitions are listed by owner. Click Products or Variants, then Add definition.
- Metaobject definitions are further down the same page. Click Add definition in that part.
- Entries: go to Content > Metaobjects, click a definition (for example Fabric), then Add entry.
- Metafield values on a product: open the product in Products. The Metafields card is near the bottom of the page.
Rules that apply to every definition #
- Use the exact type and key. The definitions reference lists them. Shopify fills in the key from the name you type, so check it before you save. A metaobject named "Fabric grade" gets the type
fabric_grade, which is correct. A field named "Swatch" would get the keyswatch, which Weft doesn't read; it has to beswatch_image. - Turn on storefront access. In each definition, under Access, tick Storefronts. Without it, the theme can't read the entries and the feature stays hidden.
- Check the display name. Each definition uses one field as the name of its entries in the admin. Weft expects the field shown in the definitions reference. Shopify uses the first text field unless you change it, so add that field first.
- Create definitions in order. A field that points to another metaobject needs that metaobject to exist first. Create Lead time, then Fabric grade, then Fabric, then Fabric gallery and Product group.
- Keep fabric entries Active. The Fabric definition has an active/draft status. The storefront can't read Draft entries, so a Draft fabric drops out of the fabric library and shows as a plain text button in the picker.
Checklist #
Tier 1, lead times (guide)
- Metaobject definition
lead_time - Product metafield
custom.lead_timeand variant metafieldcustom.lead_time - 2 to 5 lead time entries
- Lead time set on each product, or on the fabric or grade in tier 2
- Default lead time and "Save lead time on the order" checked in Theme settings > Lead times
Tier 2, fabrics and samples (fabrics, samples, library)
- Metaobject definitions
fabric_gradeandfabric - Product metafield
custom.fabrics - Grade and fabric entries
- The Fabric option on each product linked to
custom.fabrics - One Unlisted "Fabric samples" product, chosen in Theme settings > Fabrics and samples > Sample product
- A shipping profile with a free rate for the sample product
- Optional: the "first N free" automatic discount
- A page that uses the
fabric-librarytemplate, linked in your menu
Tier 3, photos per fabric (guide)
- Metaobject definition
fabric_gallery - Product metafields
custom.fabric_galleriesandcustom.shared_media - One fabric gallery entry per product and fabric
If you already use other metafields #
If your products already list fabrics in a different metafield, or your fabric metaobject has a different type, point Weft at them in Theme settings > Fabrics and samples:
- Fabric list metafield: the product metafield as
namespace.key, for examplecustom.fabrics. - Fabric metaobject type: for example
fabric.
The field keys inside the fabric metaobject still need to match the definitions reference. The other metafields (custom.lead_time, custom.fabric_galleries, custom.shared_media, custom.product_group and the dimension keys) have fixed names in version 1.0.0.
Creating definitions with code #
Developers can create every definition with the Shopify Admin GraphQL API (metaobjectDefinitionCreate and metafieldDefinitionCreate), using the types, keys and validations in the definitions reference. Setting up data through the API is outside theme support. See the support policy.