Setup overview
Treadle's drawings and made-to-order features read data you keep in your Shopify admin: dimensions and shape settings, 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 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 |
| Drawings | Every product drawn to scale, the fit checks against the shopper's space, To scale collections, room views and the order drawing | Up to 15 product and 7 variant metafield definitions, then the dimensions and a drawing type on each product | 30 minutes, plus about 2 minutes per product |
| 1 | Arrival dates per product, size or fabric grade, 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.
- Reviews: a reviews app and its block in the Reviews section.
- Seat measurements: seat height, seat depth and arm height for the Dimensions detail row.
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. Treadle 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 Treadle 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. Treadle 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. The drawing metafields don't depend on anything.
- 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 #
Drawings and fit (drawings, Your space and fit)
- Product metafields
custom.width,custom.depthandcustom.height(Dimension), and the same three on variants - Product metafield
custom.drawing_type, and the variant one for sizes that change the body - Shape settings:
custom.arm_style,custom.leg_style,custom.back_style,custom.body_style,custom.cushions - Pendants:
custom.dropon products and variants, andcustom.shadesfor linear pendants with several shades - Optional:
custom.drawing,custom.delivery_mode,custom.largest_module,custom.shown_fabric,custom.shown_options - Dimensions and a drawing type on every product
- A page with the
shape-qatemplate, every drawing checked against its photo - Made-to-order variants don't track inventory
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, and on slower fabric grades 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 "Free sample" automatic discount, with Samples are free turned on in Theme settings > Fabrics and samples
- 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 Treadle 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, the dimension keys and the drawing and fit keys) have fixed names in version 1.0.0.
Creating definitions with code #
To fill in values for many products at once, see variants, import and bulk editing. 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.