Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Ошибка микроразметки


Recommended Posts

не пойму почему вылезает ошибка, где что я пропустил

ОШИБКА: Не выполнено обязательное условие для продуктовых сниппетов: поле offers отсутствует или пусто

 

код страницы

<div class="row">
      <?php foreach ($products as $product) { ?>
      <div class="product-layout product-grid col-md-3">
      <div class="row" itemscope="" itemtype="http://schema.org/Product">
                          
                            <div class="product-thumb thumbnail" >
                                
                                    <div class="Cod-product">
                                             Код: <span style="color: #e4003a;" itemprop="model"><?php echo $product['model']; ?></span>
                                    </div>     
                                    
                                    <div class="stickers-box">
    
                                        <!-- фото для опций -->
                                        <?php if (count($product['optionss']) > 0) { ?>
                                        <div class="sticker-row">
                                            <div class="sticker s-mpn" data-toggle="tooltip" title="Деталь кузова, окрашенная в цвет" data-original-title=""><img alt="Деталь кузова, окрашенная в цвет" title="Деталь кузова, окрашенная в цвет" src="/image/123.png" />
                                            </div>
                                        </div>
                                        <?php } ?>
                                    </div>
                
                                    <div class="image">
                                        <a itemprop="url" href="<?php echo $product['href']; ?>"><img itemprop="image" src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" title="<?php echo $product['name']; ?>" class="img-responsive center-block" /></a>
                                    </div>
                                    
                                    
                                    <div class="caption">
              
                                         <div class="name">
                                             <a href="<?php echo $product['href']; ?>"><span itemprop="name"><?php echo $product['name']; ?></span></a>
                                         </div>
                                      
                                         <div class="brand">
                                             Бренд: <span data-toggle="tooltip" title="<?php echo $product['manufacturer_description']; ?>" data-original-title="<?php echo $product['manufacturer_description']; ?>"><img title="<?php echo $product['manufacturer_description']; ?>" alt="<?php echo $product['manufacturer_description']; ?>" src="<?php echo $product['manufacturer_img']; ?>"></span>
                                         </div>            
                                       
                         
                                        <div style="margin-top: 20px;">
                                    
                                        <?php if ($product['price']) { ?>
                                        <div class="price" itemprop = "offers" itemscope itemtype = "http://schema.org/Offer">
                                         <?php if (!$product['special']) { ?>
                                         <?php echo $product['price']; ?>
                                          <?php } else { ?>
                                          <span itemprop="price" class="price-old">&nbsp;<?php echo $product['price']; ?>&nbsp;</span> <span class="price-new"><?php echo $product['special']; ?></span>
                                          <?php } ?>
                                          <?php if ($product['tax']) { ?>
                                                            <br>
                                          <span class="price-tax"><?php echo $text_tax; ?> <?php echo $product['tax']; ?></span>
                                          <?php } ?>
                                        </div>
                                        <?php } ?>
                                        
                                        <div class="button-right">
                                            <a class="btn btn-default" onclick="wishlist.add('<?php echo $product['product_id']; ?>');return false;" title="<?php echo $button_wishlist; ?>" data-toggle="tooltip" data-original-title="В закладки"><i class="fa fa-heart"></i></a>
                                            <a class="btn btn-default" rel="nofollow" onclick="compare.add('<?php echo $product['product_id']; ?>');return false;" title="<?php echo $button_compare; ?>" data-toggle="tooltip" data-original-title="В сравнение"><i class="fa fa-bar-chart"></i></a>
                                        </div>
                                        
                                        <div class="card-button-block">
                                            <?php if (($product['quantity'] <= 0) and $disable_cart_button){ ?>
                                            <button type="button" class="btn btn-addtocart" title="<?php echo $button_cart; ?>" disabled><?php echo $disable_cart_button_text; ?> </button>
                                            <?php } else { ?>
                                            <button type="button" class="btn btn-addtocart" onclick="cart.add('<?php echo $product['product_id']; ?>');" title="<?php echo $button_cart; ?>">В корзину</button>
                                            <?php } ?>
                                            
                                        </div><!-- class="card-button-block" -->
                                        
                                        </div>
                                   </div><!-- class="caption" -->
                                   
                            </div><!-- class="product-thumb thumbnail " -->
                            <div class="clearfix"></div>
     </div>
                        
     
      </div>
      <?php } ?>
      </div>
        

Link to comment
Share on other sites


Вот так у вас выглядит цена товара

<div class="price" itemprop="offers" itemscope="" itemtype="http://schema.org/Offer">
						                  						                 2 838 ₽						                  						                  						                </div>

 

а должно быть

 

<div class="price" itemprop="offers" itemscope="" itemtype="http://schema.org/Offer">
<span itemprop="price">2 838 ₽</span>		                 						                  						                  						                </div>

 

  • +1 1
Link to comment
Share on other sites


3 часа назад, neonox сказал:

Вот так у вас выглядит цена товара



<div class="price" itemprop="offers" itemscope="" itemtype="http://schema.org/Offer">
						                  						                 2 838 ₽						                  						                  						                </div>

 

а должно быть

 



<div class="price" itemprop="offers" itemscope="" itemtype="http://schema.org/Offer">
<span itemprop="price">2 838 ₽</span>		                 						                  						                  						                </div>

 

 совсем  только убрал разметку.почитал что яндекс и гугл не рекомендуют исползовать  itemtype="http://schema.org/Product" и itemtype="http://schema.org/AggregateOffer"

Link to comment
Share on other sites


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.