Commit 70b5a3488ea899de049e37dff036e077892494da

Authored by Alex Savenko
1 parent d3481fb6

micro data product

frontend/views/catalog/product.php
... ... @@ -42,7 +42,7 @@
42 42  
43 43 <div class="wrapper white item_container">
44 44 <div class="container">
45   - <div class="product_detail">
  45 + <div class="product_detail" itemscope itemtype="http://schema.org/Product">
46 46  
47 47 <h1 itemprop="name"><?= Seo::widget([ 'row' => 'h1' ]) ?></h1>
48 48 <div class="product_code">Код:<?= $product->variant->sku ?></div>
... ... @@ -68,7 +68,8 @@
68 68 <a href="<?= $product->imageUrl ?>" data-lightbox="image-1" data-title="<?= $product->name;?>">
69 69 <?= ArtboxImageHelper::getImage($product->imageUrl, 'product_show',[
70 70 'alt'=>$product->name." фото 1" ,
71   - 'title' => $product->name." фото 1"
  71 + 'title' => $product->name." фото 1",
  72 + 'itemprop' => 'image'
72 73 ]) ?>
73 74 </a>
74 75  
... ... @@ -105,7 +106,7 @@
105 106 </ul>
106 107  
107 108 <div class="floating_helper_block_wrapper">
108   - <div class="floating_helper_block" style="visibility: visible; opacity: 1;">
  109 + <div class="floating_helper_block" style="visibility: visible; opacity: 1;" itemprop="offers" itemscope itemtype="http://schema.org/Offer">
109 110 <table>
110 111 <tbody>
111 112 <tr>
... ... @@ -309,12 +310,12 @@
309 310 <div class="price">
310 311 <?php if($product->variant->price_old){?>
311 312 <span class="main">
312   - <span itemprop="price" class="price"><s><?= $product->variant->price_old ?></s></span>
  313 + <span class="price"><s><?= $product->variant->price_old ?></s></span>
313 314 <span class="currency">&nbsp;грн.</span>
314 315 </span>
315 316 <?php }?>
316 317 <span class="main">
317   - <span itemprop="price" class="price"><?= $product->variant->price ?></span>
  318 + <span class="price"><?= $product->variant->price ?></span>
318 319 <span class="currency">&nbsp;грн.</span>
319 320 </span>
320 321 </div>
... ... @@ -418,10 +419,10 @@
418 419 <?php
419 420 if(!empty( $product->averageRating )) {
420 421 ?>
421   - <div class="rating">
  422 + <div class="rating" itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
422 423 <div class="rateit" data-rateit-value="<?php echo $product->averageRating->value; ?>" data-rateit-ispreset="true" data-rateit-readonly="true"></div>
423   - рейтинг: <span id="product_rate_avg"><?=$product->averageRating->value?></span>&nbsp;&nbsp;
424   - голосов: <span id="product_vote_count">
  424 + рейтинг: <span id="product_rate_avg" itemprop="ratingValue"><?=$product->averageRating->value?></span>&nbsp;&nbsp;
  425 + голосов: <span id="product_vote_count" itemprop="ratingCount">
425 426 <?php
426 427 echo count($product->comments);
427 428 ?>
... ...
frontend/views/layouts/main.php
... ... @@ -130,7 +130,7 @@ use common\models\Event;
130 130 <table cellpadding="0" cellspacing="0" border="0" class="header_tb">
131 131 <tr>
132 132 <td valign="middle" class="col-md-2 col-lg-3">
133   - <a href="/"><img class="header-new-img" itemprop="logo" src="/images/new_img/new_logo.png" alt=""></a>
  133 + <a href="/" itemprop="url"><img class="header-new-img" itemprop="logo" src="/images/new_img/new_logo.png" alt=""></a>
134 134 </td>
135 135 <td align="center" valign="middle" class="col-md-4 col-lg-4">
136 136 <table class="tb_phones" cellspacing="0" cellpadding="0" border="0">
... ...