我目前正在为电子商务网站构建Schema.org模板,目的是生成Google Shopping Feed。
我正在努力理解定义销售价格的正确方法-即具有临时降价的产品。
我考虑的选项是L
带有多个“价格规格”项目的单个“要约”
"offers": {
"@type": "Offer",
"url": "https://kx.com/url",
"itemCondition": "http://schema.org/UsedCondition",
"availability": "http://schema.org/InStock",
"PriceSpecification": [
{
"@type": "PriceSpecification",
"price": 15.00,
"priceCurrency": "USD"
},
{
"@type": "PriceSpecification",
"price": 15.00,
"priceCurrency": "USD",
"validFrom": "2020-01-01",
"validThrough": "2020-02-01",
}
],
},
带有一个“ PriceSpecification”的多个“ Offer”项目
"offers": [
{
"@type": "Offer",
"url": "https://kx.com/url",
"itemCondition": "http://schema.org/UsedCondition",
"availability": "http://schema.org/InStock",
"PriceSpecification": [
{
"@type": "PriceSpecification",
"price": 15.00,
"priceCurrency": "USD"
}
],
},
{
"@type": "Offer",
"url": "https://kx.com/url",
"itemCondition": "http://schema.org/UsedCondition",
"availability": "http://schema.org/InStock",
"PriceSpecification": [
{
"@type": "PriceSpecification",
"price": 15.00,
"priceCurrency": "USD",
"validFrom": "2020-01-01",
"validThrough": "2020-02-01",
}
],
}
]
},
还是完全不同的东西?我正在努力寻找与此相关的任何结论性文件。
答案 0 :(得分:2)
我会注意到Google强烈建议在priceValidUntil
上使用Offer
值。我通常也会根据经验法则,即您的结构化数据应与您的标记中的内容相匹配,因此我认为销售的起点可能是不必要的,尤其是对于Google购物Feed。
如果我正在尝试这样做,我认为安全的方法是在销售当天更新您的Product
结构化数据以及内容,并使用priceValidUntil
字段记录销售结束的时间,然后删除该属性,并在该日期到来后更新价格。您最终会得到类似的东西:
"offers": {
"@type": "Offer",
"url": "https://kx.com/url",
"itemCondition": "http://schema.org/UsedCondition",
"availability": "http://schema.org/InStock",
"price": 15.00,
"priceCurrency": "USD",
"priceValidUntil": "2/1/2020"
}
在此示例中,在2020年2月1日,priceValidUntil
属性将被删除,price
属性以及页面上的内容将被更新。
您的第一个示例确实在Structured Data Testing Tool中进行了验证,但我认为这不会对您有任何帮助。我可以看到您可能想提前在哪里宣传销售,但是据我所知,Google Shopping Feed / Carousel不会宣布要发生的销售-只是发生了。
最后一点要注意的是,尽管priceSpecification
确实可以在测试工具上进行验证并且适用于产品,但有关它的详细信息似乎有点含糊不清,因此我不愿期望它会提供很多价值。 priceSpecification on schema.org没有在产品中使用它的示例(尽管再次声明,这并不意味着它是错误的)。