Google SDTT: “The property 'availability' is not recognized by Google for an object of type Product”

有些话、适合烂在心里 提交于 2019-12-12 21:03:57

问题


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?


回答1:


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>


来源:https://stackoverflow.com/questions/45313384/google-sdtt-the-property-availability-is-not-recognized-by-google-for-an-obj

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!