How to Fix Broken Schema Markup on Shopify & WooCommerce

errorThe Problem

Your page has no structured data (JSON-LD schema), or the schema that exists is malformed — missing required fields, has syntax errors, or uses incorrect values. Google can't generate rich results (star ratings, prices, availability) from broken schema, so your search listings look plain compared to competitors.

trending_upWhy It Matters for SEO

Pages with valid Product schema get rich results in Google — showing price, availability, and review stars directly in search. These rich results get 20-30% more clicks than plain listings. Google Shopping also requires valid Product schema. If your schema is broken, you're invisible in Google's shopping features while competitors with proper schema get those extra clicks for free.

buildHow to Fix It

  1. 1

    First, check your current schema: go to Google's Rich Results Test (search.google.com/test/rich-results) and paste a product URL.

  2. 2

    If no schema is detected: go to Online Store → Themes → Edit Code.

  3. 3

    Look for an existing schema file: search for 'ld+json' across all files. It's often in sections/main-product.liquid or snippets/product-schema.liquid.

  4. 4

    If it exists but has errors: fix the specific missing fields noted in the Rich Results Test.

  5. 5

    If no schema exists at all: add the JSON-LD block below to your product template.

  6. 6

    Save and re-test with the Rich Results Test to confirm it's valid.

foldersections/main-product.liquid (or snippets/product-schema.liquid)
{%- comment -%} Add to sections/main-product.liquid or create snippets/product-schema.liquid {%- endcomment -%}
{% if product %}
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Product",
  "name": {{ product.title | json }},
  "image": [{{ product.featured_image | image_url: width: 1024 | json }}],
  "description": {{ product.description | strip_html | truncate: 500 | json }},
  "brand": {
    "@type": "Brand",
    "name": {{ product.vendor | json }}
  },
  "sku": {{ product.selected_or_first_available_variant.sku | default: "" | json }},
  "offers": {
    "@type": "Offer",
    "url": "{{ shop.url }}{{ product.url }}",
    "price": {{ product.selected_or_first_available_variant.price | money_without_currency | json }},
    "priceCurrency": {{ cart.currency.iso_code | json }},
    "availability": "https://schema.org/{% if product.available %}InStock{% else %}OutOfStock{% endif %}",
    "itemCondition": "https://schema.org/NewCondition"
  }
}
</script>
{% endif %}
menu_bookRead Google's official documentationopen_in_new

Related Fix Guides

Want to check if YOUR store has this issue?

Scan your site for free — get copy-paste fixes in 60 seconds.

searchScan Now — It's Free