[-] BO : BugFix : #PSCFV-2823 : Product::priceCalculation() returns null specific_price after two calls
This commit is contained in:
1 parent
c1cf1969d4
commit
efc81e2154
1 file changed
+3
-3
+3
-3
@@ -2407,9 +2407,6 @@ class ProductCore extends ObjectModel
|
|||||||
'-'.$quantity.'-'.(int)$id_product_attribute.'-'.($use_tax?'1':'0').'-'.$decimals.'-'.($only_reduc?'1':'0').
|
'-'.$quantity.'-'.(int)$id_product_attribute.'-'.($use_tax?'1':'0').'-'.$decimals.'-'.($only_reduc?'1':'0').
|
||||||
'-'.($use_reduc?'1':'0').'-'.$with_ecotax.'-'.$id_customer;
|
'-'.($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
|
// reference parameter is filled before any returns
|
||||||
$specific_price = SpecificPrice::getSpecificPrice(
|
$specific_price = SpecificPrice::getSpecificPrice(
|
||||||
(int)$id_product,
|
(int)$id_product,
|
||||||
@@ -2423,6 +2420,9 @@ class ProductCore extends ObjectModel
|
|||||||
$id_cart
|
$id_cart
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (isset(self::$_prices[$cache_id]))
|
||||||
|
return self::$_prices[$cache_id];
|
||||||
|
|
||||||
// fetch price & attribute price
|
// fetch price & attribute price
|
||||||
$cache_id_2 = $id_product;
|
$cache_id_2 = $id_product;
|
||||||
if (!isset(self::$_pricesLevel2[$cache_id_2]))
|
if (!isset(self::$_pricesLevel2[$cache_id_2]))
|
||||||
|
|||||||
Reference in new issue
Block a user