I have a problem in Merchello. When there is a switch of members on the same machine - the first member logs out and another logs in - the second one gets the same basket as the first one. And also the CurrentCustomer is still the first one.
I understood that Merchello is supposed to notice when a member logs in to Umbraco and in my login I use the standard Members.Login(email, password) method:
if (Members.Login(model.Email, model.Password))
{
var ticket = new FormsAuthenticationTicket(model.Email, model.RememberMe, timeout);
string encrypted = FormsAuthentication.Encrypt(ticket);
HttpCookie cookie = new HttpCookie(FormsAuthentication.FormsCookieName, encrypted)
{
Expires = DateTime.Now.AddMinutes(timeout),
HttpOnly = true // cookie not available in javascript
};
Response.Cookies.Add(cookie);
return RedirectToUmbracoPage(storeRoot.Id);
}
Merchello - Basket shared among users
Hi,
I have a problem in Merchello. When there is a switch of members on the same machine - the first member logs out and another logs in - the second one gets the same basket as the first one. And also the CurrentCustomer is still the first one.
I understood that Merchello is supposed to notice when a member logs in to Umbraco and in my login I use the standard Members.Login(email, password) method:
Am I forgetting something?
Thinking it had to be something concerning the CustomerContext I tried to put a Reinitialize right after the login:
And now it works: the basket gets updated to the one the user had left last time. I only wonder if this is the way it is supposed to be?
is working on a reply...