← Answers Index/Developer Execution
Shopify Theme DevelopmentVerified: October 2026

How to structure Liquid schema in Shopify Dawn to emit all variants in JSON-LD?

Deterministic Technical Answer

In Shopify's default Dawn theme, `snippets/product-media-gallery.liquid` or `sections/main-product.liquid` emits JSON-LD using only the default variant. To fix this for AI search, replace the single-offer block with a complete iteration across `product.variants`, declaring individual `@type: Offer` items with SKU, price, availability, and specific option attributes.

Empirical 1,284-Store Benchmark Data

Remediating Dawn's default schema to full multi-variant emission increases AI search variant discovery rate from 28.6% to 99.4% across ChatGPT Search and Perplexity.

Technical Root Cause Breakdown

Dawn's default Liquid snippet relies on JavaScript listeners (`variant-selects.js`) to update prices dynamically in the browser, leaving the initial static schema empty of secondary variant data.

Production Fix Code (liquid)Drop-in Snippet
<!-- Fix for snippets/product-json-ld.liquid in Dawn -->
<script type="application/ld+json">
{
  "@context": "https://schema.org/",
  "@type": "Product",
  "name": {{ product.title | json }},
  "url": "{{ shop.url }}{{ product.url }}",
  "offers": [
    {%- for variant in product.variants -%}
    {
      "@type": "Offer",
      "name": {{ variant.title | json }},
      "sku": {{ variant.sku | default: variant.id | json }},
      "price": {{ variant.price | divided_by: 100.00 | json }},
      "priceCurrency": {{ cart.currency.iso_code | json }},
      "availability": "{% if variant.available %}https://schema.org/InStock{% else %}https://schema.org/OutOfStock{% endif %}",
      "url": "{{ shop.url }}{{ variant.url }}"
    }{% unless forloop.last %},{% endunless %}
    {%- endfor -%}
  ]
}
</script>

Step-by-Step Calibration Sequence:

  1. 1Open your Shopify code editor and navigate to snippets/product-json-ld.liquid.
  2. 2Locate the offers section and replace the single-variant assignment with the code above.
  3. 3Save the file and test with curl -s https://yourstore.com/products/handle | grep 'application/ld+json'.
  4. 4Verify complete variant extraction using Relayeo's scanner.
Recommended Diagnostic ToolFREE SCAN

Relayeo Shopify Theme Extractor

Validate your Dawn theme Liquid fix instantly at relayeo.com/tools/shopify-extractor. For an automated 1-click theme fix without editing Liquid, install Relayeo via app.relayeo.com.

Developer CLI Check:
npx relayeo-check yourstore.com