Skip to content

Commit

Permalink
Merge pull request #9 from shchs/patch-3
Browse files Browse the repository at this point in the history
Здравый смысл
  • Loading branch information
oclabs committed Aug 30, 2018
2 parents ce281c1 + 011d644 commit 7555a8c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions upload/catalog/model/extension/total/reward.php
Expand Up @@ -8,18 +8,19 @@ public function getTotal($total) {

if ($this->session->data['reward'] <= $points) {
$discount_total = 0;

$points_total = 0;

$products = $this->cart->getProducts();

foreach ($this->cart->getProducts() as $product) {
foreach ($products as $product) {
if ($product['points']) {
$points_total += $product['points'];
}
}

$points = min($points, $points_total);

foreach ($this->cart->getProducts() as $product) {
foreach ($products as $product) {
$discount = 0;

if ($product['points']) {
Expand Down

0 comments on commit 7555a8c

Please sign in to comment.