Skip to main content

Card empty after registration

9 years 9 months ago #262388 by theguy
Hi Nicolas,

Once again, thank you for the quick replay.

1. I've gone through the new user process once more. Made sure the user is not in the system (under user management in Joomla and under customers in Hikashop - see attached screen shot) and still got the empty cart error. I've prepared a video so you can see the error yourself:
drive.google.com/open?id=0B6Nv482xa_RDSEFpeGJZeHg4Yzg

2. I've opened a new thread with the bug report.

As for the bugs I'm getting, I wouldn't mind contributing and informing of this bugs just not on a client's website ;)

Thank you,

Guy.

Please Log in or Create an account to join the conversation.

9 years 9 months ago #262442 by Jerome
Hi,

In the file "components/com_hikashop/controllers/checkout_legacy.php", please replace
Code:
$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
Code:
$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,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Please Log in or Create an account to join the conversation.

9 years 9 months ago #262520 by theguy
I'll give it a shot. Thank you.

Please Log in or Create an account to join the conversation.

Time to create page: 0.053 seconds
Powered by Kunena Forum