Commit 435ff69145e94cb9a79db383e3a56ee1e952dc9e
Merge remote-tracking branch 'origin/master'
Showing
5 changed files
with
50 additions
and
28 deletions
Show diff stats
frontend/views/catalog/_product_item.php
... | ... | @@ -13,21 +13,27 @@ use yii\helpers\Url; |
13 | 13 | <?= Html::a( $model->name, Url::to(['catalog/product', 'product' => $model->alias]), ['class'=>'btn-product-details'] )?> |
14 | 14 | </div> |
15 | 15 | <div class="img"> |
16 | - <a class="btn-product-details" href="<?= Url::to([ | |
16 | + <a class="btn-product-details" | |
17 | + | |
18 | + | |
19 | + href="<?= Url::to([ | |
17 | 20 | 'catalog/product', |
18 | 21 | 'product' => $model->alias |
19 | 22 | ]) ?>"> |
20 | - <?php | |
23 | + <div class="banners_sale"> | |
24 | + <?php | |
21 | 25 | foreach($model->events as $event){ |
22 | 26 | if($event->banner){ |
23 | - echo \common\components\artboximage\ArtboxImageHelper::getImage($event->getImageUrl('banner'), 'banner_list',[ | |
24 | - 'class' => 'banner-in-list' | |
25 | - ]); | |
27 | + echo \common\components\artboximage\ArtboxImageHelper::getImage($event->getImageUrl('banner'), 'banner_list',[ | |
28 | + 'class' => 'banner-in-list' | |
29 | + ]); | |
26 | 30 | } |
27 | 31 | } |
28 | 32 | |
29 | - ?> | |
30 | - <?= \common\components\artboximage\ArtboxImageHelper::getImage($model->enabledVariants[ 0 ]->imageUrl, 'list', [ | |
33 | + ?> | |
34 | + </div> | |
35 | + | |
36 | + <?= \common\components\artboximage\ArtboxImageHelper::getImage($model->variant->imageUrl, 'list', [ | |
31 | 37 | 'alt' => $model->category->name . ' ' . $model->name, |
32 | 38 | 'title' => $model->category->name . ' ' . $model->name, |
33 | 39 | 'class' => 'selected' |
... | ... | @@ -49,7 +55,7 @@ use yii\helpers\Url; |
49 | 55 | <div class="price"> |
50 | 56 | |
51 | 57 | <?php if($model->variant->price_old){?> |
52 | - <div class="dlexfduinxipi"> | |
58 | + <div class="dlexfduinxipi old_price-wr"> | |
53 | 59 | <span class="main"> |
54 | 60 | <s><?= $model->variant->price_old ?><span class="currency">грн</span></s> |
55 | 61 | </span> |
... | ... | @@ -64,19 +70,29 @@ use yii\helpers\Url; |
64 | 70 | </div> |
65 | 71 | </div> |
66 | 72 | <div class="additional_info params"> |
67 | - <div class="block_title">Особенности</div> | |
73 | + <div class="block_title">Особенности | |
74 | + <span style="float: right;font-weight: normal;color: #390;font-size: 13px;"> | |
75 | + <?php if($model->variant->status == 1){?> | |
76 | + снят с производства | |
77 | + <?php } elseif($model->variant->stock > 0) {?> | |
78 | + в наличии | |
79 | + <?php } else {?> | |
80 | + под заказ | |
81 | + <?php } ?> | |
82 | + </span> | |
83 | + </div> | |
68 | 84 | <div class="descr"> |
69 | 85 | <div class="info"> |
70 | 86 | <ul class="sv"> |
71 | - <li class="available"> | |
72 | - <?php if($model->variant->status == 1){?> | |
73 | - снят с производства | |
74 | - <?php } elseif($model->variant->stock > 0) {?> | |
75 | - в наличии | |
76 | - <?php } else {?> | |
77 | - под заказ | |
78 | - <?php } ?> | |
79 | - </li> | |
87 | +<!-- <li class="available">--> | |
88 | +<!-- --><?php //if($model->variant->status == 1){?> | |
89 | +<!-- снят с производства--> | |
90 | +<!-- --><?php //} elseif($model->variant->stock > 0) {?> | |
91 | +<!-- в наличии--> | |
92 | +<!-- --><?php //} else {?> | |
93 | +<!-- под заказ--> | |
94 | +<!-- --><?php //} ?> | |
95 | +<!-- </li>--> | |
80 | 96 | <li><span>Бренд:</span> <?= !empty($model->brand) ? $model->brand->name : '' ?></li> |
81 | 97 | |
82 | 98 | <?php foreach($model->getActiveProperties($category->category_id) as $group): ?> |
... | ... | @@ -98,11 +114,11 @@ use yii\helpers\Url; |
98 | 114 | |
99 | 115 | // есть скидка |
100 | 116 | echo '<p class="cost">'; |
101 | - if($model->enabledVariants[ 0 ]->price_old != 0 && $model->enabledVariants[ 0 ]->price_old != $model->enabledVariants[ 0 ]->price) { | |
102 | - echo '<strike><span id=\'old_cost\' itemprop="price">' . $model->enabledVariants[0]->price_old . '</span> грн.</strike> '; | |
103 | - echo $model->enabledVariants[0]->price . ' <span>грн.</span></p>'; | |
117 | + if($model->variant->price_old != 0 && $model->variant->price_old != $model->variant->price) { | |
118 | + echo '<strike><span id=\'old_cost\' itemprop="price">' . $model->variant->price_old . '</span> грн.</strike> '; | |
119 | + echo $model->variant->price . ' <span>грн.</span></p>'; | |
104 | 120 | } else { |
105 | - echo '<span itemprop="price">'.$model->enabledVariants[0]->price . ' </span><span>грн.</span></p>'; | |
121 | + echo '<span itemprop="price">'.$model->variant->price . ' </span><span>грн.</span></p>'; | |
106 | 122 | } |
107 | 123 | echo '<meta itemprop="priceCurrency" content = "UAH">'; |
108 | 124 | echo '</div>'; | ... | ... |
frontend/views/catalog/product.php
... | ... | @@ -113,7 +113,7 @@ FlipclockAsset::register($this); |
113 | 113 | {?> |
114 | 114 | <a lang="5892" class="btn btnBuy buy_button btn-large1" data-id="<?php echo $product->variant->product_variant_id; ?>" data-toggle="modal" data-target="#buyForm">Купить</a> |
115 | 115 | <?php } else {?> |
116 | - <a href="#" style="background-color:dimgrey; background-image:linear-gradient(to bottom, #9d9fa0, #abafb2)" class="btn btn-large btn-default " data-id="<?php echo $product->variant->product_variant_id; ?>" >снят с производства</a> | |
116 | + <a href="#" style="background-color:dimgrey; background-image:linear-gradient(to bottom, #9d9fa0, #abafb2);cursor:default !important;color:#fff!important;box-shadow: none !important;border-top: 1px solid #256caf !important;border-bottom: 1px solid #256caf !important;" class="btn btn-large btn-default " data-id="<?php echo $product->variant->product_variant_id; ?>" >снят с производства</a> | |
117 | 117 | <?php } ?> |
118 | 118 | |
119 | 119 | </td> |
... | ... | @@ -320,7 +320,7 @@ FlipclockAsset::register($this); |
320 | 320 | <?php if($product->variant->status != 1){?> |
321 | 321 | <a href="#" class="btn btn-large buy_button" data-toggle="modal" data-id="<?php echo $product->variant->product_variant_id; ?>" data-target="#buyForm" lang="5892">Купить</a> |
322 | 322 | <?php }else { ?> |
323 | - <a href="#" style="background-color:dimgrey; background-image:linear-gradient(to bottom, #9d9fa0, #abafb2)" class="btn btn-large btn-default " data-id="<?php echo $product->variant->product_variant_id; ?>" >снят с производства</a> | |
323 | + <a href="#" style="background-color:dimgrey; background-image:linear-gradient(to bottom, #9d9fa0, #abafb2);cursor:default !important;color:#fff!important;box-shadow: none !important;border-top: 1px solid #256caf !important;border-bottom: 1px solid #256caf !important;" class="btn btn-large btn-default " data-id="<?php echo $product->variant->product_variant_id; ?>" >снят с производства</a> | |
324 | 324 | <?php } ?> |
325 | 325 | <div class="clearfix"></div> |
326 | 326 | </div> | ... | ... |
frontend/views/event/_product_item.php
... | ... | @@ -50,7 +50,7 @@ $category = $model->category; |
50 | 50 | <div class="price"> |
51 | 51 | |
52 | 52 | <?php if($model->variant->price_old){?> |
53 | - <div class="dlexfduinxipi"> | |
53 | + <div class="dlexfduinxipi old_price-wr"> | |
54 | 54 | <span class="main"> |
55 | 55 | <s><?= $model->variant->price_old ?><span class="currency">грн</span></s> |
56 | 56 | </span> | ... | ... |
frontend/views/event/show.php
... | ... | @@ -72,8 +72,9 @@ $this->title = $model->name; |
72 | 72 | <?= ListView::widget([ |
73 | 73 | 'dataProvider' => $productProvider, |
74 | 74 | 'itemView' => function ($model, $key, $index, $widget) { |
75 | - return $this->render('_product_item',[ | |
75 | + return $this->render('../catalog/_product_item',[ | |
76 | 76 | 'model' => $model, |
77 | + 'category' => $model->category, | |
77 | 78 | |
78 | 79 | ]); |
79 | 80 | }, | ... | ... |
frontend/web/css/css_header.css
... | ... | @@ -10869,9 +10869,14 @@ img.selected { |
10869 | 10869 | .category_popular_list .catalog_item .price { |
10870 | 10870 | font-size: 11px; |
10871 | 10871 | margin: 0 0 5px 0; |
10872 | - color: #333 | |
10872 | + color: #333; | |
10873 | + position: relative; | |
10874 | +} | |
10875 | +.old_price-wr { | |
10876 | + position: absolute; | |
10877 | + left: 0; | |
10878 | + top: -18px; | |
10873 | 10879 | } |
10874 | - | |
10875 | 10880 | .catalog_product_list.view_list .price { |
10876 | 10881 | display: none |
10877 | 10882 | } | ... | ... |