产品详细信息 - 错误:使用schema.org的不完整微数据

时间:2014-10-01 14:02:37

标签: schema.org google-rich-snippets

以下是代码:

<div class="product-essential" itemscope itemtype="http://schema.org/Product">
<div class="product-main-info">
                <div class="product-name">
                        <h1 itemprop="name">Test Simple product 55</h1>
                        <p class="long-name">Test Simple product 5SD</p>
                </div>
                <p class="-order"> Order #: test-simple-product-5</p>
                <p class="alert-urls"></p>
                <p class="product-type-data"> </p>
                <div style="display:block" class="price-box price-box-test-simple-product-5">
                        <p itemtype="http://schema.org/AggregateOffer" itemscope="" itemprop="offers" class="old-price"> 
                                <span id="old-price-5" class="price" itemprop="highPrice"> $8.00 </span> <span itemprop="priceCurrency" class="price currency">USD</span> </p>
                        <p itemtype="http://schema.org/AggregateOffer" itemscope="" itemprop="offers" class="special-price"> 
                                <span id="product-price-5" class="price" itemprop="lowPrice"> $6.00 </span> <span itemprop="priceCurrency" class="price currency">USD</span> </p>
                </div>
                <div style="display: none" class="price-loader"> <img src="http://text/-dev/skin/frontend/enterprise/default/images/zoomloader.gif"> </div>
                <span>
                <dl class="top-currency">
                        <dd><a href="http://text/-dev/test-simple-product-5?SID=bbru84lc96dd53bamsmrvj0ou2" class="us-currency active" title="US Site">&nbsp;</a></dd>
                        <dd><a onclick="switchWebsite('http://text/-dev/test-simple-product-5?SID=bbru84lc96dd53bamsmrvj0ou2');" href="javascript:void(0);" class="canada-currency" title="Canadian Site">&nbsp;</a></dd>
                </dl>
                <p itemtype="http://schema.org/Offer" itemscope="" itemprop="offers" class="availability in-stock"> <span class="product-qty"> 99999991 </span> <span>
                        <link href="http://schema.org/InStock" itemprop="availability">
                        In stock </span> </p>
                </span>
                <p class="shipping-icon">Free shipping over $250</p>

        </div>

我在产品详细信息页面中收到错误不完整的微数据with schema.org

以下是摘录:

  

物品
  输入:http://schema.org/product
   属性:
  名称:测试简易产品55
  提供:第1项   提供:第2项    提供:第3项    错误:使用schema.org进行不完整的微数据。

1 个答案:

答案 0 :(得分:0)

我认为您错误地使用了应该包含多个商品的AggregateOffer - 而您似乎多次使用它来获得单个优惠。

如果你结合了&#34; highPrice&#34;和&#34; lowPrice&#34;到一个AggregateOffer,以及&#34;可用性&#34;从第三个&#34;提供&#34;那么标记不会产生任何错误(我也将$符号移到&#34; highPrice&#34;以及&#34; lowPrice&#34; span)之外:

<div class="product-essential" itemscope itemtype="http://schema.org/Product">
  <div class="product-main-info">
    <div class="product-name">
      <h1 itemprop="name">Test Simple product 55</h1>
      <p itemprop="productID">5SD</p>
    </div>
    <p class="transcat-order">Transcat Order #: test-simple-product-5</p>
    <p class="alert-urls"></p>
    <p class="product-type-data"> </p>
    <div style="display:block" class="price-box price-box-test-simple-product-5">
    <p itemprop="offers" itemtype="http://schema.org/AggregateOffer" itemscope class="old-price"> 
      $<span id="old-price-5" class="price" itemprop="highPrice">8.00</span> <span itemprop="priceCurrency" class="price currency">USD</span>
      $<span id="product-price-5" class="price" itemprop="lowPrice">6.00</span> <span itemprop="priceCurrency" class="price currency">USD</span>
      <link itemprop="availability" href="http://schema.org/InStock">In stock
    </p>
  </div>
  <div style="display: none" class="price-loader">
    <img src="http://text/transcat-dev/skin/frontend/enterprise/default/images/zoomloader.gif">
  </div>
  <span>
    <dl class="top-currency">
      <dd>
    <a href="http://text/transcat-dev/test-simple-product-5?SID=bbru84lc96dd53bamsmrvj0ou2" class="us-currency active" title="US Site">&nbsp;</a>
      </dd>
      <dd>
    <a onclick="switchWebsite('http://text/transcat-dev/test-simple-product-5?SID=bbru84lc96dd53bamsmrvj0ou2');" href="javascript:void(0);" class="canada-currency" title="Canadian Site">&nbsp;</a>
      </dd>
    </dl>
  </span>
  <p class="shipping-icon">Free shipping over $250</p>
</div>

如果您能用简明的语言解释您尝试标记的优惠背后的业务逻辑,那么我可能能够更进一步,更准确地提供帮助。