--- /usr/home/fch/tmp/Product.php 2009-09-30 17:36:08.000000000 +0200 +++ /usr/local/www/prestashop/classes/Product.php 2009-09-30 17:38:08.000000000 +0200 @@ -1277,8 +1277,14 @@ $price -= $reduc; // Quantity discount - if ($quantity > 1 AND ($qtyD = QuantityDiscount::getDiscountFromQuantity($id_product, $quantity))) - $price -= QuantityDiscount::getValue($price, $qtyD->id_discount_type, $qtyD->value); + if ($quantity > 1 AND ($qtyD = QuantityDiscount::getDiscountFromQuantity($id_product, $quantity))) { + $discount = QuantityDiscount::getValue($price, $qtyD->id_discount_type, $qtyD->value); + + if (!QuantityDiscount::isPercent($qtyD->id_discount_type) && $usetax) + $discount *= (1 + ($tax / 100)); + + $price -= $discount; + } // Group reduction if ($id_customer) --- /usr/home/fch/tmp/QuantityDiscount.php 2009-09-30 17:38:53.000000000 +0200 +++ /usr/local/www/prestashop/classes/QuantityDiscount.php 2009-09-30 17:38:59.000000000 +0200 @@ -49,7 +49,7 @@ public static function getValue($product_price, $id_discount_type, $value) { - if ($id_discount_type == 1) + if (self::isPercent($id_discount_type)) { $percentage = $value / 100; return $percentage * floatval($product_price); @@ -59,6 +59,11 @@ return 0; } + public static function isPercent($id_discount_type) + { + return $id_discount_type == 1; + } + public static function getQuantityDiscounts($id_product, $price) { global $cookie;