Skip to content

Metafields and metaobjects setup ​

Tenora's furniture features read product data from metafields and metaobjects. This page shows you how to create them, step by step, with the exact names and types the theme expects.

  • A metafield is an extra field on a product, for example "Width".
  • A metaobject is a reusable entry with its own fields, for example a material called "Solid oak" with an image and care instructions.

You set up the definitions once. Then you fill in the values for each product.

Before you start ​

  • Type every namespace and key exactly as shown, in lowercase and with underscores. The theme reads these exact names. A small difference, such as specs.Width or spec.width, means the theme can't find the value.
  • Create the "Material" metaobject definition first. The specs.materials metafield needs it.
  • If a value is empty, the matching block is hidden on the product page. You can fill in your products little by little.
FeatureMetafields it reads
Dimensionsspecs.width, specs.depth, specs.height, specs.seat_height, specs.weight
Will it fit?specs.width, specs.depth, specs.height (all three are needed)
Materials and carespecs.materials and the "Material" metaobject
Order a samplespecs.sample_product (or the block's Sample product setting)
Delivery and assemblydelivery.lead_time, delivery.method, delivery.assembly_required, delivery.assembly_guide

Check your store's unit system first ​

Dimension and weight metafields use your store's unit system as the default unit.

  1. In your Shopify admin, go to Settings → General.
  2. Find Store defaults → Unit system.
  3. Check whether it is set to metric or imperial.

If your store uses the imperial system, the admin selects inches and ounces by default. A value that you type as 220 is then saved as 220 in, unless you change the unit next to the field. The theme converts units correctly, but the numbers will not be what you meant.

Tip: Always check the unit next to the value before you save a product.

The Dimensions block always shows centimeters and inches, and kilograms and pounds, whichever of the supported units you used in the admin (mm, cm, m, in, ft or yd for lengths; g, kg, lb or oz for weight). Shoppers can switch units, and their choice is remembered on their device.

Step 1: Create the "Material" metaobject definition ​

  1. In your Shopify admin, go to Settings → Custom data.

  2. Under Metaobjects, select Add definition.

  3. Enter the Name: Material.

  4. Check the Type. Shopify fills it in from the name. It must be exactly material.

  5. Select Add field and add these four fields:

    Field nameKeyTypeOptions
    NamenameSingle line textMark as required
    ImageimageFile, with only Images allowedOne file
    DescriptiondescriptionMulti-line text
    Care instructionscare_instructionsMulti-line text
  6. Under the access options, turn on Storefronts access. The theme can't read the material without it.

  7. Leave the Active-draft status option turned off. If you turn it on, you must set every material entry to Active, or it won't appear in your store.

  8. Optional: set Name as the display name, so entries are easy to find in lists.

  9. Select Save.

Step 2: Add your materials ​

  1. In your Shopify admin, go to Content → Metaobjects.

  2. Select Material.

  3. Select Add entry.

  4. Fill in the fields. For example:

    NameDescriptionCare instructions
    Solid oakFSC-certified European oak with a natural oil finish.Wipe with a soft, dry cloth. Re-oil once a year. Avoid direct heat.
    Linen blend55% linen, 45% cotton. Removable, pre-washed covers.Covers can be washed at 30°C. Air dry and iron while damp.
    Natural rattanHand-woven rattan on a solid wood frame.Dust with a soft brush. Keep away from radiators and direct sun.
  5. Add an Image for each material, such as a close-up of the wood or fabric. A square image works best.

  6. Select Save.

Tips

  • In the Cards layout, the block shows only the first sentence of the description. Put the most important information in the first sentence.
  • Line breaks in the description and care instructions are kept.
  • A material without a name is not shown.

Step 3: Create the product metafield definitions ​

  1. In your Shopify admin, go to Settings → Custom data.
  2. Under Metafields, select Products.
  3. Select Add definition.
  4. Enter the Name, then enter the Namespace and key exactly as shown below, with the dot (for example specs.width).
  5. Select the Type and the options from the table.
  6. Make sure Storefronts access is turned on. It is usually on by default.
  7. Select Save.
  8. Repeat for every row in the table.
NameNamespace and keyTypeOptions
Widthspecs.widthDimensionOne value
Depthspecs.depthDimensionOne value
Heightspecs.heightDimensionOne value
Seat heightspecs.seat_heightDimensionOne value
Weightspecs.weightWeightOne value
Materialsspecs.materialsMetaobject, then select MaterialList of entries
Sample productspecs.sample_productProductOne product
Lead timedelivery.lead_timeSingle line textOne value
Delivery methoddelivery.methodSingle line textOne value. Optional: Limit to preset choices, for example Standard delivery, White-glove delivery, Flat-pack delivery
Assembly requireddelivery.assembly_requiredTrue or false
Assembly guidedelivery.assembly_guideFileAllow PDF files (or all file types)

Notes

  • specs.materials can also be a single entry (One entry) instead of a list. The theme supports both. We recommend a list, so a product can have several materials.
  • The names in the Name column are only shown in the admin. You can translate or change them. The namespace and key must stay exactly as shown.
  • Tip: Turn on Pin to product pages when you create a definition. The fields then appear directly on every product page in the admin.

Step 4: Fill in your products ​

  1. In your Shopify admin, go to Products and open a product.

  2. Scroll down to Metafields.

  3. Fill in the fields for this product. For example, for a sofa:

    MetafieldExample value
    Width220 cm
    Depth95 cm
    Height82 cm
    Seat height44 cm
    Weight68 kg
    MaterialsSolid oak, Linen blend
    Sample productFabric swatch set
    Lead timeMade to order, ships in 6–8 weeks
    Delivery methodWhite-glove delivery
    Assembly requiredFalse
    Assembly guideA PDF file
  4. Check the unit of each dimension and weight before you save.

  5. Select Save.

  6. Open the product in your online store and check the Dimensions, Materials and care, Order a sample and Delivery and assembly blocks.

What happens with partial data ​

You don't need to fill in every field. For example, if a product has only a width, a height and a lead time:

  • The dimensions table shows only width and height.
  • The drawing is shown, because it needs only width and height.
  • "Will it fit?" is hidden, because it also needs the depth.
  • The Materials and care block and the Order a sample block are hidden (unless the Order a sample block has a Sample product set in the theme editor).
  • The Delivery and assembly block shows only the lead time.

Import metafield values with a CSV file ​

If you have many products, you can fill in metafields with Shopify's product CSV import. Create the metafield definitions (Step 3) before you export or import. The CSV then has a column for each definition.

  1. In your Shopify admin, go to Products and select Export to get a CSV file with your current products.

  2. Open the file in a spreadsheet program. Find the metafield columns. Their names include the namespace and key, for example:

    • Width (product.metafields.specs.width)
    • Weight (product.metafields.specs.weight)
    • Materials (product.metafields.specs.materials)
  3. Fill in the values:

    ColumnExample valueNote
    Width, Depth, Height, Seat height180cmA number and a unit
    Weight58 kgA number and a unit
    Materialssolid-oak; linen-blendMaterial entry handles, separated by a semicolon and a space
    Lead timeMade to order, ships in 6–8 weeksPlain text
    Assembly requiredTRUE or FALSE
  4. Save the file as CSV (UTF-8).

  5. In Products, select Import, choose the file and follow the steps.

  6. Open a few products after the import and check the values and units.

Tips

  • Import a small test file with two or three products first.
  • A material handle is shown on the material entry in Content → Metaobjects → Material. It is usually the name in lowercase with hyphens, for example solid-oak.
  • Always include the unit in dimension and weight values. Without a unit, the value may be read in your store's default unit.

Translate your product data ​

If your store has more than one language, translate the text values (materials, lead times and delivery methods) with Shopify's translation tools, in the same way as product descriptions. The labels that the theme adds, such as "Width", "Care" and "Some assembly required", are already translated. See Selling globally.

Troubleshooting ​

ProblemWhat to check
A block doesn't appearThe namespace and key are exactly as shown, Storefronts access is on, and the product has a value. The block is also in the product template the product uses.
Materials don't appearThe material entry has a Name. If the definition uses Active-draft status, the entry is set to Active.
Sizes are wrongThe unit next to each value. Check your store's unit system.
"Will it fit?" doesn't appearWidth, depth and height all have a value, and Show fit helper is on in the Dimensions block.
The sample doesn't appearThe sample product is active and available in your Online Store sales channel. The sample isn't the product itself.

For more help, see Frequently asked questions.