// FO : fix multiple instances of Cart and Address

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@12036 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
tDidierjean
2012-01-03 09:49:58 +00:00
parent b6392ef29c
commit f9281afe9f
2 changed files with 7 additions and 3 deletions
+4 -1
View File
@@ -150,7 +150,10 @@ class CartCore extends ObjectModel
parent::__construct($id, $id_lang);
if ($this->id_customer)
{
$customer = new Customer((int)$this->id_customer);
if (isset(Context::getContext()->customer) && Context::getContext()->customer->id == $this->id_customer)
$customer = Context::getContext()->customer;
else
$customer = new Customer((int)$this->id_customer);
$this->_taxCalculationMethod = Group::getPriceDisplayMethod((int)$customer->id_default_group);
if ((!$this->secure_key || $this->secure_key == '-1') && $customer->secure_key)