I am trying to create a customer as part of the same process where the customer enters their billing details. I look up the email and if there is already a customer with the same email I prompt the user to log in and if not there is a password field shown which will be shown to create a new account.
In my controller (which inherits from CheckoutAddressControllerBase) I am creating a new MembershipUser using the standard Umbraco MembershipHelper and the RegisterMember method. Once the user is created I also log them in using the Login method. The cart contents are persisted now which is great and the user us logged in successfully, however, the CustomerContext still shows an anonymous customer despite calling CustomerContext.Reinitialize(customer). This results in the next step of my checkout process failing because the CheckoutManager is still referencing the anonymous customer.
Reinitialize CustomerContext - Customer Remains Anonymous
I am trying to create a customer as part of the same process where the customer enters their billing details. I look up the email and if there is already a customer with the same email I prompt the user to log in and if not there is a password field shown which will be shown to create a new account.
In my controller (which inherits from
CheckoutAddressControllerBase
) I am creating a newMembershipUser
using the standard UmbracoMembershipHelper
and theRegisterMember
method. Once the user is created I also log them in using theLogin
method. The cart contents are persisted now which is great and the user us logged in successfully, however, theCustomerContext
still shows an anonymous customer despite callingCustomerContext.Reinitialize(customer)
. This results in the next step of my checkout process failing because theCheckoutManager
is still referencing the anonymous customer.Any ideas why the
CustomerContext
is not updated?Thanks, Simon
is working on a reply...