Commit 7c3b42c216baced5ceabdf4b28afb263eb87a8ad
Merge remote-tracking branch 'origin/master'
# Conflicts: # common/modules/product/widgets/views/product_smart.php # common/modules/product/widgets/views/products_block.php # frontend/views/catalog/product_item.php
Showing
5 changed files
with
43 additions
and
32 deletions
Show diff stats
common/modules/product/widgets/views/product_smart.php
| ... | ... | @@ -15,13 +15,13 @@ use yii\helpers\Url; |
| 15 | 15 | <?php if(!empty($product->is_top) || !empty($product->is_new) || !empty($product->akciya)) :?> |
| 16 | 16 | <ul class="product-special"> |
| 17 | 17 | <?php if(!empty($product->is_top)) :?> |
| 18 | - <li class="top">top </li> | |
| 18 | + <li class="top"><div>top</div></li> | |
| 19 | 19 | <?php endif?> |
| 20 | 20 | <?php if(!empty($product->is_new)) :?> |
| 21 | - <li class="new">new </li> | |
| 21 | + <li class="new"><div>new</div></li> | |
| 22 | 22 | <?php endif?> |
| 23 | 23 | <?php if(!empty($product->akciya)) :?> |
| 24 | - <li class="promo">promo </li> | |
| 24 | + <li class="promo"><div>promo</div></li> | |
| 25 | 25 | <?php endif?> |
| 26 | 26 | </ul> |
| 27 | 27 | <?php endif?> | ... | ... |
common/modules/product/widgets/views/products_block.php
| 1 | 1 | <?php |
| 2 | - use yii\web\View; | |
| 2 | +use yii\web\View; | |
| 3 | 3 | ?> |
| 4 | 4 | <?php if(!empty($products)) :?> |
| 5 | -<div class="_prd_spec-wr"> | |
| 6 | - <div class="special-products products<?= (!empty($class) ? ' '. $class : '')?>"> | |
| 7 | - <h3><?= $title?></h3> | |
| 8 | - <div class="owl-carousel"> | |
| 9 | - <?php foreach($products as $product) :?> | |
| 10 | - <?= $this->render('product_smart', ['product' => $product]);?> | |
| 11 | - <?php endforeach?> | |
| 5 | + <div class="_prd_spec-wr"> | |
| 6 | + <div class="special-products products<?= (!empty($class) ? ' '. $class : '')?>"> | |
| 7 | + <h3><?= $title?></h3> | |
| 8 | + <div class="owl-carousel"> | |
| 9 | + <?php foreach($products as $product) :?> | |
| 10 | + <?= $this->render('product_smart', ['product' => $product]);?> | |
| 11 | + <?php endforeach?> | |
| 12 | + </div> | |
| 13 | + <div class="both"></div> | |
| 12 | 14 | </div> |
| 13 | - <div class="both"></div> | |
| 14 | 15 | </div> |
| 15 | -</div> | |
| 16 | -<?php $js = '$(".owl-carousel").owlCarousel()'; | |
| 17 | -$this->registerJs($js, View::POS_READY); | |
| 18 | -?> | |
| 19 | -<?php endif?> | |
| 16 | + <?php $js = '$(".owl-carousel").owlCarousel({ | |
| 17 | +navigation:true, | |
| 18 | +navigationText: [] | |
| 19 | +}) | |
| 20 | + | |
| 21 | +'; | |
| 22 | + $this->registerJs($js, View::POS_READY); | |
| 23 | + ?> | |
| 24 | +<?php endif?> | |
| 20 | 25 | \ No newline at end of file | ... | ... |
frontend/views/catalog/product_item.php
| ... | ... | @@ -12,13 +12,13 @@ use yii\helpers\Url; |
| 12 | 12 | <?php if(!empty($product->is_top) || !empty($product->is_new) || !empty($product->akciya)) :?> |
| 13 | 13 | <ul class="product-special"> |
| 14 | 14 | <?php if(!empty($product->is_top)) :?> |
| 15 | - <li class="top">top</li> | |
| 15 | + <li class="top"><div>top</div></li> | |
| 16 | 16 | <?php endif?> |
| 17 | 17 | <?php if(!empty($product->is_new)) :?> |
| 18 | - <li class="new">new</li> | |
| 18 | + <li class="new"><div>new</div></li> | |
| 19 | 19 | <?php endif?> |
| 20 | 20 | <?php if(!empty($product->akciya)) :?> |
| 21 | - <li class="promo">promo</li> | |
| 21 | + <li class="promo"><div>promo</div></li> | |
| 22 | 22 | <?php endif?> |
| 23 | 23 | </ul> |
| 24 | 24 | <?php endif?> | ... | ... |
frontend/web/css/style.css
| ... | ... | @@ -109,8 +109,8 @@ a.myorders{color:#f75d50} |
| 109 | 109 | } |
| 110 | 110 | .products ul{list-style:none;margin:0;padding:0;} |
| 111 | 111 | .products ul li.item{float:left;width:192px;margin:0 0 50px 0;text-align:center;position:relative;} |
| 112 | -.products ul li a.name{display:block;color:#799920;font-size: 15px;text-decoration:none;margin:15px 0 0 0;height:35px;overflow: hidden; box-sizing: border-box;padding: 0 10px;} | |
| 113 | -.products ul li a.name:hover {text-decoration: underline} | |
| 112 | +.products ul li a.name, .special-products a.name {display:block;color:#799920;font-size: 15px;text-decoration:none;margin:15px 0 0 0;height:35px;overflow: hidden; box-sizing: border-box;padding: 0 10px;} | |
| 113 | +.products ul li a.name:hover, .special-products a.name:hover {text-decoration: underline} | |
| 114 | 114 | .products ul li .info{text-align: left;} |
| 115 | 115 | .pn{border:none;} |
| 116 | 116 | |
| ... | ... | @@ -1048,6 +1048,7 @@ a.active{font-weight:bold;text-decoration: underline;} |
| 1048 | 1048 | } |
| 1049 | 1049 | .special-products .item { |
| 1050 | 1050 | margin-bottom: 0 !important; |
| 1051 | + text-align: center; | |
| 1051 | 1052 | } |
| 1052 | 1053 | .why_me_ {padding-top: 30px; overflow: hidden; margin-bottom: 60px;} |
| 1053 | 1054 | .why_me_ .why_list {width: 1038px; margin-left: -58px} |
| ... | ... | @@ -1108,6 +1109,10 @@ ul.product-special { |
| 1108 | 1109 | left: 16px; |
| 1109 | 1110 | } |
| 1110 | 1111 | ul.product-special li { |
| 1112 | + width: 100%; | |
| 1113 | + float: left; | |
| 1114 | +} | |
| 1115 | +ul.product-special li div { | |
| 1111 | 1116 | color: #333; |
| 1112 | 1117 | font-size: 10px; |
| 1113 | 1118 | text-transform: uppercase; |
| ... | ... | @@ -1119,12 +1124,13 @@ ul.product-special li { |
| 1119 | 1124 | border-top-left-radius: 4px; |
| 1120 | 1125 | border-bottom-left-radius: 4px; |
| 1121 | 1126 | margin-top: 8px; |
| 1127 | + float: left; | |
| 1122 | 1128 | } |
| 1123 | 1129 | ul.product-special li:first-child {margin-top: 0} |
| 1124 | -ul.product-special li.top { | |
| 1130 | +ul.product-special li.top div { | |
| 1125 | 1131 | background: #fbc665; |
| 1126 | 1132 | } |
| 1127 | -ul.product-special li.top:after { | |
| 1133 | +ul.product-special li.top div:after { | |
| 1128 | 1134 | content: ''; |
| 1129 | 1135 | position: absolute; |
| 1130 | 1136 | right: -19px; |
| ... | ... | @@ -1133,27 +1139,27 @@ ul.product-special li.top:after { |
| 1133 | 1139 | border-top: 5px solid #fbc665; |
| 1134 | 1140 | transform: rotate(-90deg); |
| 1135 | 1141 | } |
| 1136 | -ul.product-special li.new { | |
| 1142 | +ul.product-special li.new div{ | |
| 1137 | 1143 | background: #42b9f6; |
| 1138 | 1144 | } |
| 1139 | 1145 | |
| 1140 | -ul.product-special li.new:after { | |
| 1146 | +ul.product-special li.new div:after { | |
| 1141 | 1147 | content: ''; |
| 1142 | 1148 | position: absolute; |
| 1143 | - right: -19px; | |
| 1144 | - top: 3px; | |
| 1149 | + right: -18px; | |
| 1150 | + top: 2px; | |
| 1145 | 1151 | border: 11px solid transparent; |
| 1146 | 1152 | border-top: 5px solid #42b9f6; |
| 1147 | 1153 | transform: rotate(-90deg); |
| 1148 | 1154 | } |
| 1149 | -ul.product-special li.promo { | |
| 1155 | +ul.product-special li.promo div { | |
| 1150 | 1156 | background: #f75d50; |
| 1151 | 1157 | } |
| 1152 | -ul.product-special li.promo:after { | |
| 1158 | +ul.product-special li.promo div:after { | |
| 1153 | 1159 | content: ''; |
| 1154 | 1160 | position: absolute; |
| 1155 | - right: -19px; | |
| 1156 | - top: 3px; | |
| 1161 | + right: -18px; | |
| 1162 | + top: 2px; | |
| 1157 | 1163 | border: 11px solid transparent; |
| 1158 | 1164 | border-top: 5px solid #f75d50; |
| 1159 | 1165 | transform: rotate(-90deg); | ... | ... |
1.18 KB