Hi,
In the file "components/com_hikashop/controllers/checkout_legacy.php", please replace
$cartClass = hikashop_get('class.cart');
$cartClass->get('reset_cache');
$this->initCart(true);
$this->cart_update = true;
$userClass = hikashop_get('class.user');
$user_id = $userClass->getID($user->get('id'));
if(!empty($user_id)) {
$app->setUserState(HIKASHOP_COMPONENT.'.user_id', $user_id);
}
By
$userClass = hikashop_get('class.user');
$user_id = $userClass->getID($user->get('id'));
if(!empty($user_id)) {
$app->setUserState(HIKASHOP_COMPONENT.'.user_id', $user_id);
$hk_user = hikashop_loadUser(true, true);
}
$cartClass = hikashop_get('class.cart');
$cartClass->get('reset_cache');
$this->initCart(true);
$this->cart_update = true;
It should force the cleaning of the user in the session before the reloading of the cart.
Because the function "initCart" can redirect you to the page with the message "empty cart" ; we have to be sure that HikaShop can load correctly the user cart.
We also submitted a patch recently in the plugin "system / hikashopuser" ; it could avoid issues with the reloading of the cart just after a login is performed.
Regards,