Structured markup adding models to product data

1.9k views Asked by At

I have a question regarding the correct way of using structured markup (Microdata / Schema.org) for the situation where I have a main overview product and then, within that, a list of models with separate prices and a custom attribute.

Simplified example:

<div class="mainproduct" itemscope itemtype="http://schema.org/Product">
 <h1 itemprop="name">Product Name</h1>
 <p itemprop="description">Lorem ipsum my description oh yay all hear this.</p>
 <div class="modelslist" >
   <div class="model" itemscope itemtype="http://schema.org/ProductModel">
     <h2 itemprop="name">Model A</h2>
     <span itemscope itemtype="http://schema.org/Offer">
         <meta itemprop="price" content="£123" />
         <span itemscope itemtype="http://schema.org/PriceSpecification">
             <span itemprop="price">£123</span>
             <meta itemprop="priceCurrency" content="GBP" />
             <meta itemprop="valueAddedTaxIncluded" content="false" />
         </span>
     </span>
     <span itemscope itemtype="http://schema.org/PropertyValue">
          <meta itemprop="name" content="readability" />
          <span itemprop="value">325</span>
     </span>                                                                        
   </div>
   <div class="model" itemscope itemtype="http://schema.org/ProductModel">
     <h2 itemprop="name">Model B</h2>
     <span itemscope itemtype="http://schema.org/Offer">
         <meta itemprop="price" content="£456" />
         <span itemscope itemtype="http://schema.org/PriceSpecification">
             <span itemprop="price">£456</span>
             <meta itemprop="priceCurrency" content="GBP" />
             <meta itemprop="valueAddedTaxIncluded" content="false" />
         </span>
     </span>
     <span itemscope itemtype="http://schema.org/PropertyValue">
          <meta itemprop="name" content="readability" />
          <span itemprop="value">325</span>
     </span>  
   </div>
 </div>
</div>

Q1. Is it correct to specify a price and then a price specification? Without the meta price, the Google Structured Data Testing Tool warns that "offer" is empty.

Q2. How do I specify custom data shown by "thingymabob". I am assuming it is something to do with "additionalProperty" but the testing tool complains that "additionalProperty" is not recognised by Google for an object of type ProductModel. (Although it seems it would be from http://schema.org/ProductModel)


UPDATE

Ok so here is the update, the pricing is now all tickity-boo and the addition of the itemprop="model", itemprop="offers" and itemprop="priceSpecification" all complete the correct nesting.

<div class="mainproduct" itemscope itemtype="http://schema.org/Product">
   <h1 itemprop="name">Product Name</h1>
   <p itemprop="description">Lorem ipsum my description oh yay all hear this.</p>
   <div class="modelslist" >
       <div class="model" itemprop="model" itemscope itemtype="http://schema.org/ProductModel">
           <h2 itemprop="name">Model A</h2>
           <span itemprop="offers" itemscope itemtype="http://schema.org/Offer">
             <meta itemprop="price" content="123" />
             <meta itemprop="priceCurrency" content="GBP" />
             <span itemprop="priceSpecification" itemscope itemtype="http://schema.org/UnitPriceSpecification">
                £<span itemprop="price">123</span>
                <meta itemprop="priceCurrency" content="GBP" />
                <meta itemprop="valueAddedTaxIncluded" content="false" />
             </span>
          </span>
          <span itemprop="additionalProperty" itemscope itemtype="http://schema.org/PropertyValue">
              <meta itemprop="name" content="readability" />
              <span itemprop="value">325</span>
          </span>                                                                        
    </div>
    <div class="model" itemprop="model" itemscope itemtype="http://schema.org/ProductModel">
        <h2 itemprop="name">Model B</h2>
        <span itemprop="offers" itemscope itemtype="http://schema.org/Offer">
           <meta itemprop="price" content="456" />
           <meta itemprop="priceCurrency" content="GBP" />
           <span itemprop="priceSpecification" itemscope itemtype="http://schema.org/UnitPriceSpecification">
               £<span itemprop="price">456</span>
               <meta itemprop="priceCurrency" content="GBP" />
               <meta itemprop="valueAddedTaxIncluded" content="false" />
          </span>
       </span>
       <span itemprop="additionalProperty" itemscope itemtype="http://schema.org/PropertyValue">
          <meta itemprop="name" content="readability" />
          <span itemprop="value">325</span>
      </span>  
    </div>
  </div>
</div>

That just leaves the issue of adding additional properties to models. It would appear from http://schema.org/ProductModel that additionalProperty should be ok - is it just Google that currently does not allow it? It does return this message in the testing tool: "The property additionalProperty is not recognised by Google for an object of type ProductModel." Is there another way to achieve this?

1

There are 1 answers

5
unor On BEST ANSWER

It’s a pity that Google Search (according to their documentation) only supports price, not priceSpecification. I’m sure that that they’ll support it in the future (if it’s not already the case, albeit undocumented).

Providing both properties seems to be a suitable solution, especially in such simple cases where you don’t have, e.g., a monthly fee.

About your markup regarding the price:

So your markup could look like:

<span itemscope itemtype="http://schema.org/Offer">
  <meta itemprop="price" content="123" />
  <meta itemprop="priceCurrency" content="GBP" />
  <span itemprop="priceSpecification" itemscope itemtype="http://schema.org/UnitPriceSpecification">
    £<span itemprop="price">123</span>
    <meta itemprop="priceCurrency" content="GBP" />
    <meta itemprop="valueAddedTaxIncluded" content="false" />
  </span>
</span>

(Note that you should also use a property to reference this Offer from the product it belongs to.)