Radian 3.0 is here — bundles, category showcase and cinematic motion.See what's new

Product data: metafields and tags

Electronics shoppers compare numbers. Treble reads a few product metafields and metaobjects so each product can show its own spec line, key specs, compatibility list and downloads, without editing the theme for every product. This page lists them all and shows how to create them.

How to set it up

Step 1: Create the metaobject definitions

  1. In Shopify admin, go to Settings > Metafields and metaobjects > Metaobject definitions and click Add definition.
  2. Create Key spec with the type key_spec and the fields below; then Compatibility (compatibility) and Download (product_download).
Settings > Metafields and metaobjects. Metaobject definitions are further down the page.
Settings > Metafields and metaobjects. Metaobject definitions are further down the page.

Step 2: Create the product metafields

  1. Go to Settings > Metafields and metaobjects > Products and click Add definition.
  2. Create custom.spec_line (single line text), custom.key_specs (list of Key spec references), custom.compatibility (list of Compatibility references) and custom.downloads (list of Download references).
  3. Add custom.preorder_date (date) and custom.gift_wrap (true or false) if you use pre-orders and gift wrap.
Product metafield definitions.
Product metafield definitions.

Step 3: Fill them in on products

  1. Open a product in Shopify admin and scroll to Metafields.
  2. Fill the spec line, and add entries to the lists. Entries can be shared between products, for example one Compatibility entry per device.

Product metafields

Metafields Treble reads

custom.spec_line Single line text. A short summary under the title on product cards, in add-ons and in compare, for example "40h · ANC · 250g".
custom.key_specs List of Key spec metaobjects. The Key specs block and card highlights.
custom.compatibility List of Compatibility metaobjects. The Compatibility check block.
custom.downloads List of Download metaobjects. The Downloads & support block.
custom.preorder_date Date. The expected ship date of a pre-order.
custom.gift_wrap True or false. Offers gift wrap on this product in the cart drawer.
custom.icon Single line text, on collections. The icon of the collection in mega menus with icon thumbnails.
reviews.rating, reviews.rating_count Written by reviews apps. Star ratings on cards and the product page.
Any metafield Connect it to a Spec, Spec sheet row or Title subtitle with the database icon, or name it in Product compare and Compare table rows.

Metaobjects

Key spec (key_spec)

label Single line text, for example Battery.
value Single line text, for example 40.
unit Single line text, for example h.
detail Single line text, a short note.
icon Single line text: an icon name, for example battery, bluetooth, waveform.
level Integer 0–100, fills gauges and meters.

Compatibility (compatibility)

device Single line text, for example iPhone 15.
group Single line text, for example Phones.
status Single line text: full (works great), partial (works, with limits) or none (not compatible). Empty means full.
note Single line text.

Download (product_download)

title Single line text.
kind Single line text, for example Manual, Firmware, Driver.
file File reference.
link URL, used when there is no file.
version Single line text.
note Single line text.

Product tags

Tags Treble reads

new Shows the New badge (Theme settings > Product cards > Show "New" badge).
pre-order / preorder Makes the product a pre-order when Pre-orders is set to products tagged pre-order.
gift-wrap Offers gift wrap on the product in the cart drawer.
Your own tags The product finder matches answers to tags, types and vendors.

How it works

  • The namespace and key must match exactly: custom.key_specs, not custom.keyspecs.
  • Empty values are hidden on the storefront.

Related

Still stuck?

Include your store URL and theme version — we'll get back to you.

Contact support