Developer forum

Forum » Ecommerce - Standard features » CreateUserFromOrder - how To

CreateUserFromOrder - how To

Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi guys,

I am trying to create a user during the checkout process.

The documentation indicates I should take a look at InformationCReateUser.html which is an old html file from Wrap.

I have managed to find a field that supposedly trigger creation of a new user: EcomUserCreateNew

But no matter what I try, I get this error:

System.NullReferenceException: Object reference not set to an instance of an object. at Dynamicweb.Ecommerce.Cart.Frontend.ValidateUser(Order order) at Dynamicweb.Ecommerce.Cart.Frontend.CreateUserFromOrder(Order order) at Dynamicweb.Ecommerce.Cart.Frontend.GetContent()

I am not able to find anything related to this error on the forum, documentation or API.

I have tried adding the following fields:

EcomUserCreateUserName
EcomUserCreatePassword
EcomUserCreateConfirmPassword
And supply valid values for them, but I had no luck.
Another question related to this is if the user will be saved on the order after it is created.
 
Just to put it in the context, I am using this functionality in a Quote Flow. I imagine it should not matter but I thought I should mention it.
Thank you,
Adrian 
 

 


Replies

 
Nicolai Pedersen
Reply

Hi Adrian

I've asked QA to see if they can reproduce.

That said, I think a better solution is to ask the user to create a profile first, supporting stuff like verifying etc. Using user profile as part of the checkout step itself is not very flexible... But of course it should work.

NP

 
Oleg Rodionov Dynamicweb Employee
Oleg Rodionov
Reply

Hi, 

I've checked the feature on my test environment based on last DW9.4.12 using the regular template (attached) and appropriate options enabled in cart paragraph settings - all right (cart-checkout, cart-quote , the both test ones use context in the cart (actually, the feature works OK when it's not applied as well)). Keep in your mind that no user should be logged in frontend to apply the feature via the template.

BR, Oleg QA

 

You must be logged in to post in the forum