Commit 5f7ba6dc003ff3b0e1c1ed13d3e314d07c037070
1 parent
1b9687f3
Special product block - fixes
Showing
3 changed files
with
11 additions
and
6 deletions
Show diff stats
common/modules/product/widgets/views/products_block.php
... | ... | @@ -15,7 +15,10 @@ use yii\web\View; |
15 | 15 | <?php if ($product->is_top) :?> |
16 | 16 | <div class="top">Toп</div> |
17 | 17 | <?php endif?> |
18 | - <a href="#" class="item_link"> | |
18 | + <a href="<?= \yii\helpers\Url::to([ | |
19 | + 'catalog/product', | |
20 | + 'product' => $product]) | |
21 | + ?>" class="item_link"> | |
19 | 22 | <div class="pic"> |
20 | 23 | <?= \common\components\artboximage\ArtboxImageHelper::getImage($product->imageUrl, 'product_list')?> |
21 | 24 | </div> |
... | ... | @@ -25,9 +28,11 @@ use yii\web\View; |
25 | 28 | <div class="brand">Бренд: <span><?= $product->brand->name?></span></div> |
26 | 29 | <?php endif?> |
27 | 30 | <div class="type"><?= implode(', ', $product->categoriesNames)?></div> |
28 | - <div class="price"><?= $product->variant ? $product->variant->price : 0?> <span>грн.</span></div> | |
29 | - <button class="basket_add_but">в корзину</button> | |
30 | - <a href="#" class="compare_add_but"><span>добавить к сравнению</span></a> | |
31 | + <?php if($product->variant) :?> | |
32 | + <div class="price"><?= $product->variant->price?> <span>грн.</span></div> | |
33 | + <button class="basket_add_but" data-id="<?= $product->variant->product_variant_id?>">в корзину</button> | |
34 | + <?php endif?> | |
35 | + <!--<a href="#" class="compare_add_but" data-id="<?/*= $product->product_id*/?>"><span>добавить к сравнению</span></a>--> | |
31 | 36 | </div> |
32 | 37 | <?php endforeach?> |
33 | 38 | <div style="clear:both;"></div> | ... | ... |
frontend/views/catalog/product_item.php
... | ... | @@ -18,6 +18,6 @@ use common\components\artboximage\ArtboxImageHelper; |
18 | 18 | <div class="price"><?= $product->variant->price?> <span>грн.</span></div> |
19 | 19 | <button class="basket_add_but" data-id="<?= $product->variant->product_variant_id?>">в корзину</button> |
20 | 20 | <?php endif?> |
21 | - <a href="#" class="compare_add_but" data-id="<?= $product->product_id?>"><span>добавить к сравнению</span></a> | |
21 | + <!--<a href="#" class="compare_add_but" data-id="<?/*= $product->product_id*/?>"><span>добавить к сравнению</span></a>--> | |
22 | 22 | <img class="item_bottom_img" src="/images/nc_item_bottom.png" alt=""> |
23 | 23 | </div> |
24 | 24 | \ No newline at end of file | ... | ... |
frontend/views/catalog/product_smart.php
... | ... | @@ -18,6 +18,6 @@ use common\components\artboximage\ArtboxImageHelper; |
18 | 18 | <div class="price"><?= $product->variant->price?> <span>грн.</span></div> |
19 | 19 | <button class="basket_add_but" data-id="<?= $product->variant->product_variant_id?>">в корзину</button> |
20 | 20 | <?php endif?> |
21 | - <a href="#" class="compare_add_but" data-id="<?= $product->product_id?>"><span>добавить к сравнению</span></a> | |
21 | + <!--<a href="#" class="compare_add_but" data-id="<?/*= $product->product_id*/?>"><span>добавить к сравнению</span></a>--> | |
22 | 22 | <img class="item_bottom_img" src="/images/nc_item_bottom.png" alt=""> |
23 | 23 | </div> |
24 | 24 | \ No newline at end of file | ... | ... |