0

「警告: schema.org の microdata が不完全です」というメッセージが表示されます。Google 構造化データ テスト ツールを使用して Prestashop 1.6 プロジェクトを検証するとき。

製品の必須フィールドをすべて含めます ( https://support.google.com/webmasters/answer/146750?hl=en )。

私のコード:

<div itemscope itemtype="http://schema.org/Product">
<span itemprop="name">{$product->name}</span>
<span itemprop="description">{$product->description}</span>
<img itemprop="image" src="{$link->getImageLink($product->link_rewrite, $cover.id_image, 'large_default')|escape:'html':'UTF-8'}" />
<span itemprop="offers" itemscope itemtype="http://schema.org/Offer">
<meta itemprop="priceCurrency" content="EUR" />
<br />
<span itemprop="price">{$product->getPrice(true, $smarty.const.NULL, 2)}</span></span>
</div>

Google テスト ツールの URL: http://www.google.com/webmasters/tools/richsnippets?q=http%3A%2F%2Fwww.decoracionna.es%2F

すべてが正しく機能するために何を追加する必要がありますか?

編集:

1つの製品のhtmlコードを掲載しました

<li class="ajax_block_product col-xs-12 col-sm-4 col-md-3 last-item-of-mobile-line">
 <div class="product-container" itemscope="" itemtype="http://schema.org/Product">
 <div class="left-block">
  <div class="product-image-container"> 
   <a class="product_img_link" href="http://www.decoracionna.es/350367-jarron-de-vidrio-frances-botella-grande.html" title="Jarrón de Vidrio Francés - Botella Grande" itemprop="url"> 
    <img class="replace-2x img-responsive" src="http://www.decoracionna.es/1721-home_default/jarron-de-vidrio-frances-botella-grande.jpg" alt="Jarrón de Vidrio Francés - Botella Grande" title="Jarrón de Vidrio Francés - Botella Grande" width="250" height="250" itemprop="image"> 
   </a>
   <div class="content_price" itemprop="offers" itemscope="" itemtype="http://schema.org/Offer"> 
    <span itemprop="price" class="price product-price"> 23,98 € </span>
    <meta itemprop="priceCurrency" content="0">
   </div> 
   <span class="new-box"></span>
  </div>
 </div>
 <div class="right-block">
  <h5 itemprop="name"> 
  <a class="product-name" href="http://www.decoracionna.es/350367-jarron-de-vidrio-frances-botella-grande.html" title="Jarrón de Vidrio Francés - Botella Grande" itemprop="url"> Jarrón de Vidrio Francés - Botella Grande </a>
  </h5>
  <p class="product-desc" itemprop="description"> Gastos de envío por Pedido: 8.80€&lt;/p>
  <div itemprop="offers" itemscope="" itemtype="http://schema.org/Offer" class="content_price"> 
   <span itemprop="price" class="price product-price"> 23,98 € </span>
   <meta itemprop="priceCurrency" content="0">
  </div>
  <div class="button-container"> 
   <a class="button ajax_add_to_cart_button btn btn-default" href="http://www.decoracionna.es/carro-de-la-compra?add=1&amp;id_product=350367&amp;" rel="nofollow" title="Añadir al carrito" data-id-product="350367"> 
    <span>Añadir al carrito</span> 
   </a> 
   <a itemprop="url" class="button lnk_view btn btn-default" href="http://www.decoracionna.es/350367-jarron-de-vidrio-frances-botella-grande.html" title="Ver">     
    <span>Más</span> 
   </a>
  </div>
  <div class="product-flags"></div> 
  <span itemprop="offers" itemscope="" itemtype="http://schema.org/Offer" class="availability">  
   <span class="available-now">
    <link itemprop="availability" href="http://schema.org/InStock">En stock 
   </span> 
  </span>
 </div>
</div>
</li>"

返信ありがとうございます。

4

1 に答える 1

0

あなたの Microdata と Schema.org の使い方は間違っていません。Google 構造化データ テスト ツールは、Google 検索がリッチ スニペットの 1 つを表示するために必要なすべてのプロパティを指定していないことを「不平を言っている」だけです。

犯人は最後のようですOffer

<span itemprop="offers" itemscope="" itemtype="http://schema.org/Offer">  
  <link itemprop="availability" href="http://schema.org/InStock">En stock 
</span>

これを削除するか、たとえばpriceプロパティを追加すると、Google の SDTT は警告を発しなくなります。

<span itemprop="offers" itemscope itemtype="http://schema.org/Offer">  
  <link itemprop="availability" href="http://schema.org/InStock">En stock 
  <span itemprop="price">10</span>
</span>

あなたのコードを正しく理解していれば、これOfferは前のオファー( /Offerを指定した場所) とほぼ同じようです。その場合は、それらを 1 つの項目にマージする必要があります。pricepriceCurrency

<div itemprop="offers" itemscope itemtype="http://schema.org/Offer"> 
 <span itemprop="price">23,98</span> € <!-- I removed the currency symbol from the price property, and added the currency to the priceCurrency property -->
 <meta itemprop="priceCurrency" content="EUR">
 <link itemprop="availability" href="http://schema.org/InStock">En stock 
</div>
于 2014-12-17T10:46:27.810 に答える