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