Commit b6562fd1ce1279d47c7f7e63eeaf86d01ca62dd2
1 parent
d71db4e8
price fix (1-%)
Showing
2 changed files
with
3 additions
and
3 deletions
Show diff stats
src/app/frontend/controllers/PageController.php
@@ -1429,7 +1429,7 @@ | @@ -1429,7 +1429,7 @@ | ||
1429 | $i['cover'] = !empty( $i['group_cover'] ) ? $this->storage->getPhotoUrl( $i['group_cover'], 'avatar', '200x' ) : '/images/packet.jpg'; | 1429 | $i['cover'] = !empty( $i['group_cover'] ) ? $this->storage->getPhotoUrl( $i['group_cover'], 'avatar', '200x' ) : '/images/packet.jpg'; |
1430 | $i['alias'] = $this->url->get([ 'for' => 'item', 'type' => $i['type_alias'], 'subtype' => $i['subtype_alias'], 'group_alias' => $i['group_alias'], 'item_id' => $i['id'] ]); | 1430 | $i['alias'] = $this->url->get([ 'for' => 'item', 'type' => $i['type_alias'], 'subtype' => $i['subtype_alias'], 'group_alias' => $i['group_alias'], 'item_id' => $i['id'] ]); |
1431 | $i['price'] = $i['price2']; | 1431 | $i['price'] = $i['price2']; |
1432 | - $i['price'] = $i['price']*(1-$users_group_discount/100); | 1432 | + $i['price'] = round($i['price']*(1-$users_group_discount/100), 1); |
1433 | $i['type_id'] = $i['type']; | 1433 | $i['type_id'] = $i['type']; |
1434 | $i['id'] = $i['group_id']; | 1434 | $i['id'] = $i['group_id']; |
1435 | 1435 |
src/lib/common.php
@@ -805,7 +805,7 @@ namespace | @@ -805,7 +805,7 @@ namespace | ||
805 | $g['checked'] = !empty($compare[$g['type_id']][$g['catalog']]) && in_array($g['id'], $compare[$g['type_id']][$g['catalog']]) ? 1 : 0; | 805 | $g['checked'] = !empty($compare[$g['type_id']][$g['catalog']]) && in_array($g['id'], $compare[$g['type_id']][$g['catalog']]) ? 1 : 0; |
806 | 806 | ||
807 | if (isset($users_group_id)) | 807 | if (isset($users_group_id)) |
808 | - $g['price'] = $g['price']*(1-$users_group_discount/100); | 808 | + $g['price'] = round($g['price']*(1-$users_group_discount/100), 1); |
809 | 809 | ||
810 | if( !empty( $g['options'] ) ) | 810 | if( !empty( $g['options'] ) ) |
811 | { | 811 | { |
@@ -1242,7 +1242,7 @@ namespace | @@ -1242,7 +1242,7 @@ namespace | ||
1242 | for ($i = $price_first; $i < $price_last + 1; $i++) { | 1242 | for ($i = $price_first; $i < $price_last + 1; $i++) { |
1243 | 1243 | ||
1244 | if (isset($users_group_id)) { | 1244 | if (isset($users_group_id)) { |
1245 | - $prices[] = $item['price' . $i]*(1-$users_group_discount/100); | 1245 | + $prices[] = round($item['price' . $i]*(1-$users_group_discount/100), 1); |
1246 | } else { | 1246 | } else { |
1247 | $prices[] = $item['price' . $i]; | 1247 | $prices[] = $item['price' . $i]; |
1248 | } | 1248 | } |