From efc81e215417e4391389b63659bd2423018b8fcb Mon Sep 17 00:00:00 2001 From: vChabot Date: Tue, 26 Jun 2012 08:51:10 +0000 Subject: [PATCH] [-] BO : BugFix : #PSCFV-2823 : Product::priceCalculation() returns null specific_price after two calls --- classes/Product.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/classes/Product.php b/classes/Product.php index eb9f81a9b..fc49bd610 100644 --- a/classes/Product.php +++ b/classes/Product.php @@ -2407,9 +2407,6 @@ class ProductCore extends ObjectModel '-'.$quantity.'-'.(int)$id_product_attribute.'-'.($use_tax?'1':'0').'-'.$decimals.'-'.($only_reduc?'1':'0'). '-'.($use_reduc?'1':'0').'-'.$with_ecotax.'-'.$id_customer; - if (isset(self::$_prices[$cache_id])) - return self::$_prices[$cache_id]; - // reference parameter is filled before any returns $specific_price = SpecificPrice::getSpecificPrice( (int)$id_product, @@ -2423,6 +2420,9 @@ class ProductCore extends ObjectModel $id_cart ); + if (isset(self::$_prices[$cache_id])) + return self::$_prices[$cache_id]; + // fetch price & attribute price $cache_id_2 = $id_product; if (!isset(self::$_pricesLevel2[$cache_id_2]))