Customer not clearing after order is entered

  • Posts: 103
  • Thank you received: 7
7 years 4 months ago #274152

-- url of the page with the problem -- : www.stutteringtherapyresources.com
-- HikaShop version -- : 3.1.1
-- Joomla version -- : 3.7.3

Hello - I am having trouble with a feature that used to work just fine, and I'm hoping you can help me.

I often enter several orders on the front-end one after the other (e.g., when purchase orders come in). Entering the orders works just fine, and I have been using HikaShop successfully for some years now.

The challenge occurs when I try to enter a second order after a first successful order. The cart empties and clears appropriately, but the customer information does not clear. When I start checkout, it goes directly to the address page, rather than the page that asks for the customer's email address.

The problem with this is that I can't really start a new order because I'm stuck with the old customer rather than being able to enter new customer information. (I could just type over the other customer, but I'm still under the old customer's email address.)

The problem ONLY arises when I am entering more than one order in a row. Single orders work fine. A second order does not clear the user/customer, so I have to either purge all sessions from the site and start over or wait until the cart/user times out.

Can you please help me? I am wondering if maybe I missed some setting with the 3.x version, since it used to work just fine.

Other relevant information:
- I don't have customers register on my website. This has never caused an issue before. It's just easier for me to not have them have to set up a password, etc.

- The feature used to work just fine under Hikashop 2.x. I used it regularly without any issue.

- I am using the legacy cart and checkout system.

- I get the exact same behavior regardless of whether I have the system set to clear the cart on creation or confirmation.

I'll look forward to your thoughts.

Thanks,
Scott

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

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
7 years 4 months ago #274174

Hi,

I would first recommend testing with the "checkout legacy" turned off. It should work much better that way.
But if you want to keep using the legacy checkout, try adding the code:

$user = JFactory::getUser();
			if($user->guest)
				$this->app->setUserState( HIKASHOP_COMPONENT.'.user_id', 0);
after the line:
$cartClass = hikashop_get('class.cart');
			$cartClass->cleanCartFromSession(false);
in the file components/com_hikashop/controllers/checkout_legacy.php and that should fix the problem.

The following user(s) said Thank You: jsyaruss

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

  • Posts: 103
  • Thank you received: 7
7 years 4 months ago #274218

Thank you Nicolas. I will definitely change off of the legacy ordering system once I get time to set everything up. It looks very nice, but I know it will take me some setup to make sure it's working, and I haven't wanted to take the time just yet.

But, the fix you sent worked perfectly, so now I have the functionality I had before with it returning to the email entry customer page so i can enter a fresh customer when I do repeated orders.

Again, thank you!
Scott

The following user(s) said Thank You: nicolas

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

Time to create page: 0.051 seconds
Powered by Kunena Forum