Commit e10d1d4820b3f202af220f2c4636b832c82c3c66
1 parent
f5eefe19
-collection
Showing
2 changed files
with
39 additions
and
11 deletions
Show diff stats
common/modules/product/widgets/views/product_smart_similar.php
... | ... | @@ -10,19 +10,39 @@ |
10 | 10 | |
11 | 11 | <div class="catalog_item"> |
12 | 12 | <div class="wrapper"> |
13 | - <div class="status_block-wr <?=$class?>"> | |
14 | - <?php | |
15 | - if($class == 'top'){ | |
16 | - print '<div class="staus_hit"></div>'; | |
17 | - } else if($class == 'new') { | |
18 | - print '<div class="staus_new"></div>'; | |
19 | - } else if($class == 'promo'){ | |
20 | - print '<div class="status_sale">Акция</div>'; | |
21 | - } | |
22 | - ?> | |
13 | + <div class="events"> | |
14 | + <?php $top = 90; foreach($product->events as $event):?> | |
15 | + <?php if(!empty($event->banner) && $event->isActive()): | |
16 | + if(!empty($event->percent)){ | |
17 | + $url = Url::to(['event/sale','percent'=>$event->percent]); | |
18 | + } else if(!empty($event->alias)){ | |
19 | + $url = Url::to(['event/show','alias'=>$event->alias]); | |
20 | + } else { | |
21 | + continue; | |
22 | + } | |
23 | 23 | |
24 | + ?> | |
25 | + <?= Html::a(\common\components\artboximage\ArtboxImageHelper::getImage($event->getImageUrl('banner'), 'banner_list'),$url,[ | |
26 | + 'style' =>"top:-{$top}px;" | |
27 | + ]); | |
24 | 28 | |
25 | - </div> | |
29 | + $top = $top - 30; ?> | |
30 | + <?php endif; ?> | |
31 | + <?php endforeach; ?> | |
32 | + </div> | |
33 | +<!-- <div class="status_block-wr --><?//=$class?><!--">--> | |
34 | +<!-- --><?php | |
35 | +// if($class == 'top'){ | |
36 | +// print '<div class="staus_hit"></div>'; | |
37 | +// } else if($class == 'new') { | |
38 | +// print '<div class="staus_new"></div>'; | |
39 | +// } else if($class == 'promo'){ | |
40 | +// print '<div class="status_sale">Акция</div>'; | |
41 | +// } | |
42 | +// ?> | |
43 | +<!----> | |
44 | +<!----> | |
45 | +<!-- </div>--> | |
26 | 46 | <div class="item_container"> |
27 | 47 | <div class="img"> |
28 | 48 | <a href="<?=Url::to([ | ... | ... |
frontend/web/css/css_header.css
... | ... | @@ -27134,6 +27134,14 @@ ul.product-special li.promo div { |
27134 | 27134 | background-position: -5px 0!important; |
27135 | 27135 | margin-left: -2px!important; |
27136 | 27136 | } |
27137 | + | |
27138 | +.new_collection .events { | |
27139 | + position: absolute; | |
27140 | + z-index: 99; | |
27141 | + background: #fff; | |
27142 | + top: 0; | |
27143 | + left: 0; | |
27144 | +} | |
27137 | 27145 | @media(max-width: 1200px){ |
27138 | 27146 | .collection .catalog_product_list.view_table.new_collection .catalog_item { |
27139 | 27147 | width: 50%; | ... | ... |