[-] MO : if customer is logged we do not recreate it
This commit is contained in:
@@ -87,7 +87,9 @@ class LoyaltyModule extends ObjectModel
|
|||||||
{
|
{
|
||||||
$context = Context::getContext();
|
$context = Context::getContext();
|
||||||
$context->cart = $cart;
|
$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->language = new Language($context->cart->id_lang);
|
||||||
$context->shop = new Shop($context->cart->id_shop);
|
$context->shop = new Shop($context->cart->id_shop);
|
||||||
$context->currency = new Currency($context->cart->id_currency, null, $context->shop->id);
|
$context->currency = new Currency($context->cart->id_currency, null, $context->shop->id);
|
||||||
|
|||||||
Reference in New Issue
Block a user