By Dylan HuntMay 17th, 2026shopifycustom-dataguides

Build a Product Spec Table on Shopify With Metaobjects

A specification table is where structured product data stops being theory: weight, dimensions, materials, capacity, all laid out where a shopper compares before buying. Here are the two honest ways to build one without an app, and how to pick.

Decide: per-product specs or shared specs?

This is the metafields vs metaobjects decision in its most concrete form.

  • Every product has its own numbers? Weight, dimensions, battery life. Use plain product metafields, one per spec. Simpler to define, simpler to fill, and the previous post's steps apply directly.
  • Many products share the same table? A sizing chart for every shirt, a materials breakdown for a whole collection. That's one metaobject entry referenced by many products, so one edit updates them all.

Most real catalogs use both: a shared metaobject for the family-level table, plus a few per-product metafields for the values that differ.

The per-product version: metafields as rows

Define your spec metafields (Settings → Custom data → Products), fill them per product, and render the rows, skipping empties so the table never shows blank cells:

<table class="spec-table">
  {% if product.metafields.custom.weight_grams.value != blank %}
    <tr><th>Weight</th><td>{{ product.metafields.custom.weight_grams.value }} g</td></tr>
  {% endif %}
  {% if product.metafields.custom.material.value != blank %}
    <tr><th>Material</th><td>{{ product.metafields.custom.material.value }}</td></tr>
  {% endif %}
</table>

Explicit rows mean you control order and labels, and a product missing a value just has a shorter table.

The shared version: a metaobject the whole family references

Define a metaobject (Settings → Custom data → Metaobjects) like Spec set, with the fields your family shares: a title plus whatever structure fits, even a json field holding label/value pairs. Create one entry per product family, then add a product metafield of type metaobject reference pointing at it.

In Liquid, the product's reference resolves straight to the entry and its fields:

{% assign specs = product.metafields.custom.spec_set.value %}
{% if specs %}
  <h3>{{ specs.title.value }}</h3>
{% endif %}

You can also address an entry directly, anywhere in the theme, with the current syntax:

{{ metaobjects.size_guides.mens-shirts.table.value }}

Note the path: metaobjects.type.handle. Older tutorials say shop.metaobjects; that still works but Shopify deprecated it in January 2025, so write new code the new way.

Two gotchas from the docs worth knowing before you debug a blank page: entries with the publishable capability set to draft return nil in Liquid, and for loops cap at 50 iterations.

The no-code path still exists

If your theme's product template already has table-ish or text blocks, the dynamic sources picker can connect block settings to metafield values and to storefront-visible metaobject fields without touching Liquid. The custom section earns its keep when you want one consistent spec table across every template, which is usually where stores end up.

The payoff beyond the product page

A spec table built from typed data is readable twice: once by the shopper, once by machines. Specs that live in structured fields can flow into your product's structured data, and that's the difference between an AI shopping agent answering "what's the capacity?" correctly or skipping your product for one it understands. Building that machine-readable layer automatically is what AgentReady does all day.

That closes the metafields pillar: when to use which, showing a field without an app, and now the full table. If your specs are currently a screenshot of a table inside a description, you know where to find us.

Make your store agent-ready

Get found and recommended by AI shopping assistants.

AgentReady adds Schema.org structured data, an llms.txt directory, and an AI-readability audit to your Shopify store, so ChatGPT, Perplexity, and Google can understand and recommend your products. Free for stores under 500 products.

Comments

Every comment here comes from a verified email. Write yours, confirm from your inbox, and it's live.

Loading comments…

Leave a comment

ShareXLinkedInFacebook

Written by Dylan Hunt, Founder, Caffeine and Commerce. We build Shopify stores that rank and that AI agents can read. Have a project? Get in touch.