Page 1 of 1

eliminating e-mail address requirement

Posted: Thu Nov 03, 2011 8:37 pm
by Chris Hadden
I don't want to REQUIRE my customers to enter an e-mail address at checkout. Requiring that means lost sales. How can I fix?

Thanks
Chris

Re: eliminating e-mail address requirement

Posted: Thu Nov 10, 2011 11:45 am
by mouse_8b
From Mazhar at viewtopic.php?f=42&t=14725&p=63255&hili ... out#p63255:
Go to your Administration > Website > Content and Layout page and edit Checkout Page then turn on anonymous users checkout by specifying AllowAnonymousCheckout="true" for example like

Code: Select all

[[ConLib:OnePageCheckout AllowAnonymousCheckout="true"]]

Re: eliminating e-mail address requirement

Posted: Fri Nov 11, 2011 3:46 pm
by Chris Hadden
I am sorry I was not clear on this. I have [[ConLib:OnePageCheckout AllowAnonymousCheckout="true"]] this works but if an e-mail address is already registered then you get this

squarpeg@together.net has already been registered. You must LOG IN in order to check out with this email address.

So an e-mail that has previously registered is still FORCED to sign in. I get people ordering once a year, and they don't recall their old password. So now you are requiring someone who is one click from paying to stop and change or retrieve a password. I know this happens all the time as I see a lot of "password reset" notices going through. I know when this happens to me on other sites it is frustrating. Should be able to eliminate a REQUIRED password even if they have registered before

Re: eliminating e-mail address requirement

Posted: Fri Nov 11, 2011 4:52 pm
by mouse_8b
I don't know exactly how you would want to do it, but I thought of these 4 scenarios:
  • case 1: they have an e-mail address and password
    >hooray
  • case 2: they have a registered e-mail address, no password
    >give opportunity to recover password or send through as anonymous
  • case 3: they have an unregistered e-mail address, no password
    >register them or send through as anonymous
  • case 4: they don't have an e-mail address
    >send through as anonymous
I think the key to this would be in TogglePanels() in OnePageCheckout.ascx.cs, namely:

Code: Select all

if (existingUserId > 0)
{
   trAlreadyRegistered.Visible = true;
   RegisteredUserName.Text = user.PrimaryAddress.Email;
   trAccount.Visible = false;
   trShowRates.Visible = false;
}
It seems like the tricky part would be dealing with cases 2 and 3. I don't think that accepting an e-mail address without a password would be a very good idea, since a customer could make an order under anyone's e-mail address.

If the user has a registered e-mail address, you could re-word the prompt to say something like: "squarpeg@together.net has already been registered. You can LOG IN in order to check out with this email address, or you can continue ANONYMOUSLY". If the user has an unregistered address, you could offer a link to continue anonymously in the user registration box that shows up. In either case, I would throw away any supplied e-mail address if they opted for an anonymous checkout.

As far as actually implementing all this, I would probably create a method that is called when the user opts for anonymity that resubmits the form with the e-mail address information stripped out.

Hopefully this helps. If it doesn't, I blame Friday afternoon.

Re: eliminating e-mail address requirement

Posted: Sat Nov 12, 2011 9:31 am
by jmestep
You could try using the username that Able creates for anonymous user and putting that into the email field. There is code in the CheckedOut even on the one page checkout that takes a temporary username and migrates the user to a new user name- in both cases they are fake email addresses.

Code: Select all

   //MIGRATE THE USER
                User oldUser = Token.Instance.User;
                string newUserName = oldUser.PrimaryAddress.Email;
                string newEmail = oldUser.PrimaryAddress.Email;
                string newPassword = NewUserPassword.Text;
                if (!CreateAccountPanel.Visible)
                {
                    anonCheckout = true;
                    newUserName = "zz_anonymous_" + Guid.NewGuid().ToString("N") + "@domain.xyz";
                    newPassword = Guid.NewGuid().ToString("N");
                }
                MembershipCreateStatus createStatus;
                User newUser = UserDataSource.CreateUser(newUserName, newEmail, newPassword, string.Empty, string.Empty, true, 0, out createStatus);
                //IF THE CREATE FAILS, IGNORE AND CONTINUE CREATING THE ORDER
                if (createStatus == MembershipCreateStatus.Success)
                {
                    if (anonCheckout)
                    {
                        // CHANGE THE NAME AND EMAIL TO SOMETHING MORE FRIENDLY THAN GUID
                        newUser.UserName = "zz_anonymous_" + newUser.UserId.ToString() + "@domain.xyz";
                        newUser.Save();
                    }
                    User.Migrate(oldUser, newUser, true, true);
You could hide the email address boxes, take the required validator off them and use the fake one Able creates.