Product with offer and rating
A simple price becomes an Offer, rating value and count an AggregateRating.
Product with offer and rating
examples/product.astro---
import { ProductSchema } from '@casoon/astro-structured-data/components';
---
<ProductSchema
name="Super Gadget"
description="The best gadget ever"
imageUrl="/images/gadget.jpg"
price={29.99}
priceCurrency="EUR"
availability="InStock"
brand="Gadget Co"
sku="SG-001"
ratingValue={4.5}
reviewCount={128}
/>{
"@context": "https://schema.org",
"@type": "Product",
"name": "Super Gadget",
"description": "The best gadget ever",
"image": [
"/images/gadget.jpg"
],
"offers": {
"@type": "Offer",
"price": 29.99,
"priceCurrency": "EUR",
"availability": "https://schema.org/InStock",
"url": "https://example.com/"
},
"brand": {
"@type": "Brand",
"name": "Gadget Co"
},
"sku": "SG-001",
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": 4.5,
"reviewCount": 128
}
}