Commit bd406ee61ba7fffe349c2d73fd2d9453fe9c3722
1 parent
fecd34db
123
Showing
3 changed files
with
18 additions
and
14 deletions
Show diff stats
frontend/views/catalog/product.php
... | ... | @@ -99,8 +99,9 @@ $this->registerJs (" |
99 | 99 | <div class="alert-success"><?= $flash ?></div> |
100 | 100 | <?php endif; ?> |
101 | 101 | <div class="loyout"> |
102 | + <div itemscope itemtype="http://schema.org/Product"> | |
102 | 103 | <div class="productLeftBar"> |
103 | - <h1><?= Seo::widget([ 'row'=>'h1'])?></h1> | |
104 | + <div itemprop="name"><h1><?= Seo::widget([ 'row'=>'h1'])?></h1></div> | |
104 | 105 | <?php foreach($product->enabledVariantsGrouped as $variantGroup) :?> |
105 | 106 | <div class="begin"><?= $variantGroup->name2?></div> |
106 | 107 | <ul class="product_mod"> |
... | ... | @@ -124,16 +125,19 @@ $this->registerJs (" |
124 | 125 | <?php endforeach; ?> |
125 | 126 | |
126 | 127 | <div class="cost_box product_read_"> |
128 | + <div itemprop="offers" itemscope itemtype="http://schema.org/Offer"> | |
127 | 129 | <div class='params'>код: <span id='art'></span><br/> цвет: <span id='color'></span></div> |
128 | 130 | <div class="product_read_price"> |
129 | 131 | <div class="w"> |
130 | - <strike><span id='old_cost'>0</span> грн.</strike> | |
131 | - <span class="cost"><span id='cost'>0</span> <span class="valute">грн.</span></span> | |
132 | + <strike><span itemprop="price"><span id='old_cost'>0</span></span> грн.</strike> | |
133 | + <span class="cost"><span itemprop="price"><span id='cost'>0</span></span> <span class="valute">грн.</span></span> | |
134 | + <meta itemprop="priceCurrency" content = "UAH"> | |
132 | 135 | </div> |
133 | 136 | <input type='hidden' id='product_id'/> |
134 | 137 | <a href="#" rel='product' class="link_buy fl">Купить</a> |
135 | 138 | <div class="both"></div> |
136 | 139 | </div> |
140 | + </div> | |
137 | 141 | |
138 | 142 | <div class="product_service"> |
139 | 143 | <ul> |
... | ... | @@ -175,9 +179,9 @@ $this->registerJs (" |
175 | 179 | </div> |
176 | 180 | </li> |
177 | 181 | <li><a href="#">Описание</a> |
178 | - <div class="info"> | |
182 | + <div itemprop="description"> <div class="info"> | |
179 | 183 | <?= $product->description ?> |
180 | - </div> | |
184 | + </div></div> | |
181 | 185 | </li> |
182 | 186 | <?php if(!empty($product->video) && strpos($product->video, '.jpg') === FALSE && strpos($product->video, '.png') === FALSE) :?> |
183 | 187 | <li><a href="#">Видео</a> |
... | ... | @@ -192,7 +196,7 @@ $this->registerJs (" |
192 | 196 | <?php endif?> |
193 | 197 | </ul> |
194 | 198 | </div> |
195 | - | |
199 | + </div> | |
196 | 200 | <div class="content"> |
197 | 201 | <div class="pic"> |
198 | 202 | <center> | ... | ... |
frontend/views/catalog/product_item.php
... | ... | @@ -2,7 +2,7 @@ |
2 | 2 | /** @var \common\modules\product\models\Product $product */ |
3 | 3 | use yii\helpers\Url; |
4 | 4 | ?> |
5 | -<li class="item"> | |
5 | +<li class="item" itemscope itemtype="http://schema.org/Product"> | |
6 | 6 | <div class="boxitem"> |
7 | 7 | <div class="pixbox"> |
8 | 8 | <a href="<?= Url::to(['catalog/product', 'product' => $product,'#' => 'm' .$product->enabledVariants[0]->product_variant_id]) ?>"> |
... | ... | @@ -24,26 +24,26 @@ use yii\helpers\Url; |
24 | 24 | <?php endif?> |
25 | 25 | </ul> |
26 | 26 | <?php endif?> |
27 | - <a href="<?= Url::to([ | |
27 | + <div itemprop="name"><a href="<?= Url::to([ | |
28 | 28 | 'catalog/product', |
29 | 29 | 'product' => $product, |
30 | 30 | '#' => 'm' .$product->enabledVariants[0]->product_variant_id]) |
31 | 31 | ?>" |
32 | 32 | class="name"><?= $product->fullname ?> |
33 | - </a> | |
33 | + </a></div> | |
34 | 34 | |
35 | 35 | <?php |
36 | 36 | |
37 | - echo '<div class="cost-block">'; | |
37 | + echo '<div class="cost-block" itemprop="offers" itemscope itemtype="http://schema.org/Offer">'; | |
38 | 38 | echo '<p class="cost">'; |
39 | 39 | // есть скидка |
40 | 40 | if ($product->enabledVariants[0]->price_old != 0 && $product->enabledVariants[0]->price_old != $product->enabledVariants[0]->price) |
41 | 41 | { |
42 | - echo '<strike><span id=\'old_cost\'>'.$product->enabledVariants[0]->price_old.'</span> грн.</strike> '; | |
42 | + echo '<strike><span id=\'old_cost\' itemprop="price">'.$product->enabledVariants[0]->price_old.'</span> грн.</strike> '; | |
43 | 43 | } |
44 | 44 | |
45 | 45 | echo $product->enabledVariants[0]->price.' <span>грн.</span></p>'; |
46 | - | |
46 | + echo '<meta itemprop="priceCurrency" content = "UAH">'; | |
47 | 47 | echo '</div>'; |
48 | 48 | |
49 | 49 | ?> | ... | ... |
frontend/views/catalog/products.php
... | ... | @@ -159,8 +159,8 @@ $this->registerJsFile(Yii::getAlias('@web/js/ion.rangeSlider.js'),[ |
159 | 159 | </form> |
160 | 160 | </div> |
161 | 161 | |
162 | - <div class="content"> | |
163 | - <h1><?= Seo::widget([ 'row'=>'h1'])?></h1> | |
162 | + <div class="content" itemscope itemtype="http://schema.org/Product"> | |
163 | + <div itemprop="name"><h1><?= Seo::widget([ 'row'=>'h1'])?></h1></div> | |
164 | 164 | <div class="sort_menu"> |
165 | 165 | |
166 | 166 | <div class="sort_block"> | ... | ... |