Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Offer (with priceSpecification) nested within Product throws Warning

Nesting an Offer that has a priceSpecification inside a Product throws up an Incomplete microdata warning in Google Rich Snippets testing tool.

This

<div itemscope itemtype="http://schema.org/Product">
    <h1 itemprop="name">1984 Vintage Selection Cabernet Sauvignon</h1>
    <p itemprop="description">Cabernet Sauvignon.</p>
    <div itemprop="offers" itemscope itemtype="http://schema.org/Offer">
        <p itemprop="priceSpecification" itemscope itemtype="http://schema.org/priceSpecification">Prices start at 
        <meta itemprop="priceCurrency" content="GBP" />£<span itemprop="price">0.71</span> (per bottle)</p>
        <meta itemprop="validThrough" content="2013-09-01" />
    </div>
</div>

throws the following warning in google rich snippets testing tool: Warning: Incomplete microdata with schema.org.

If I move Offer outside Product:

<div itemscope itemtype="http://schema.org/Product">
    <h1 itemprop="name">1984 Vintage Selection Cabernet Sauvignon</h1>
    <p itemprop="description">Cabernet Sauvignon.</p>
</div>
<div itemprop="offers" itemscope itemtype="http://schema.org/Offer">
    <p itemprop="priceSpecification" itemscope itemtype="http://schema.org/priceSpecification">Prices start at 
    <meta itemprop="priceCurrency" content="GBP" />£<span itemprop="price">0.71</span> (per bottle)</p>
    <meta itemprop="validThrough" content="2013-09-01" />
</div>

then the warning is no longer thrown up, but this doesn't appear to make sense, as the Offer is not linked to the Product it's applicable to.

All the examples at schema.org nest Offer within Product, however, none of them use priceSpecification. I could only find one blog post where Offer is not nested within Product: http://seolobster.de/richsnippets-schema-org-products-update. This does not fill me with confidence to use in a live environment.

Which is correct? Especially if you throw in more than one Offer?

like image 315
iwein Avatar asked Oct 17 '25 22:10

iwein


2 Answers

I have the same problem and I just figured it out though painstaking trial-and-error: The problem is that, even though price is part of the priceSpecification schema, it still needs to be defined outside the priceSpecification metatag in the regular offer, too!

I needed priceSpecification because we show prices including and excluding VAT, and now I have no frickin' idea on how to implement this! If I HAVE to define the price in offer, how do I tell it it's with or without VAT? valueAddedTaxIncluded is not part of the offer schema! An empty div just including valueAddedTaxIncluded=true? Okay, so how do I implement the other price without the VAT then? That would define the price twice in the offer, and that's not possible!

Also, why is schema.org and getschema.org so damn effing useless when it comes to samplecode and how to properly implement any given schema? If you want people to adopt some fancy new technology - TELL THEM HOW TO DO IT!!

like image 76
DeeKay Avatar answered Oct 20 '25 13:10

DeeKay


Based on your example I don't think you need to use a separate priceSpecification property. Instead you can directly add the price and priceCurrency property to the Offer like the example below.

<div itemscope itemtype="http://schema.org/Product">
  <h1 itemprop="name">1984 Vintage Selection Cabernet Sauvignon</h1>
  <p itemprop="description">Cabernet Sauvignon.</p>
  <div itemprop="offers" itemscope itemtype="http://schema.org/Offer">
    Prices start at <meta itemprop="priceCurrency" content="GBP" />£
    <span itemprop="price">0.71</span> (per bottle)
  </div>    
</div>
like image 29
iein valdez Avatar answered Oct 20 '25 13:10

iein valdez



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!