gpt4 book ai didi

microdata - 产品内嵌套的报价(带有价格规范)抛出警告

转载 作者:行者123 更新时间:2023-12-01 12:46:55 24 4
gpt4 key购买 nike

在产品中嵌套具有 priceSpecification 的报价会在 Google Rich Snippets 测试工具中引发不完整的微数据警告。

这个

<div itemscope itemtype="http://schema.org/Product">
<h1 itemprop="name">1984 Vintage Selection Cabernet Sauvignon</h1>
<p itemprop="description">Cabernet Sauvignon.</p>
<div itemprop="offers" itemscope itemtype="http://schema.org/Offer">
<p itemprop="priceSpecification" itemscope itemtype="http://schema.org/priceSpecification">Prices start at
<meta itemprop="priceCurrency" content="GBP" />£<span itemprop="price">0.71</span> (per bottle)</p>
<meta itemprop="validThrough" content="2013-09-01" />
</div>
</div>

在 google rich snippets 测试工具中抛出以下警告:警告:schema.org 的微数据不完整。

如果我将 Offer 移到 Product 之外:

<div itemscope itemtype="http://schema.org/Product">
<h1 itemprop="name">1984 Vintage Selection Cabernet Sauvignon</h1>
<p itemprop="description">Cabernet Sauvignon.</p>
</div>
<div itemprop="offers" itemscope itemtype="http://schema.org/Offer">
<p itemprop="priceSpecification" itemscope itemtype="http://schema.org/priceSpecification">Prices start at
<meta itemprop="priceCurrency" content="GBP" />£<span itemprop="price">0.71</span> (per bottle)</p>
<meta itemprop="validThrough" content="2013-09-01" />
</div>

然后警告不再出现,但这似乎没有意义,因为优惠未链接到它适用的产品。

schema.org 上的所有示例都将 Offer 嵌套在 Product 中,但是,它们都没有使用 priceSpecification。我只能找到一篇博文,其中 Offer 未嵌套在 Product: http://seolobster.de/richsnippets-schema-org-products-update 中。 .这让我没有信心在现场环境中使用。

哪个是正确的?特别是如果您提供了多个报价?

最佳答案

我有同样的问题,我只是通过艰苦的反复试验弄明白了:问题是,即使 pricepriceSpecification 架构的一部分,它仍然也需要在常规 offerpriceSpecification 元标记之外定义!

我需要 priceSpecification 因为我们显示的价格包括和不包括增值税,现在我不知道如何实现它!如果我必须在offer 中定义价格,我如何告诉它是否包含增值税? valueAddedTaxIncluded 不是offer 架构的一部分!一个只包含 valueAddedTaxIncluded=true 的空 div?好的,那么我如何在没有增值税的情况下实现其他价格呢?这将在报价中两次定义价格,这是不可能的!

此外,为什么 schema.org 和 getschema.org 在涉及示例代码以及如何正确实现任何给定模式时如此该死的无用?如果您希望人们采用一些奇特的新技术 - 告诉他们如何去做!!

关于microdata - 产品内嵌套的报价(带有价格规范)抛出警告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15006029/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com