2

We are marking our product data according to Schema.org. Now we changed our datastructure to inaugurate product variants as follows:

  • Master product: ID 1, 10 mg
  • Variant: ID 2, 20 mg

The master product (price, etc.) is marked as Offer:

(The HTML starts with <div itemscope="itemscope" itemtype="http://schema.org/Product">, itemprop="name", itemprop="sku", and so on):

<span itemprop="offers" itemscope="itemscope" itemtype="http://schema.org/Offer">
    <span class="price"itemprop="price">{$price}</span>
    <meta itemprop="priceCurrency" content="{$PRICEUNIT}" />
    <link itemprop="availability" content="http://schema.org/InStock" />
    <br/>
    <small>{$SHIPPING_COSTS}</small>
</span>

Seems to be ok.

But we are not sure how to mark the quantity of the master product:

<div>
    <div>{$QV.quantity}</div>
    <div>{$QV.price}</div>
</div>

and the markup of the variant(s) (problem here is to avoid Google’s "double content" problem):

<div itemprop="model" itemscope itemtype="http://schema.org/ProductModel">
    <meta itemprop="sku" content="{$variant.sku}" />
    <meta itemprop="isVariantOf" content="{$sku}" />
    <a itemprop="url" href="{$variant.url}" title="{get text="Click to change quantity"}">
        <div>{$variant.quantity}</div>
        <div>{$variant.price}</div>
    </a>
</div>
manuxi
  • 353
  • 5
  • 12
  • Note that the [`span` element can’t have a `content` attribute](http://stackoverflow.com/a/27089168/1591669) in Microdata. – unor Mar 18 '15 at 14:09

0 Answers0