Commit baf1d1d13fe13a85e59daca96e84a0b195eba2c7
1 parent
6f51c675
common
Showing
1 changed file
with
11 additions
and
5 deletions
Show diff stats
src/lib/common.php
| ... | ... | @@ -1222,13 +1222,19 @@ namespace |
| 1222 | 1222 | } |
| 1223 | 1223 | |
| 1224 | 1224 | public function getPricesArray($item) { |
| 1225 | - $prices = []; | |
| 1226 | - $price_first = 2; | |
| 1227 | - $price_last = 6; | |
| 1228 | - | |
| 1225 | + $prices = []; | |
| 1226 | + $price_first = 2; | |
| 1227 | + $price_last = 6; | |
| 1228 | + $users_group_id = $this->getDi()->get('session')->get('users_group_id'); | |
| 1229 | 1229 | |
| 1230 | 1230 | for ($i = $price_first; $i < $price_last + 1; $i++) { |
| 1231 | - $prices[] = $item['price' . $i]; | |
| 1231 | + | |
| 1232 | + //5% for vip users | |
| 1233 | + if (isset($users_group_id) && $users_group_id == 38) { | |
| 1234 | + $prices[] = $item['price' . $i]*0.95; | |
| 1235 | + } else { | |
| 1236 | + $prices[] = $item['price' . $i]; | |
| 1237 | + } | |
| 1232 | 1238 | } |
| 1233 | 1239 | return $prices; |
| 1234 | 1240 | } | ... | ... |