Skip to content

Commit

Permalink
🤷
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamin-hubert authored Apr 13, 2018
1 parent 718832f commit 4fe0b40
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions Helper/Cart/CartManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,17 +182,19 @@ public function getTotal(
);
}

if ($withCartDiscount) {
$discount = $this->getCartDiscount();
$total -= $this->priceHelper->getDiscountAmount($total, $discount);
}

if ($withShipment && null !== $shipment = $cart->getShipment()) {
$total += $shipment->getPrice();
}

$total = round($total, 2);

if ($withCartDiscount) {
$discount = $this->getCartDiscount();
$total -= round($this->priceHelper->getDiscountAmount($total, $discount), 2);
}

if (!empty($withTaxes)) {
$total += ($total * $withTaxes / 100);
$total += round(($total * $withTaxes / 100), 2);
}

return $total;
Expand Down

0 comments on commit 4fe0b40

Please sign in to comment.