Dear Dynamicweb,
We have some suggestions to the handling of user creation in the checkout.
First is will be great if you can change the behaviour of "Context.Current.Request("EcomUserCreateNew") IsNot Nothing" to actually check for a boolean and not only if the key exists in the post.
At the same time we have some issues with the logic of: "Context.Current.Session("EcomUserCreateInfo")" as when posting multiple times to the checkout with this parameter: EcomUserCreateNew, only values from the first request is stored even though the user changes the values of either the username or the password. In my opinion it would make sense to store the values if they are in the post and not only the first time.
The section to be improved is this one:
Dim DoCreateNewUser As Boolean = Context.Current.Request("EcomUserCreateNew") IsNot Nothing OrElse Not IsNothing(Context.Current.Session("EcomUserCreateInfo")) If DoCreateNewUser AndAlso IsNothing(Context.Current.Session("EcomUserCreateInfo")) Then Context.Current.Session("EcomUserCreateInfo") = New Tuple(Of String, String, String)(Context.Current.Request("EcomUserCreateUserName"), Context.Current.Request("EcomUserCreatePassword"), Context.Current.Request("EcomUserCreateConfirmPassword")) End If
Best regards,
Anders