问题
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">
<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 propertyavailability
is not recognized by Google for an object of typeProduct
.)
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">
<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