Commit 0580270b86d0b2594ce7fffa1cb521f7551a6549
1 parent
446925e6
common
Showing
2 changed files
with
16 additions
and
23 deletions
Show diff stats
src/app/frontend/controllers/PageController.php
... | ... | @@ -144,8 +144,6 @@ |
144 | 144 | $discount['group_ids'] = str_replace('}', '', $discount['group_ids']); |
145 | 145 | $discount['group_ids'] = explode(',', $discount['group_ids']); |
146 | 146 | } |
147 | - //vip | |
148 | - $users_group_id = $this->session->get('users_group_id'); | |
149 | 147 | |
150 | 148 | $css = [ |
151 | 149 | '/landing_sales/style.css', |
... | ... | @@ -183,8 +181,7 @@ |
183 | 181 | 'meta_description' => $meta_description[$this->lang_id], |
184 | 182 | 'slider' => $slider, |
185 | 183 | 'active_sales' => $active_sales, |
186 | - 'discount' => $discount, | |
187 | - 'users_group_id' => $users_group_id | |
184 | + 'discount' => $discount | |
188 | 185 | ]); |
189 | 186 | } |
190 | 187 | |
... | ... | @@ -1362,8 +1359,8 @@ |
1362 | 1359 | $p['subtype_alias'] = $p['explode']['2']; |
1363 | 1360 | unset( $p['explode'] ); |
1364 | 1361 | } |
1365 | - | |
1366 | - | |
1362 | + | |
1363 | + | |
1367 | 1364 | $groups_ = $this->common->getGroups1( $this->lang_id, $groups ); |
1368 | 1365 | } |
1369 | 1366 | ... | ... |
src/app/frontend/views/partial/item_group.php
... | ... | @@ -34,23 +34,19 @@ |
34 | 34 | <div class="one_item_price"> |
35 | 35 | <?= $t->_("price_from") ?> |
36 | 36 | <?php |
37 | -// //vip | |
38 | -// if(isset($users_group_id) && $users_group_id == '37') { | |
39 | -// $i['price'] = round($i['price']*0.95, 1); | |
40 | -// } | |
41 | -// // скидка | |
42 | -// if (!empty($discount)) { | |
43 | -// if ($discount['discount'] > 0 && $discount['discount'] <= 100 && in_array($i['id'], $discount['group_ids'])) { | |
44 | -// echo '<span style="text-decoration: line-through;"><span>'.$i['price'].'</span></span> грн<br/>'; | |
45 | -// echo '<span>'.round($i['price']*(1-$discount['discount']/100), 1).'</span> грн'; | |
46 | -// } | |
47 | -// else { | |
48 | -// echo '<span>'.$i['price'].'</span> грн'; | |
49 | -// } | |
50 | -// } | |
51 | -// else { | |
52 | -// echo '<span>'.$i['price'].'</span> грн'; | |
53 | -// } | |
37 | + // скидка | |
38 | + if (!empty($discount)) { | |
39 | + if ($discount['discount'] > 0 && $discount['discount'] <= 100 && in_array($i['id'], $discount['group_ids'])) { | |
40 | + echo '<span style="text-decoration: line-through;"><span>'.$i['price'].'</span></span> грн<br/>'; | |
41 | + echo '<span>'.round($i['price']*(1-$discount['discount']/100), 1).'</span> грн'; | |
42 | + } | |
43 | + else { | |
44 | + echo '<span>'.$i['price'].'</span> грн'; | |
45 | + } | |
46 | + } | |
47 | + else { | |
48 | + echo '<span>'.$i['price'].'</span> грн'; | |
49 | + } | |
54 | 50 | ?> |
55 | 51 | <span><?= round($i['price'], 2) ?></span> грн |
56 | 52 | </div> | ... | ... |