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.Widthorspec.width, means the theme can't find the value. - Create the "Material" metaobject definition first. The
specs.materialsmetafield 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.
| Feature | Metafields it reads |
|---|---|
| Dimensions | specs.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 care | specs.materials and the "Material" metaobject |
| Order a sample | specs.sample_product (or the block's Sample product setting) |
| Delivery and assembly | delivery.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.
- In your Shopify admin, go to Settings → General.
- Find Store defaults → Unit system.
- 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
In your Shopify admin, go to Settings → Custom data.
Under Metaobjects, select Add definition.
Enter the Name:
Material.Check the Type. Shopify fills it in from the name. It must be exactly
material.Select Add field and add these four fields:
Field name Key Type Options Name nameSingle line text Mark as required Image imageFile, with only Images allowed One file Description descriptionMulti-line text Care instructions care_instructionsMulti-line text Under the access options, turn on Storefronts access. The theme can't read the material without it.
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.
Optional: set Name as the display name, so entries are easy to find in lists.
Select Save.
Step 2: Add your materials
In your Shopify admin, go to Content → Metaobjects.
Select Material.
Select Add entry.
Fill in the fields. For example:
Name Description Care instructions Solid oak FSC-certified European oak with a natural oil finish. Wipe with a soft, dry cloth. Re-oil once a year. Avoid direct heat. Linen blend 55% linen, 45% cotton. Removable, pre-washed covers. Covers can be washed at 30°C. Air dry and iron while damp. Natural rattan Hand-woven rattan on a solid wood frame. Dust with a soft brush. Keep away from radiators and direct sun. Add an Image for each material, such as a close-up of the wood or fabric. A square image works best.
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
- In your Shopify admin, go to Settings → Custom data.
- Under Metafields, select Products.
- Select Add definition.
- Enter the Name, then enter the Namespace and key exactly as shown below, with the dot (for example
specs.width). - Select the Type and the options from the table.
- Make sure Storefronts access is turned on. It is usually on by default.
- Select Save.
- Repeat for every row in the table.
| Name | Namespace and key | Type | Options |
|---|---|---|---|
| Width | specs.width | Dimension | One value |
| Depth | specs.depth | Dimension | One value |
| Height | specs.height | Dimension | One value |
| Seat height | specs.seat_height | Dimension | One value |
| Weight | specs.weight | Weight | One value |
| Materials | specs.materials | Metaobject, then select Material | List of entries |
| Sample product | specs.sample_product | Product | One product |
| Lead time | delivery.lead_time | Single line text | One value |
| Delivery method | delivery.method | Single line text | One value. Optional: Limit to preset choices, for example Standard delivery, White-glove delivery, Flat-pack delivery |
| Assembly required | delivery.assembly_required | True or false | |
| Assembly guide | delivery.assembly_guide | File | Allow PDF files (or all file types) |
Notes
specs.materialscan 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
In your Shopify admin, go to Products and open a product.
Scroll down to Metafields.
Fill in the fields for this product. For example, for a sofa:
Metafield Example value Width 220 cm Depth 95 cm Height 82 cm Seat height 44 cm Weight 68 kg Materials Solid oak, Linen blend Sample product Fabric swatch set Lead time Made to order, ships in 6–8 weeks Delivery method White-glove delivery Assembly required False Assembly guide A PDF file Check the unit of each dimension and weight before you save.
Select Save.
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.
In your Shopify admin, go to Products and select Export to get a CSV file with your current products.
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)
Fill in the values:
Column Example value Note Width, Depth, Height, Seat height 180cmA number and a unit Weight 58 kgA number and a unit Materials solid-oak; linen-blendMaterial entry handles, separated by a semicolon and a space Lead time Made to order, ships in 6–8 weeksPlain text Assembly required TRUEorFALSESave the file as CSV (UTF-8).
In Products, select Import, choose the file and follow the steps.
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
| Problem | What to check |
|---|---|
| A block doesn't appear | The 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 appear | The material entry has a Name. If the definition uses Active-draft status, the entry is set to Active. |
| Sizes are wrong | The unit next to each value. Check your store's unit system. |
| "Will it fit?" doesn't appear | Width, depth and height all have a value, and Show fit helper is on in the Dimensions block. |
| The sample doesn't appear | The 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.