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,7 +15,10 @@ use yii\web\View; | ||
15 | <?php if ($product->is_top) :?> | 15 | <?php if ($product->is_top) :?> |
16 | <div class="top">Toп</div> | 16 | <div class="top">Toп</div> |
17 | <?php endif?> | 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 | <div class="pic"> | 22 | <div class="pic"> |
20 | <?= \common\components\artboximage\ArtboxImageHelper::getImage($product->imageUrl, 'product_list')?> | 23 | <?= \common\components\artboximage\ArtboxImageHelper::getImage($product->imageUrl, 'product_list')?> |
21 | </div> | 24 | </div> |
@@ -25,9 +28,11 @@ use yii\web\View; | @@ -25,9 +28,11 @@ use yii\web\View; | ||
25 | <div class="brand">Бренд: <span><?= $product->brand->name?></span></div> | 28 | <div class="brand">Бренд: <span><?= $product->brand->name?></span></div> |
26 | <?php endif?> | 29 | <?php endif?> |
27 | <div class="type"><?= implode(', ', $product->categoriesNames)?></div> | 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 | </div> | 36 | </div> |
32 | <?php endforeach?> | 37 | <?php endforeach?> |
33 | <div style="clear:both;"></div> | 38 | <div style="clear:both;"></div> |
frontend/views/catalog/product_item.php
@@ -18,6 +18,6 @@ use common\components\artboximage\ArtboxImageHelper; | @@ -18,6 +18,6 @@ use common\components\artboximage\ArtboxImageHelper; | ||
18 | <div class="price"><?= $product->variant->price?> <span>грн.</span></div> | 18 | <div class="price"><?= $product->variant->price?> <span>грн.</span></div> |
19 | <button class="basket_add_but" data-id="<?= $product->variant->product_variant_id?>">в корзину</button> | 19 | <button class="basket_add_but" data-id="<?= $product->variant->product_variant_id?>">в корзину</button> |
20 | <?php endif?> | 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 | <img class="item_bottom_img" src="/images/nc_item_bottom.png" alt=""> | 22 | <img class="item_bottom_img" src="/images/nc_item_bottom.png" alt=""> |
23 | </div> | 23 | </div> |
24 | \ No newline at end of file | 24 | \ No newline at end of file |
frontend/views/catalog/product_smart.php
@@ -18,6 +18,6 @@ use common\components\artboximage\ArtboxImageHelper; | @@ -18,6 +18,6 @@ use common\components\artboximage\ArtboxImageHelper; | ||
18 | <div class="price"><?= $product->variant->price?> <span>грн.</span></div> | 18 | <div class="price"><?= $product->variant->price?> <span>грн.</span></div> |
19 | <button class="basket_add_but" data-id="<?= $product->variant->product_variant_id?>">в корзину</button> | 19 | <button class="basket_add_but" data-id="<?= $product->variant->product_variant_id?>">в корзину</button> |
20 | <?php endif?> | 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 | <img class="item_bottom_img" src="/images/nc_item_bottom.png" alt=""> | 22 | <img class="item_bottom_img" src="/images/nc_item_bottom.png" alt=""> |
23 | </div> | 23 | </div> |
24 | \ No newline at end of file | 24 | \ No newline at end of file |