AgentReady · Switch sites
Raw Markdown

Build a Product Spec Table on Shopify With Metaobjects

Canonical: https://joinagentready.com/blog/product-spec-table-shopify-metaobjects

By Dylan Hunt April 15th, 2026 How-to notes

Written by the Caffeine and Commerce team. For build work, see caffeinecommerce.com.

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.

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.

Quick answers

Frequently asked questions

Should a spec table use metafields or metaobjects?

If every product has its own values (weight, dimensions, capacity), plain metafields are simpler and enough. Metaobjects earn their place when many products share the same spec content, like a sizing chart or materials table for a whole product family.

What's the current Liquid syntax for metaobjects?

metaobjects.type.handle, for example metaobjects.size_guides.mens-shirts. The older shop.metaobjects path still works but Shopify deprecated it in January 2025.

Why does my metaobject render nothing?

If the metaobject definition has the publishable capability enabled, entries with draft status return nil in Liquid. Check the entry is set to active.

Is there a limit when looping spec rows in Liquid?

Liquid for loops cap at 50 iterations. A spec table won't get near that, but it's the number to know if you reuse the pattern for bigger lists.

Dylan Hunt

Author

Dylan Hunt

Builds Shopify catalog readability and AI answer visibility at AgentReady and Caffeine and Commerce.

About Dylan →

Comments

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

Loading comments…

Share X LinkedIn Facebook

Written by Dylan Hunt, Founder, AgentReady. AgentReady audits Shopify structured data and checks approved changes on the live storefront. See plans.

For Shopify today

Schema for AI

Make your Shopify catalog easier for AI to understand.

From $9/mo

Run free audit → Explore Schema for AI

Free guide

The Shopify Functions Playbook

25 real things you can build with Functions, with the plan requirements and limits stated plainly. Emailed to you, readable immediately.

More in How-to notes

See all in How-to notes →