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
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
You should use the mergeBaskets() API call.
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