Product metafields

Terrazza reads a few metafields (custom fields on products and variants) for its signature features: the "Will it fit?" dimensions, swatch colors, the subtitle, materials and care, and delivery details. Every metafield is optional. A product without them still looks complete; the related block just hides itself or falls back to a default.

Create the definitions once

Create each definition in Settings > Custom data. Choose Products for product metafields and Variants for variant metafields, then select Add definition.

For each definition:

  1. Enter the Name from the tables below.
  2. Change Namespace and key to the exact value shown, for example terrazza.width. The theme looks for these exact keys.
  3. Choose the Type shown.
  4. Save.

After that, every product and variant page in the admin shows the fields at the bottom, under Metafields.

Product metafields

Name Namespace and key Type Used for
Subtitle terrazza.subtitle Single line text The italic line under the product title. If empty, the product type is shown
Material and care terrazza.material_care Multi-line text The Materials & care row of the Product details accordion
Fit note terrazza.fit_note Single line text One line under "Will it fit?", for example "Fits a standard balcony corner"
Dimension shape terrazza.dimension_shape Single line text, Limit to preset choices: cylinder, box, bowl, chair The line drawing in "Will it fit?"
Durability title terrazza.durability_title Single line text Heading of the durability delivery card, for example "Frost and water resistant"
Durability text terrazza.durability_text Single line text Second line of that card, for example "Hand-cast fiber concrete"
Lead time terrazza.lead_time Single line text Replaces the delivery card's default lead time, for example "Ships in 2–4 business days"
Delivery method terrazza.delivery_method Single line text Replaces the delivery card's default method, for example "Curbside delivery for items over 50 lb"

Variant metafields

Name Namespace and key Type Used for
Width terrazza.width Dimension "Will it fit?" and the size buttons
Depth terrazza.depth Dimension Front-to-back measure. It is labeled "Length" on the storefront
Height terrazza.height Dimension
Diameter terrazza.diameter Dimension For round products. Shown as Ø
Swatch color terrazza.swatch_color Color A plain color swatch when there is no swatch image or variant photo

Weight is not a metafield. Terrazza uses Shopify's own variant weight: open a variant and fill in Shipping > Weight.

Dimensions

The "Will it fit?" block shows the measurements of the selected variant, so enter them on each variant. A size M planter and a size L planter have different numbers.

  1. Open the product, then a variant.
  2. Under Metafields, fill in the measurements that apply. For a round planter use Diameter and Height. For a table or chair use Width, Depth and Height. Enter any unit; the theme converts.
  3. On the product itself, set Dimension shape: cylinder for round pots and pillars, bowl for low round bowls, box for rectangular planters and tables, chair for chairs, benches and loungers. Without a shape the theme uses box.
  4. Optionally add a Fit note.

How it shows:

Swatches

Options named in Theme settings > Swatches > Swatch option names (Color, Colour, Finish and Material by default) are shown as swatches. Each swatch takes the first of these that exists:

  1. Shopify's native swatch. Assign the product a category (for example Home & Garden > Lawn & Garden > Gardening > Pots & Planters), then connect the option to the category's color metafield. Each value can then have a color or an image. Use an image when the material matters, such as a close-up of corten steel or teak.
  2. A crop of the variant's photo. No setup: give each variant its own photo (open the variant and choose its image). The swatch is a small circle cut from that photo, centered on the image's focal point. Move the focal point onto the material, not the plant or the background. With no focal point set, the swatch zooms onto the lower centre of the photo, where the product usually sits. Open the image in Content > Files or from the product, then choose Edit > Focal point.
  3. Swatch color metafield. A plain color, for products without variant photos.
  4. Text. The value name in a small pill.

The same swatches appear on product cards across the store. On a card, choosing a swatch changes only that card's image, price and link.

Delivery details

The delivery cards and the Delivery & returns accordion row use these, in order:

The durability card works the same way with Durability title and Durability text. Use the metafields for the exceptions, such as a fire pit that ships by freight, and keep the block defaults for everything else.

Bulk editing

Edit metafields for many products at once with Shopify's bulk editor: select products in Products, choose Bulk edit, then add the metafield columns. You can also import them with a product CSV, or with an app such as Matrixify.