It's great that uCommerce creates new members automatically for new orders but it uses their email as their username. I know it seems like a cool thing to do but it has its complications if a member wants to change their email address or if you want to add a forum like YAT to the site which displays the username with every post (some people don't want their email on display).
Can you point me in the right direction of how to customise this functionality so a username could be specified?
You can definitely override the behavior with something different. Last week I showed how to send the password to the member created during checkout. You can work off the same information and override the user name for the created member.
From a order you can find its customer, which a link to a member profile (UmbracoMemberId on the Customer). With that you can load up the customer and set the user name. You probably need a user name entered by the customer so make sure that you set that as an order property before the customer checks out.
For XSLT use CommerceLibrary:SetOrderProperty("username", "joe developer") or purchaseOrder["username"] = "Joe Developer" in .NET.
New members added with email as username
It's great that uCommerce creates new members automatically for new orders but it uses their email as their username.
I know it seems like a cool thing to do but it has its complications if a member wants to change their email address or if you want to add a forum like YAT to the site which displays the username with every post (some people don't want their email on display).
Can you point me in the right direction of how to customise this functionality so a username could be specified?
Regards,
Matt
Hi Matt,
You can definitely override the behavior with something different. Last week I showed how to send the password to the member created during checkout. You can work off the same information and override the user name for the created member.
From a order you can find its customer, which a link to a member profile (UmbracoMemberId on the Customer). With that you can load up the customer and set the user name. You probably need a user name entered by the customer so make sure that you set that as an order property before the customer checks out.
For XSLT use CommerceLibrary:SetOrderProperty("username", "joe developer") or purchaseOrder["username"] = "Joe Developer" in .NET.
Please see this thread for info on overriding the default behavior of CreateMemberForCustomerTask.
Hope this helps.
Ah, thanks Soren. I had forgotten that thread would be relevent.
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.