KonaKart Community Forum
September 07, 2010, 08:04:17 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: KonaKart v5.0.0.0 - Reward Points, Recurring Billing, PDF Invoices etc - Released 15 Jun 2010
 
   Home   KONAKART WEBSITE Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Transfering a filled shopping cart form a temp user to a registered user  (Read 101 times)
michaelwechner
Full Member
***
Posts: 85


View Profile
« on: July 23, 2010, 09:14:19 AM »

Hi

Before a user is registered or signed-in I use

getTempCustomerId()

in order to attach a shooping cart, e.g.

Session ID: be9a3bceb5837622d4d6cc44a079ae3c (based on a temporary user created within forceRegisterCustomer)
Customer ID: -107

but at some point the customer will register or sign-in:

String konakartSessionID = kkEngine.login(username, password);

but here it is not clear to me how to transfer the filled shopping cart to the signed-in user, because
first the above method does not seem to have any connection to the previous session, but rather creates a new session (btw. in my case the login() method returns an empty string) and second I have used the negative customer ID to add items to the shopping cart.

Any pointers are much appreciated.

Thanks

Michael
Logged
michaelwechner
Full Member
***
Posts: 85


View Profile
« Reply #1 on: July 23, 2010, 10:01:17 AM »

thinking some more about it I currently see two possibilities:

- Either keep the negative customer ID as a reference to the shopping cart
- Or copy/paste the shopping (items and quantities) from the negative customer Id to the new session ID

Cheers

Michael
Logged
trevor
Administrator
Hero Member
*****
Posts: 368



View Profile WWW
« Reply #2 on: July 26, 2010, 04:01:39 PM »

You should use the mergeBaskets() API call.
Logged

KonaKart - the free Java Shopping Cart - http://www.konakart.com
michaelwechner
Full Member
***
Posts: 85


View Profile
« Reply #3 on: July 27, 2010, 07:59:34 AM »

Thanks very much for poniting this out, whereas IIUC this will make the shopping items persistent (independent of the session), but which in our case is not wanted.

Thanks

Michael
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.10 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!