Merge pull request #866 from studiokiwik/sk-ps15x-007

[-] MO : Loyalty if customer is logged do not recreate it
This commit is contained in:
Gregory Roussac
2013-10-22 10:15:55 -07:00
+3 -1
View File
@@ -88,7 +88,9 @@ class LoyaltyModule extends ObjectModel
$currentContext = Context::getContext();
$context = clone $currentContext;
$context->cart = $cart;
$context->customer = new Customer($context->cart->id_customer);
// if customer is logged we do not recreate it
if(!$context->customer->isLogged(true))
$context->customer = new Customer($context->cart->id_customer);
$context->language = new Language($context->cart->id_lang);
$context->shop = new Shop($context->cart->id_shop);
$context->currency = new Currency($context->cart->id_currency, null, $context->shop->id);