带有销售价格的 Schema.org PriceSpecification

Kev*_*son 1 schema schema.org google-shopping

我目前正在为电子商务网站构建 Schema.org 模板,目的是生成 Google 购物提要。

我正在努力理解定义销售价格的正确方法 - 即临时降价的产品。

我考虑过的选项是L

  • 具有多个“PriceSpecification”项目的单个“Offer”
  • 具有单个“价格规格”的多个“优惠”项目
  • 或者完全是别的什么?

具有多个“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": "PriceSpecification",
        "price": 15.00,
        "priceCurrency": "USD",
        "validFrom": "2020-01-01",
        "validThrough": "2020-02-01",
      }
    ],
  },
Run Code Online (Sandbox Code Playgroud)

具有单个“价格规范”的多个“优惠”项目

  "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",
        }
      ],
    }
  ]
  },
Run Code Online (Sandbox Code Playgroud)

或者是完全不同的东西?我正在努力寻找有关此问题的任何结论性文档。

Stu*_*ong 5

我注意到,谷歌强烈建议的priceValidUntil价值Offer。我通常还使用经验法则,即您的结构化数据应与标记中的内容相匹配,因此我认为销售的起点可能是不必要的,尤其是对于 Google 购物提要。

如果我正在处理这个问题,我觉得安全的方法是更新您的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"
  }
Run Code Online (Sandbox Code Playgroud)

在此示例中,2020 年 2 月 1 日,该priceValidUntil属性将被删除,并且该price属性将随页面上的内容一起更新。

您的第一个示例确实在Structured Data Testing Tool中进行了验证,但我认为它对您没有任何好处。我可以看到您可能想提前在何处宣传促销活动,但据我所知,Google 购物 Feed/Carousel 不会宣布即将发生的促销活动- 只是正在发生的价格。

最后要注意的是,虽然priceSpecification确实在测试工具上进行了验证并且适用于产品,但围绕它的细节似乎有点模糊,我对期望它提供很多价值犹豫不决。schema.org上的priceSpecification没有在产品中使用它的例子(尽管同样,并不是说这意味着它是错误的)。