eliminating e-mail address requirement
Posted: Thu Nov 03, 2011 8:37 pm
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
Thanks
Chris
http://forums.ablecommerce.com/
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"]]
Code: Select all
if (existingUserId > 0)
{
trAlreadyRegistered.Visible = true;
RegisteredUserName.Text = user.PrimaryAddress.Email;
trAccount.Visible = false;
trShowRates.Visible = false;
}
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);