// Merge -> revision 8114

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8115 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rMalie
2011-08-19 09:46:12 +00:00
parent 14a8c84bdd
commit a1843c1900
12 changed files with 50 additions and 19 deletions
+2 -2
View File
@@ -314,7 +314,7 @@ class DiscountCore extends ObjectModel
foreach ($products AS $product)
if (Product::idIsOnCategoryId($product['id_product'], $categories))
if ($this->cumulable_reduction OR (!$product['reduction_applies'] AND !$product['on_sale']))
$amount += ($this->include_tax ? $product['total_wt'] : $product['total']) * $percentage;
$amount += ($useTax? $product['total_wt'] : $product['total']) * $percentage;
return $amount;
/* Absolute value */
@@ -325,7 +325,7 @@ class DiscountCore extends ObjectModel
return 0;
$taxDiscount = Cart::getTaxesAverageUsed((int)($cart->id));
if (!$this->include_tax AND isset($taxDiscount) AND $taxDiscount != 1)
if (!$useTax AND isset($taxDiscount) AND $taxDiscount != 1)
$this->value = abs($this->value / (1 + $taxDiscount * 0.01));
// Main return