Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
I recently updated our structured data for our products to include price and fix an error. An example which is showing an error looks like this:
<script type="application/ld+json">// <![CDATA[
{
"@context": "http://schema.org/",
"@type":"Product",
"name":"Ashwagandha Extract Capsules - 600 mg",
"image": [ "https://cdn.shopify.com/s/files/1/0047/1524/9737/files/Illuminate_Labs_Ashwagandha_Image_Final.jpg?v..."
],
"url":"https://illuminatelabs.org/products/ashwagandha-extract",
"offers": {
"@type":"Offer",
"availability":"OutOfStock",
"price": "40.00",
"priceCurrency": "USD"
},
}
// ]]></script>
The error states: Parsing error: Missing '}' or object member name
I don't see a missing '}' or object member name here. What am I missing?
Remove the last comma, then it at least detects the product:
But there are still a number of warnings.
By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024