diff --git a/classes/Cart.php b/classes/Cart.php index 1afc74b67..41a7e1d24 100644 --- a/classes/Cart.php +++ b/classes/Cart.php @@ -1591,9 +1591,9 @@ class CartCore extends ObjectModel */ public function getPackageList($flush = false) { - static $cache = false; - if ($cache !== false && !$flush) - return $cache; + static $cache = array(); + if (isset($cache[(int)$this->id]) && $cache[(int)$this->id] !== false && !$flush) + return $cache[(int)$this->id]; $product_list = $this->getProducts(); // Step 1 : Get product informations (warehouse_list and carrier_list), count warehouse @@ -1821,7 +1821,7 @@ class CartCore extends ObjectModel ); } } - $cache = $final_package_list; + $cache[(int)$this->id] = $final_package_list; return $final_package_list; }