Commit 5f87ae9f465b4bbbdfd32f9a13d00e53ff97fbec
1 parent
ab5a7cfe
vip prices tests
Showing
1 changed file
with
8 additions
and
0 deletions
Show diff stats
src/app/frontend/views/page/changeWithSize.php
1 | <?php | 1 | <?php |
2 | + | ||
2 | if(isset($special_user)) { | 3 | if(isset($special_user)) { |
3 | $data['price'] = number_format(isset($item['prices'][$special_user['status']]) | 4 | $data['price'] = number_format(isset($item['prices'][$special_user['status']]) |
4 | ? $item['prices'][$special_user['status']] | 5 | ? $item['prices'][$special_user['status']] |
@@ -6,6 +7,13 @@ if(isset($special_user)) { | @@ -6,6 +7,13 @@ if(isset($special_user)) { | ||
6 | } else { | 7 | } else { |
7 | $data['price'] = $item['price2']; | 8 | $data['price'] = $item['price2']; |
8 | } | 9 | } |
10 | + | ||
11 | +//vip | ||
12 | +if (isset($users_group_id) && $users_group_id == 37) { | ||
13 | + $data['price'] = round($data['price']*0.95, 1); | ||
14 | +} | ||
15 | + | ||
16 | +//discount | ||
9 | $old_price = $data['price']; | 17 | $old_price = $data['price']; |
10 | $data['price'] = $data['price']*(1-$discount/100); | 18 | $data['price'] = $data['price']*(1-$discount/100); |
11 | $data['price'] = number_format($data['price'], 2, '.', ' '); | 19 | $data['price'] = number_format($data['price'], 2, '.', ' '); |