Google SDTT:“Google 无法识别“产品"类型的对象的“可用性"属性" [英] Google SDTT: "The property 'availability' is not recognized by Google for an object of type Product"

查看:53
本文介绍了Google SDTT:“Google 无法识别“产品"类型的对象的“可用性"属性"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

情况:需要将 availability 属性添加到产品页面.

Schema.org 为微数据推荐这种格式:

有货

我将它与我们网站上的代码结合起来:

  • <i class="fa fa-check-square-o">&nbsp;<link itemprop="availability" href="http://schema.org/InStock"><span>有货</span></i>
  • 问题:Google 结构化数据测试工具报告:

    <块引用>

    http://schema.org/InStock(Google 无法识别 Product 类型的对象的属性 availability.)

    这是代码问题吗?
    或者我是否缺少 availability 属性的一些 Schema/Google包装器"?

    解决方案

    确认.弄清楚了.availability 必须在 Offer 中:

    <h1><ul><li><i class="fa fa-check-square-o">&nbsp;<link itemprop="availability" href="http://schema.org/InStock"><span>有货</span></i>

    Situation: need to add the availability property to a product page.

    Schema.org recommends this format for Microdata:

    <link itemprop="availability" href="http://schema.org/InStock" />In stock
    

    I'm combining it with the code on our site:

    <li>
        <i class="fa fa-check-square-o">&nbsp;
            <link itemprop="availability" href="http://schema.org/InStock">
            <span>In Stock</span>
        </i>
    </li>
    

    Problem: Google Structured Data Testing Tool reports:

    http://schema.org/InStock (The property availability is not recognized by Google for an object of type Product.)

    Is this a code issue?
    Or am I missing some Schema/Google "wrapper" for the availability property?

    解决方案

    Ack. Figured it out. availability has to be inside an Offer:

    <div itemprop="offers" itemscope itemtype="http://schema.org/Offer">              
      <h1>
        <ul>
          <li>
            <i class="fa fa-check-square-o">&nbsp;
              <link itemprop="availability" href="http://schema.org/InStock">
              <span>In Stock</span>
            </i>
          </li>
        </ul>
      </h1>
    </div>
    

    这篇关于Google SDTT:“Google 无法识别“产品"类型的对象的“可用性"属性"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆