Card empty after registration

  • Posts: 228
  • Thank you received: 8
7 years 9 months ago #262388

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.

Attachments:

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
7 years 9 months ago #262442

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,


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

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 228
  • Thank you received: 8
7 years 9 months ago #262520

I'll give it a shot. Thank you.

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

Time to create page: 0.058 seconds
Powered by Kunena Forum