Here's my code for rich cards for products (https://webmasters.googleblog.com/20...ich-cards.html)
I use soapbox for product reviews. gtin is my own variable for EAN numbers. Brand is my own variable for brand.
I've placed in in the standard image layout as that's common throughout the site.
<script type="application/ld+json">
{
"@context": "http://schema.org/",
"@type": "Product",
"name": "<actinic:variable name="ProductName" />",
"image": "<actinic:variable name="CatalogURL" /><actinic:block php="true" >$path_parts = pathinfo('<actinic:variable name="ProductImageFileName" encoding="perl" selectable="false" />');echo $path_parts['basename'], "\n";</actinic:block>",
"description": "<actinic:variable name="MetaDescription" />",
"mpn": "<actinic:variable name="gtin" />",
"brand": {
"@type": "Thing",
"name": "<actinic:variable name="brand" />"
},
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": "<actinic:variable name="SoapboxRating" />",
"reviewCount": "<actinic:variable name="SoapboxReviewCount" />",
"bestRating": "10"
},
"offers": {
"@type": "Offer",
"priceCurrency": "GBP",
"price": "<actinic:variable name="ProductPriceRaw" />",
"priceValidUntil": "2020-11-25",
"itemCondition": "new",
"availability": "InStock",
"seller": {
"@type": "Organization",
"name": "my company "
}
}
}
</script>
I use soapbox for product reviews. gtin is my own variable for EAN numbers. Brand is my own variable for brand.
I've placed in in the standard image layout as that's common throughout the site.
<script type="application/ld+json">
{
"@context": "http://schema.org/",
"@type": "Product",
"name": "<actinic:variable name="ProductName" />",
"image": "<actinic:variable name="CatalogURL" /><actinic:block php="true" >$path_parts = pathinfo('<actinic:variable name="ProductImageFileName" encoding="perl" selectable="false" />');echo $path_parts['basename'], "\n";</actinic:block>",
"description": "<actinic:variable name="MetaDescription" />",
"mpn": "<actinic:variable name="gtin" />",
"brand": {
"@type": "Thing",
"name": "<actinic:variable name="brand" />"
},
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": "<actinic:variable name="SoapboxRating" />",
"reviewCount": "<actinic:variable name="SoapboxReviewCount" />",
"bestRating": "10"
},
"offers": {
"@type": "Offer",
"priceCurrency": "GBP",
"price": "<actinic:variable name="ProductPriceRaw" />",
"priceValidUntil": "2020-11-25",
"itemCondition": "new",
"availability": "InStock",
"seller": {
"@type": "Organization",
"name": "my company "
}
}
}
</script>