Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


These support forums are now closed for new topics and comments.
Please head on over to http://eureka.ucommerce.net/ for support.

  • Matt Taylor 873 posts 2086 karma points
    Jun 08, 2011 @ 15:10
    Matt Taylor
    0

    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

  • Søren Spelling Lund 1797 posts 2786 karma points
    Jun 08, 2011 @ 15:19
    Søren Spelling Lund
    0

    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.

  • Matt Taylor 873 posts 2086 karma points
    Jun 09, 2011 @ 10:27
    Matt Taylor
    0

    Ah, thanks Soren. I had forgotten that thread would be relevent.

Please Sign in or register to post replies

Write your reply to:

Draft