Commit 70b5a3488ea899de049e37dff036e077892494da
1 parent
d3481fb6
micro data product
Showing
2 changed files
with
10 additions
and
9 deletions
Show diff stats
frontend/views/catalog/product.php
@@ -42,7 +42,7 @@ | @@ -42,7 +42,7 @@ | ||
42 | 42 | ||
43 | <div class="wrapper white item_container"> | 43 | <div class="wrapper white item_container"> |
44 | <div class="container"> | 44 | <div class="container"> |
45 | - <div class="product_detail"> | 45 | + <div class="product_detail" itemscope itemtype="http://schema.org/Product"> |
46 | 46 | ||
47 | <h1 itemprop="name"><?= Seo::widget([ 'row' => 'h1' ]) ?></h1> | 47 | <h1 itemprop="name"><?= Seo::widget([ 'row' => 'h1' ]) ?></h1> |
48 | <div class="product_code">Код:<?= $product->variant->sku ?></div> | 48 | <div class="product_code">Код:<?= $product->variant->sku ?></div> |
@@ -68,7 +68,8 @@ | @@ -68,7 +68,8 @@ | ||
68 | <a href="<?= $product->imageUrl ?>" data-lightbox="image-1" data-title="<?= $product->name;?>"> | 68 | <a href="<?= $product->imageUrl ?>" data-lightbox="image-1" data-title="<?= $product->name;?>"> |
69 | <?= ArtboxImageHelper::getImage($product->imageUrl, 'product_show',[ | 69 | <?= ArtboxImageHelper::getImage($product->imageUrl, 'product_show',[ |
70 | 'alt'=>$product->name." фото 1" , | 70 | 'alt'=>$product->name." фото 1" , |
71 | - 'title' => $product->name." фото 1" | 71 | + 'title' => $product->name." фото 1", |
72 | + 'itemprop' => 'image' | ||
72 | ]) ?> | 73 | ]) ?> |
73 | </a> | 74 | </a> |
74 | 75 | ||
@@ -105,7 +106,7 @@ | @@ -105,7 +106,7 @@ | ||
105 | </ul> | 106 | </ul> |
106 | 107 | ||
107 | <div class="floating_helper_block_wrapper"> | 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 | <table> | 110 | <table> |
110 | <tbody> | 111 | <tbody> |
111 | <tr> | 112 | <tr> |
@@ -309,12 +310,12 @@ | @@ -309,12 +310,12 @@ | ||
309 | <div class="price"> | 310 | <div class="price"> |
310 | <?php if($product->variant->price_old){?> | 311 | <?php if($product->variant->price_old){?> |
311 | <span class="main"> | 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 | <span class="currency"> грн.</span> | 314 | <span class="currency"> грн.</span> |
314 | </span> | 315 | </span> |
315 | <?php }?> | 316 | <?php }?> |
316 | <span class="main"> | 317 | <span class="main"> |
317 | - <span itemprop="price" class="price"><?= $product->variant->price ?></span> | 318 | + <span class="price"><?= $product->variant->price ?></span> |
318 | <span class="currency"> грн.</span> | 319 | <span class="currency"> грн.</span> |
319 | </span> | 320 | </span> |
320 | </div> | 321 | </div> |
@@ -418,10 +419,10 @@ | @@ -418,10 +419,10 @@ | ||
418 | <?php | 419 | <?php |
419 | if(!empty( $product->averageRating )) { | 420 | if(!empty( $product->averageRating )) { |
420 | ?> | 421 | ?> |
421 | - <div class="rating"> | 422 | + <div class="rating" itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating"> |
422 | <div class="rateit" data-rateit-value="<?php echo $product->averageRating->value; ?>" data-rateit-ispreset="true" data-rateit-readonly="true"></div> | 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> | ||
424 | - голосов: <span id="product_vote_count"> | 424 | + рейтинг: <span id="product_rate_avg" itemprop="ratingValue"><?=$product->averageRating->value?></span> |
425 | + голосов: <span id="product_vote_count" itemprop="ratingCount"> | ||
425 | <?php | 426 | <?php |
426 | echo count($product->comments); | 427 | echo count($product->comments); |
427 | ?> | 428 | ?> |
frontend/views/layouts/main.php
@@ -130,7 +130,7 @@ use common\models\Event; | @@ -130,7 +130,7 @@ use common\models\Event; | ||
130 | <table cellpadding="0" cellspacing="0" border="0" class="header_tb"> | 130 | <table cellpadding="0" cellspacing="0" border="0" class="header_tb"> |
131 | <tr> | 131 | <tr> |
132 | <td valign="middle" class="col-md-2 col-lg-3"> | 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 | </td> | 134 | </td> |
135 | <td align="center" valign="middle" class="col-md-4 col-lg-4"> | 135 | <td align="center" valign="middle" class="col-md-4 col-lg-4"> |
136 | <table class="tb_phones" cellspacing="0" cellpadding="0" border="0"> | 136 | <table class="tb_phones" cellspacing="0" cellpadding="0" border="0"> |