2015-11-27 51 views
0

我正在使用基於批量購買優惠的定價結構的產品。例如,定價產品可能如下:複雜定價結構的結構化數據佈局

Buy 10-19 and the value of 1 is $3 
Buy 20-29 and the value of 1 is $2 
Buy 30-39 and the value of 1 is $1 
Buy 40 or more and the value of 1 is $0.50 

Minimum quantity available to purchase is 10. 

如何正確我在結構化數據(微格式)紀念這件事?

目前我有:

<span itemprop="offers" itemscope itemtype="http://schema.org/Offer"> 
    <meta itemprop="priceCurrency" content="USD"/> 
    <meta itemprop="price" content="3" /> 
    <span itemprop="eligibleQuantity" itemscope itemtype="http://schema.org/QuantitativeValue"> 
     <meta itemprop="minValue" content="10" /> 
     <meta itemprop="maxValue" content="19" /> 
     <meta itemprop="value" content="Number" /> 
    </span> 
</span> 

對於每一個變種。然後,我有:

<span itemprop="priceSpecification"> 
    <span itemprop="eligibleQuantity" itemscope itemtype="http://schema.org/QuantitativeValue"> 
     <meta itemprop="minValue" content="10" /> 
    </span> 
</span> 

在產品塊本身,以表示我真的不是在所有的自信,這是正確的結構和標籤使用的10

的最低數量。任何人都可以借鑑一些見解嗎?

回答

1

您錯過了實際的PriceSpecification項目(作爲priceSpecification屬性的值)。 UnitPriceSpecification似乎是在你的情況下適當的子類型。

所以結構看起來是這樣的:

<div itemscope itemtype="http://schema.org/Offer"> 
    <div itemprop="priceSpecification" itemscope itemtype="http://schema.org/UnitPriceSpecification"></div> 
    <div itemprop="priceSpecification" itemscope itemtype="http://schema.org/UnitPriceSpecification"></div> 
    <div itemprop="priceSpecification" itemscope itemtype="http://schema.org/UnitPriceSpecification"></div> 
</div> 

我個人爲第一級別UnitPriceSpecification(10-19),也代替Offer下直接提供其屬性:

<div itemprop="priceSpecification" itemscope itemtype="http://schema.org/UnitPriceSpecification"> 
    <p itemprop="eligibleQuantity" itemscope itemtype="http://schema.org/QuantitativeValue"> 
     <span itemprop="minValue">10</span>-<span itemprop="maxValue">19</span> 
    </p> 
    <p>$<span itemprop="price">3</span> <meta itemprop="priceCurrency" content="USD"/></p> 
    </div> 

但我不知道是否有一些消費者可能會直接在Offer之下。