coupons effect are recalculated after each product's cart modification. Fix #237

This commit is contained in:
Manuel Raynaud
2014-03-03 17:40:54 +01:00
parent c30abacfbc
commit 06539ad9bf
7 changed files with 32 additions and 8 deletions

View File

@@ -71,7 +71,7 @@ class Cart extends BaseCart
;
}
public function getTaxedAmount(Country $country)
public function getTaxedAmount(Country $country, $discount = true)
{
$total = 0;
@@ -79,7 +79,9 @@ class Cart extends BaseCart
$total += $cartItem->getRealTaxedPrice($country) * $cartItem->getQuantity();
}
$total -= $this->getDiscount();
if ($discount) {
$total -= $this->getDiscount();
}
return $total;
}