Add a product with its own tabs

Go from nothing to a finished product page, with its own photos, swatches and tabs filled from metafields.

Use this when a product needs more than a description, such as specifications or care instructions. The template holds the tab once, and each product fills it with its own value. So you set up the tab one time, and every later product only needs its values.

Build the page

Create the metafield definitions

Do this first, because a product only offers a box for a metafield once its definition exists. Go to Settings > Metafields and metaobjects > Products and add one for each tab. The metafields reference lists the keys and types the theme draws, such as custom.specs for a table. A key of your own works too, such as custom.care.

Create the product and its options

Under Products, click Add product. Fill in the title, description, price and category. Then click Add options like size or color under Variants, and set each variant's price and stock.

For color swatches, the option needs Shopify's swatch data. See Swatches on product cards below.

Add the photos

Add them under Media. The first photo is the one on cards, and the second can show on hover, depending on your Product cards settings. Give each color variant its own photo, so the picture changes when a shopper picks it. Prepare your images has the sizes.

Pick the template

Most products stay on the default. For another layout, choose it under Theme template, such as preorder, or one you created yourself. During a trial, this list holds only the live theme's templates, so see Getting started.

Fill in the values

Save the product, then fill in the boxes under Product metafields. Click View all if a definition is not pinned there. A JSON metafield must be valid JSON, in the shape the theme reads.

Connect a tab to the metafield

In the theme editor, open the product template this product uses, and preview it with this product. Under Tabs, click Add block and choose Tab, or select one that is already there.

Type a Title, set Content to Product metafield, and type the namespace and key into Product metafield, such as custom.care. Then save.

You type the key, and there is no connect icon to click. A Collapsible row works the same way, with Heading as its label, and you add it in Product info instead. Mantel and Hanger use rows, because they leave the area under the gallery empty. Tabs and accordions compares them.

Check it on your phone

Open the page on a real phone, and go through this list:

  • The photos crop the way you expected.
  • Every option can be picked, and the photo and price change with it.
  • Each tab opens and reads well at that width.
  • The card looks right in a collection, with its swatches.

What the next product needs

Only steps 2 to 5. The tab is already on the template, and it stays out of sight on any product with no value in that metafield. If a tab is on the template but missing on a product, that product has no value yet.

The default template comes with sample wording in its tabs or rows, and which ones depends on your preset. Words that are the same for every product, such as delivery or returns terms, only need replacing once.

A size guide works differently. Its Pop-up block opens one page you pick. For a different chart per product, connect Page to a metafield with the connect icon. See Size guide.

Swatches on product cards

The swatch row on a card comes from Shopify's data, not from a theme setting alone. The theme looks for the first option whose values carry a swatch, and shows that row. A plain Color option with no swatch data shows no row at all, even with Swatch type at Variant image.

  1. In your admin, connect the option to a category metafield, so each value carries a color or image. This depends on the product's category.
  2. In Product cards, keep Show color swatches on.
  3. Set Swatch type. Variant image shows the photo of each color, and a value with no photo keeps its color.

Variants and swatches covers the same data on the product page.

Something not working?

A tab does not show. The product has no value in that metafield, or the key is mistyped. Compare it with the definition, letter by letter.

The product shows no swatches on cards. The option values have no swatch data. Check the option in your admin.

The product does not show on your store. Check that its status is Active and that it is available on your Online Store sales channel. Then add it to a collection, so shoppers can reach it.

The page has the wrong layout. Check Theme template on the product.

On this page