“价格:缺少和需要"虽然使用了 PriceSpecification [英] "price: missing and required" although PriceSpecification is used
问题描述
我正在尝试在我们的产品页面上实施 Schema.org,但是在 文档列出了 price
作为必需的属性.他们甚至没有提到 priceSpecification
属性.
因此根据他们的文档和他们的测试工具,似乎 Google 不(还?)支持指定 priceSpecification
→PriceSpecification
而不是 price
.
如果您只检查 Offer
,测试工具不会给出此错误的原因是 Google 没有仅使用 Offer
的标记功能.
您得到的错误并不是您的微数据或您使用 Schema.org 的实际错误,而是 Google 喜欢看到的显示丰富代码段的错误.
I am trying to implement Schema.org on our product pages, but I am getting an error relating to Offer
when testing in Google's Testing Tool. The errors says price
is required but I figured since I used PriceSpecification
I didn't need to specify price
.
Here is the error:
Here is the format of the HTML+Microdata that I am using:
<div itemscope itemtype="http://schema.org/Product">
<img itemprop="image" src="https://kng.scene7.com/is/image/kng/1046-set?$prodpage$" />
<h1 itemprop="name">Waist Apron, 11 inch</h1>
Item# <span itemprop="mpn">1046</span>
<div itemprop="offers" itemscope itemtype="http://schema.org/Offer">
<link itemprop="availability" href="http://schema.org/InStock">
<meta itemprop="itemCondition" itemtype="http://schema.org/OfferItemCondition" content="http://schema.org/NewCondition">
<table>
<tbody>
<tr itemprop="priceSpecification" itemscope itemtype="http://schema.org/PriceSpecification">
<td itemprop="eligibleQuantity" itemscope itemtype="http://schema.org/QuantitativeValue">
1 - 11
<meta itemprop="value" content="1">
<meta itemprop="unitCode" content="C62">
</td>
<td>Each</td>
<td>
<meta itemprop="priceCurrency" content="USD">
<meta itemprop="maxPrice" content="3.49">
$3.49
</td>
</tr>
<tr itemprop="priceSpecification" itemscope itemtype="http://schema.org/PriceSpecification">
<td itemprop="eligibleQuantity" itemscope itemtype="http://schema.org/QuantitativeValue">
12 - 29
<meta itemprop="value" content="12">
<meta itemprop="unitCode" content="C62">
</td>
<td>Each</td>
<td>
<meta itemprop="priceCurrency" content="USD">
<meta itemprop="price" content="2.96">
$2.96
</td>
</tr>
<tr itemprop="priceSpecification" itemscope itemtype="http://schema.org/PriceSpecification">
<td itemprop="eligibleQuantity" itemscope itemtype="http://schema.org/QuantitativeValue">
30 - 59
<meta itemprop="value" content="30">
<meta itemprop="unitCode" content="C62">
</td>
<td>Each</td>
<td>
<meta itemprop="priceCurrency" content="USD">
<meta itemprop="price" content="2.63">
$2.63
</td>
</tr>
<tr itemprop="priceSpecification" itemscope itemtype="http://schema.org/PriceSpecification">
<td itemprop="eligibleQuantity" itemscope itemtype="http://schema.org/QuantitativeValue">
60 +
<meta itemprop="value" content="60">
<meta itemprop="unitCode" content="C62">
</td>
<td>Each</td>
<td>
<meta itemprop="priceCurrency" content="USD">
<meta itemprop="minPrice" content="2.44">
$2.44
</td>
</tr>
</tbody>
</table>
</div>
</div>
The odd thing is that if I just paste the Offer
section into the Testing Tool it doesn't return the price
error.
What is the best way to fix this?
tl;dr: It’s appropriate use of Schema.org, but Google doesn’t seem to support it (yet).
Google’s documentation for their Products Rich Snippet lists price
as a required property. They don’t even mention the priceSpecification
property.
So according to their documentation and their Testing Tool, it seems that Google does not (yet?) support specifying a priceSpecification
→PriceSpecification
instead of a price
.
The reason that the Testing Tool does not give this error if you only check the Offer
is that Google has no markup feature that only uses Offer
.
The error you get is not an actual error with your Microdata or your use of Schema.org, it’s just about what Google likes to see for displaying a Rich Snippet.
这篇关于“价格:缺少和需要"虽然使用了 PriceSpecification的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!