From 75abdd5acb201cd26a434db9428de92a2bb754ea Mon Sep 17 00:00:00 2001 From: aNiassy Date: Thu, 21 Apr 2011 09:14:34 +0000 Subject: [PATCH] [-] FO : #PSCFI-1374 Fixed a bug concerning the cart without taxes --- classes/Cart.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/Cart.php b/classes/Cart.php index 20e054548..1d4c0b724 100644 --- a/classes/Cart.php +++ b/classes/Cart.php @@ -369,7 +369,7 @@ class CartCore extends ObjectModel { $row['price'] = Product::getPriceStatic((int)$row['id_product'], false, isset($row['id_product_attribute']) ? (int)($row['id_product_attribute']) : NULL, 2, NULL, false, true, (int)($row['cart_quantity']), false, ((int)($this->id_customer) ? (int)($this->id_customer) : NULL), (int)($this->id), ((int)($this->{Configuration::get('PS_TAX_ADDRESS_TYPE')}) ? (int)($this->{Configuration::get('PS_TAX_ADDRESS_TYPE')}) : NULL), $specificPriceOutput); // Here taxes are computed only once the quantity has been applied to the product price $row['price_wt'] = Product::getPriceStatic((int)$row['id_product'], true, isset($row['id_product_attribute']) ? (int)($row['id_product_attribute']) : NULL, 2, NULL, false, true, (int)($row['cart_quantity']), false, ((int)($this->id_customer) ? (int)($this->id_customer) : NULL), (int)($this->id), ((int)($this->{Configuration::get('PS_TAX_ADDRESS_TYPE')}) ? (int)($this->{Configuration::get('PS_TAX_ADDRESS_TYPE')}) : NULL)); - $tax_rate = Tax::getProductTaxRate((int)$id_product, (int)($this->{Configuration::get('PS_TAX_ADDRESS_TYPE')})); + $tax_rate = Tax::getProductTaxRate((int)$row['id_product'], (int)($this->{Configuration::get('PS_TAX_ADDRESS_TYPE')})); $row['total_wt'] = Tools::ps_round($row['price'] * (float)$row['cart_quantity'] * (1 + (float)($tax_rate) / 100), 2); $row['total'] = $row['price'] * (int)($row['cart_quantity']); }