我有点怀疑我的定价表是否根据架构/微数据正确设置。你能帮我验证一下吗? Schema 自己的验证器工具没有错误或警告。但是,当通过该工具进行验证时,“头发颜色”服务似乎未被识别为服务(正确),因为我已包含 PriceSpecification 和 minPrice。
<table>
<thead>
<tr>
<th scope="col">Treatment</th>
<th scope="col">Price</th>
</tr>
</thead>
<tbody>
<tr>
<th colspan="2" scope="col">Cuts and hair colours</th>
</tr>
<tr itemscope itemtype="https://schema.org/Service">
<td itemprop="name">Consultation<br /> <small>when you need ideas</small></td>
<td itemprop="offers" itemscope itemtype="https://schema.org/Offer">
<span itemprop="price" content="0">Free</span>
<meta itemprop="priceCurrency" content="DKK" />
</td>
</tr>
<tr itemscope itemtype="https://schema.org/Service">
<td itemprop="name">Lady haircut<br /> <small>including wash</small></td>
<td itemprop="offers" itemscope itemtype="https://schema.org/Offer">
<span itemprop="price" content="660">660</span>
<span itemprop="priceCurrency" content="DKK">kr.</span>
</td>
</tr>
<tr itemscope itemtype="https://schema.org/Service">
<td itemprop="name">Hair colour<br /> <small>including wash</small></td>
<td itemprop="offers" itemscope itemtype="https://schema.org/Offer">
<div itemscope itemtype="https://schema.org/PriceSpecification">
<span itemprop="minPrice" content="1650">from 1.650</span>
<span itemprop="priceCurrency" content="DKK">kr.</span>
</div>
</td>
</tr>
</tbody>
</table>
问题是您的标记不正确:您需要将
PriceSpecification
包装在 Offer
的相应容器/属性内(这就是它被检测为“独立”的原因):
PriceSpecification 的实例可能会显示为 以下属性
priceSpecification
属性是合适的(因为您使用 Offer
),因此,您需要将 PriceSpecification
包装在 priceSpecification
容器内:
<tr itemscope itemtype="https://schema.org/Service">
<td itemprop="name">Hair colour<br /> <small>including wash</small></td>
<td itemprop="offers" itemscope itemtype="https://schema.org/Offer">
<div itemprop="priceSpecification">
<div itemscope itemtype="https://schema.org/PriceSpecification">
<span itemprop="minPrice" content="1650">from 1.650</span>
<span itemprop="priceCurrency" content="DKK">kr.</span>
</div>
</div>
</td>
</tr>
完整代码:
<table>
<thead>
<tr>
<th scope="col">Treatment</th>
<th scope="col">Price</th>
</tr>
</thead>
<tbody>
<tr>
<th colspan="2" scope="col">Cuts and hair colours</th>
</tr>
<tr itemscope itemtype="https://schema.org/Service">
<td itemprop="name">Consultation<br /> <small>when you need ideas</small></td>
<td itemprop="offers" itemscope itemtype="https://schema.org/Offer">
<span itemprop="price" content="0">Free</span>
<meta itemprop="priceCurrency" content="DKK" />
</td>
</tr>
<tr itemscope itemtype="https://schema.org/Service">
<td itemprop="name">Lady haircut<br /> <small>including wash</small></td>
<td itemprop="offers" itemscope itemtype="https://schema.org/Offer">
<span itemprop="price" content="660">660</span>
<span itemprop="priceCurrency" content="DKK">kr.</span>
</td>
</tr>
<tr itemscope itemtype="https://schema.org/Service">
<td itemprop="name">Hair colour<br /> <small>including wash</small></td>
<td itemprop="offers" itemscope itemtype="https://schema.org/Offer">
<div itemprop="priceSpecification">
<div itemscope itemtype="https://schema.org/PriceSpecification">
<span itemprop="minPrice" content="1650">from 1.650</span>
<span itemprop="priceCurrency" content="DKK">kr.</span>
</div>
</div>
</td>
</tr>
</tbody>
</table>