From f0d03142f31cd51c7fe904386fdefb3414c08c1a 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 git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16131 b9a71923-0436-4b27-9f14-aed3839534dd --- 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]))