: Nesting Product in AggregateRating Our site is a review site, not a shop. We have 'product description' pages that list product information with a bunch of user reviews. At the top you can
Our site is a review site, not a shop. We have 'product description' pages that list product information with a bunch of user reviews. At the top you can see the product, its price, and the aggregate score.
I think this page is fundamentally an AggregateRating type, right? But it also has a bunch of data relevant to product, brand, offers, etc.
How do you think I should structure this? Here's what I was thinking for the general layout:
<li itemscope itemtype="http://schema.org/AggregateRating">
<span itemprop="itemReviewed" itemscope itemtype="http://schema.org/Product">
<img itemprop="image">
<b itemprop="name"></b>
<span itemscope itemtype="http://schema.org/PriceSpecification">
<em itemprop="price" priceCurrency="USD"></em>
</span>
</span> <!-- Product itemscope end -->
<meta itemprop="bestRating" content="5"> <!-- set range of possible ratings -->
<meta itemprop="worstRating" content="0">
<span itemprop="ratingValue"></span>
<span itemprop="reviewCount"></span>
</span>
</li>
Schema.org only shows examples of AggregateRating nested inside of other data -- is it incorrect to use it like this?
More posts by @Fox8124981
1 Comments
Sorted by latest first Latest Oldest Best
That’s what the itemReviewed property is for, so yes, nesting it like that is fine.
Note that nesting items in other items doesn’t connect them, unless you use a property. So your PriceSpecification is standing on its own, it’s not related to the Product in any way.
If you want to provide the price(s) of a product, you have to provide Offer items (or an AggregateOffer). Use the offers property for this.
(Also, the em element can’t have a priceCurrency attribute.)
So the structure could be:
<div itemscope itemtype="http://schema.org/AggregateRating">
<div itemprop="itemReviewed" itemscope itemtype="http://schema.org/Product">
<div itemprop="offers" itemscope itemtype="http://schema.org/AggregateOffer"> <!-- or omit this "AggregateOffer" if you don’t want to provide e.g. a "lowPrice" -->
<ul>
<li itemprop="offers" itemscope itemtype="http://schema.org/Offer"></li>
<li itemprop="offers" itemscope itemtype="http://schema.org/Offer"></li>
<li itemprop="offers" itemscope itemtype="http://schema.org/Offer"></li>
</ul>
</div>
</div>
</div>
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.