Commit b1a416c36359c40a72f2fa246405c4d67bf529a6
Merge remote-tracking branch 'origin/master'
Showing
4 changed files
with
49 additions
and
36 deletions
Show diff stats
frontend/views/catalog/_product_item.php
@@ -5,12 +5,12 @@ | @@ -5,12 +5,12 @@ | ||
5 | use yii\helpers\Html; | 5 | use yii\helpers\Html; |
6 | use yii\helpers\Url; | 6 | use yii\helpers\Url; |
7 | ?> | 7 | ?> |
8 | -<div class="catalog_item"> | 8 | +<div class="catalog_item" itemscope itemtype="http://schema.org/Product"> |
9 | <div class="wrapper"> | 9 | <div class="wrapper"> |
10 | <div class="item_container" > | 10 | <div class="item_container" > |
11 | <input class="prodInfo" type="hidden" value="[]"> | 11 | <input class="prodInfo" type="hidden" value="[]"> |
12 | <div class="title"> | 12 | <div class="title"> |
13 | - <?= Html::a( $model->name, Url::to(['catalog/product', 'product' => $model->alias]), ['class'=>'btn-product-details','data-pjax'=>0] )?> | 13 | + <?= Html::a( $model->name, Url::to(['catalog/product', 'product' => $model->alias]), ['class'=>'btn-product-details','data-pjax'=>0, 'itemprop' => 'name'] )?> |
14 | </div> | 14 | </div> |
15 | <div class="img"> | 15 | <div class="img"> |
16 | <a data-pjax=0 class="btn-product-details" | 16 | <a data-pjax=0 class="btn-product-details" |
@@ -37,7 +37,8 @@ use yii\helpers\Url; | @@ -37,7 +37,8 @@ use yii\helpers\Url; | ||
37 | <?= \common\components\artboximage\ArtboxImageHelper::getImage($model->imageUrl, 'list', [ | 37 | <?= \common\components\artboximage\ArtboxImageHelper::getImage($model->imageUrl, 'list', [ |
38 | 'alt' => $model->category->name . ' ' . $model->name, | 38 | 'alt' => $model->category->name . ' ' . $model->name, |
39 | 'title' => $model->category->name . ' ' . $model->name, | 39 | 'title' => $model->category->name . ' ' . $model->name, |
40 | - 'class' => 'selected' | 40 | + 'class' => 'selected', |
41 | + 'itemprop' => 'image' | ||
41 | ]) ?> | 42 | ]) ?> |
42 | </a> | 43 | </a> |
43 | <div class="info_icons"> | 44 | <div class="info_icons"> |
@@ -57,7 +58,7 @@ use yii\helpers\Url; | @@ -57,7 +58,7 @@ use yii\helpers\Url; | ||
57 | </ul> | 58 | </ul> |
58 | </div> | 59 | </div> |
59 | </div> | 60 | </div> |
60 | - <div class="price"> | 61 | + <div class="price" itemprop="offers" itemscope itemtype="http://schema.org/Offer"> |
61 | 62 | ||
62 | <?php if($model->variant->price_old){?> | 63 | <?php if($model->variant->price_old){?> |
63 | <div class="dlexfduinxipi old_price-wr"> | 64 | <div class="dlexfduinxipi old_price-wr"> |
@@ -69,7 +70,8 @@ use yii\helpers\Url; | @@ -69,7 +70,8 @@ use yii\helpers\Url; | ||
69 | <div class="dlexfduinxipi"> | 70 | <div class="dlexfduinxipi"> |
70 | Цена: | 71 | Цена: |
71 | <span class="main"> | 72 | <span class="main"> |
72 | - <?= $model->variant->price ?> | 73 | + <span itemprop="price"><?= $model->variant->price ?></span> |
74 | + <meta itemprop="priceCurrency" content = "UAH" /> | ||
73 | <span class="currency">грн</span> | 75 | <span class="currency">грн</span> |
74 | </span> | 76 | </span> |
75 | </div> | 77 | </div> |
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/catalog/products.php
@@ -81,16 +81,14 @@ | @@ -81,16 +81,14 @@ | ||
81 | 81 | ||
82 | 82 | ||
83 | </div> | 83 | </div> |
84 | - <div class="block-75" itemscope itemtype="http://schema.org/Product"> | ||
85 | - | 84 | + <div class="block-75"> |
86 | 85 | ||
87 | <h1 class="title"><?= Seo::widget([ 'row'=>'h1'])?></h1> | 86 | <h1 class="title"><?= Seo::widget([ 'row'=>'h1'])?></h1> |
88 | 87 | ||
89 | - | ||
90 | <div class="list_filters_links"> | 88 | <div class="list_filters_links"> |
91 | 89 | ||
92 | - | ||
93 | <div class="sort_block"> | 90 | <div class="sort_block"> |
91 | + | ||
94 | <span>Сортировка:</span> | 92 | <span>Сортировка:</span> |
95 | <?= \yii\widgets\LinkSorter::widget([ | 93 | <?= \yii\widgets\LinkSorter::widget([ |
96 | 'sort' => $productProvider->sort, | 94 | 'sort' => $productProvider->sort, |
frontend/views/layouts/main.php
@@ -126,11 +126,11 @@ use common\models\Event; | @@ -126,11 +126,11 @@ use common\models\Event; | ||
126 | </div> | 126 | </div> |
127 | <div class="clearfix"></div> | 127 | <div class="clearfix"></div> |
128 | <header> | 128 | <header> |
129 | - <div class="container"> | 129 | + <div class="container" itemscope itemtype="http://schema.org/Organization"> |
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" 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"> |
@@ -141,7 +141,7 @@ use common\models\Event; | @@ -141,7 +141,7 @@ use common\models\Event; | ||
141 | <td> | 141 | <td> |
142 | <img src="/images/new_img/ico/ico-7.png" alt=""> | 142 | <img src="/images/new_img/ico/ico-7.png" alt=""> |
143 | </td> | 143 | </td> |
144 | - <td><p class="header_phones"> | 144 | + <td><p class="header_phones" itemprop="telephone"> |
145 | <span>(044)</span> 339-92-33</p></td> | 145 | <span>(044)</span> 339-92-33</p></td> |
146 | </tr> | 146 | </tr> |
147 | </table> | 147 | </table> |
@@ -152,7 +152,7 @@ use common\models\Event; | @@ -152,7 +152,7 @@ use common\models\Event; | ||
152 | <td> | 152 | <td> |
153 | <img src="/images/new_img/ico/ico-9.png" alt=""> | 153 | <img src="/images/new_img/ico/ico-9.png" alt=""> |
154 | </td> | 154 | </td> |
155 | - <td><p class="header_phones"> | 155 | + <td><p class="header_phones" itemprop="telephone"> |
156 | <span>(095)</span> 282-85-08</p></td> | 156 | <span>(095)</span> 282-85-08</p></td> |
157 | </tr> | 157 | </tr> |
158 | </table> | 158 | </table> |
@@ -166,7 +166,7 @@ use common\models\Event; | @@ -166,7 +166,7 @@ use common\models\Event; | ||
166 | <td> | 166 | <td> |
167 | <img src="/images/new_img/ico/ico-8.png" alt=""> | 167 | <img src="/images/new_img/ico/ico-8.png" alt=""> |
168 | </td> | 168 | </td> |
169 | - <td><p class="header_phones"> | 169 | + <td><p class="header_phones" itemprop="telephone"> |
170 | <span>(068)</span> 776-60-67</p></td> | 170 | <span>(068)</span> 776-60-67</p></td> |
171 | </tr> | 171 | </tr> |
172 | </table> | 172 | </table> |
@@ -229,16 +229,28 @@ use common\models\Event; | @@ -229,16 +229,28 @@ use common\models\Event; | ||
229 | <div class="container"> | 229 | <div class="container"> |
230 | 230 | ||
231 | <!---test---> | 231 | <!---test---> |
232 | - <?= Breadcrumbs::widget([ | ||
233 | - 'homeLink' => [ | ||
234 | - 'label' => 'Интернет-магазин светильников', | ||
235 | - 'url' => Url::to([ '/' ]), | ||
236 | - 'itemprop' => 'url', | ||
237 | - ], | ||
238 | - 'itemTemplate' => "<li><span itemprop=\"title\">{link}</span></li>\n", | ||
239 | - // template for all links | ||
240 | - 'links' => isset( $this->params[ 'breadcrumbs' ] ) ? $this->params[ 'breadcrumbs' ] : [], | ||
241 | - ]) ?> | 232 | + <?php |
233 | + if (isset($this->params['breadcrumbs'])) { | ||
234 | + $links = $this->params['breadcrumbs']; | ||
235 | + foreach($links as $index => $link) { | ||
236 | + if(is_array($link)) { | ||
237 | + $links[$index]['itemprop'] = 'url'; | ||
238 | + $links[$index]['label'] = '<span itemprop="title">'.$links[$index]['label'].'</span>'; | ||
239 | + } | ||
240 | + } | ||
241 | + } | ||
242 | + echo Breadcrumbs::widget([ | ||
243 | + 'encodeLabels' => false, | ||
244 | + 'itemTemplate' => "<li><span itemscope itemtype=\"http://data-vocabulary.org/Breadcrumb\">{link}</span></li>\n", | ||
245 | + 'links' => isset($links) ? $links : [], | ||
246 | + 'homeLink' => [ | ||
247 | + 'label' => '<span itemprop="title">Интернет-магазин светильников</span>', | ||
248 | + 'url' => Url::to([ '/' ]), | ||
249 | + 'itemprop' => 'url', | ||
250 | + ], | ||
251 | + 'activeItemTemplate' => '<li class="active"><span itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><span itemprop="title">{link}</span></span></li>', | ||
252 | + ]) | ||
253 | + ?> | ||
242 | 254 | ||
243 | 255 | ||
244 | </div> | 256 | </div> |
@@ -340,7 +352,7 @@ use common\models\Event; | @@ -340,7 +352,7 @@ use common\models\Event; | ||
340 | <footer> | 352 | <footer> |
341 | <div class="container margin-top-40"> | 353 | <div class="container margin-top-40"> |
342 | <div class="row"> | 354 | <div class="row"> |
343 | - <div class="col-md-3 col-lg-3"> | 355 | + <div class="col-md-3 col-lg-3" itemscope itemtype="http://schema.org/Organization"> |
344 | <div class="footer-title_new">Есть к нам вопросы?</div> | 356 | <div class="footer-title_new">Есть к нам вопросы?</div> |
345 | <table class="footer-phones-wr" cellspacing="0" cellpadding="0" border="0" width="100%"> | 357 | <table class="footer-phones-wr" cellspacing="0" cellpadding="0" border="0" width="100%"> |
346 | <tr> | 358 | <tr> |
@@ -349,7 +361,7 @@ use common\models\Event; | @@ -349,7 +361,7 @@ use common\models\Event; | ||
349 | <tr> | 361 | <tr> |
350 | <td><img src="/images/new_img/ico/ico-7.png" alt=""> | 362 | <td><img src="/images/new_img/ico/ico-7.png" alt=""> |
351 | </td> | 363 | </td> |
352 | - <td><p class="footer_phones"> | 364 | + <td><p class="footer_phones" itemprop="telephone"> |
353 | <span>(044)</span> 339-92-33</p></td> | 365 | <span>(044)</span> 339-92-33</p></td> |
354 | </tr> | 366 | </tr> |
355 | </table> | 367 | </table> |
@@ -361,7 +373,7 @@ use common\models\Event; | @@ -361,7 +373,7 @@ use common\models\Event; | ||
361 | <tr> | 373 | <tr> |
362 | <td><img src="/images/new_img/ico/ico-8.png" alt=""> | 374 | <td><img src="/images/new_img/ico/ico-8.png" alt=""> |
363 | </td> | 375 | </td> |
364 | - <td><p class="footer_phones"> | 376 | + <td><p class="footer_phones" itemprop="telephone"> |
365 | <span>(068)</span> 776-60-67</p></td> | 377 | <span>(068)</span> 776-60-67</p></td> |
366 | </tr> | 378 | </tr> |
367 | </table> | 379 | </table> |
@@ -373,7 +385,7 @@ use common\models\Event; | @@ -373,7 +385,7 @@ use common\models\Event; | ||
373 | <tr> | 385 | <tr> |
374 | <td><img src="/images/new_img/ico/ico-9.png" alt=""> | 386 | <td><img src="/images/new_img/ico/ico-9.png" alt=""> |
375 | </td> | 387 | </td> |
376 | - <td><p class="footer_phones"> | 388 | + <td><p class="footer_phones" itemprop="telephone"> |
377 | <span>(095)</span> 282-85-08</p></td> | 389 | <span>(095)</span> 282-85-08</p></td> |
378 | </tr> | 390 | </tr> |
379 | </table> | 391 | </table> |