Mobile app version of vmapp.org
Login or Join
Fox8124981

: How do I mark up multi product pages with Schema.org and JSON-LD? I have a client with two products on one page. However, when I test my mark up, it is only recognising one. <script

@Fox8124981

Posted in: #JsonLd #SchemaOrg

I have a client with two products on one page.

However, when I test my mark up, it is only recognising one.

<script type="application/ld+json">
{
"@context": "http://schema.org/",
"@type": "Product",
"name": "Example Product",
"image": "https://www.example.co.uk/~/media/example/product%20images/g/gv15120_h328.png",
"description": "Vitamins",
"brand": {
"@type": "Thing",
"name": "Client3"
},
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": "4.2",
"reviewCount": "4842"
},
"offers": {
"@type": "Offer",
"priceCurrency": "GBP",
"price": "11.95",
"sku": 120
},
"offers": {
"@type": "Offer",
"priceCurrency": "GBP",
"price": "19.95",
"sku": 240
}
}
</script>


Does anyone have any advice?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Fox8124981

1 Comments

Sorted by latest first Latest Oldest Best

 

@Sherry384

I assume you mean two Offer items for one Product (like your example suggests).

Instead of repeating the offers property, you have to use one offers property with an array value (in [ and ]):

"offers":
[
{
"@type": "Offer"
},
{
"@type": "Offer"
}
]

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme