[-] MO : if customer is logged we do not recreate it

This commit is contained in:
Gaelle ITZKOVITZ committed 2013-10-22 11:09:53 +02:00
1 parent a7f6e91ac0
commit ce8d01ad4c
1 file changed
+2
+2
View File
@@ -87,6 +87,8 @@ class LoyaltyModule extends ObjectModel
{ {
$context = Context::getContext(); $context = Context::getContext();
$context->cart = $cart; $context->cart = $cart;
// if customer is logged we do not recreate it
if(!$context->customer->isLogged(true))
$context->customer = new Customer($context->cart->id_customer); $context->customer = new Customer($context->cart->id_customer);
$context->language = new Language($context->cart->id_lang); $context->language = new Language($context->cart->id_lang);
$context->shop = new Shop($context->cart->id_shop); $context->shop = new Shop($context->cart->id_shop);