anonymous checkout disabled but profile shows anonymous
anonymous checkout disabled but profile shows anonymous
Hi,
We do not allow anonymous checkout. AllowAnonymousCheckout parameter for the OnepageCheckout control is not modified, it should be the default. Normally everything works fine however we had a few strange orders lately. Although the order summary Bill to section contains the customer information, the order's customer profile shows anonymous, as if the account did not get created properly. User cannot login to see his order and download his product. Admin/Users panel also does not find the user either.
We have our own license server which connects to the shop through the serial provider interface. These same orders did not get serial information, and it turned out that our license server was down. Nevertheless user info is not something the serial key provider interface handles.
Would anybody know what could create the problem?
Could somebody tell us how to fix username and password in the database so that the customer could login for that order?
Thanks in advance,
Tony
http://www.blackice.com
http://shop.faxproducts.com
http://shop.blackice.com
We do not allow anonymous checkout. AllowAnonymousCheckout parameter for the OnepageCheckout control is not modified, it should be the default. Normally everything works fine however we had a few strange orders lately. Although the order summary Bill to section contains the customer information, the order's customer profile shows anonymous, as if the account did not get created properly. User cannot login to see his order and download his product. Admin/Users panel also does not find the user either.
We have our own license server which connects to the shop through the serial provider interface. These same orders did not get serial information, and it turned out that our license server was down. Nevertheless user info is not something the serial key provider interface handles.
Would anybody know what could create the problem?
Could somebody tell us how to fix username and password in the database so that the customer could login for that order?
Thanks in advance,
Tony
http://www.blackice.com
http://shop.faxproducts.com
http://shop.blackice.com
Re: anonymous checkout disabled but profile shows anonymous
You can simply load the order and if customer's Email address is available through his/her address update user name with Email address and then trigger password reset request for this account. If Email address used for checkout was valid then customer will receive password reset link and will be able to access his/her account with new credentials.Could somebody tell us how to fix username and password in the database so that the customer could login for that order?
Re: anonymous checkout disabled but profile shows anonymous
Thanks Mazhar for your quick reply. I have loaded the order. Email address is available but only in the bill to section. Customer profile shows anonymous and shows no email info. Could you explain again, I am not sure whether I understand what do you mean. Or do you mean to load the order in the database and not the admin area?
Thanks
Tony
Thanks
Tony
Re: anonymous checkout disabled but profile shows anonymous
Well I mean to write some custom script to do this job. For example some page on admin side with UI having a textbox and a button. When some enters order number in textbox and hits enter you need to load crossponding order via code the access bill to email address and update user's user name with it and finally trigger password reset request. For example script could be something like
Code: Select all
int orderId = OrderDataSource.LookupOrderId(AlwaysConvert.ToInt(OrderNumberTextBox.Text));
Order order = OrderDataSource.Load(orderId, false);
User user = order.User;
string emailAddress = string.Empty;
emailAddress = user.Email;
if (String.IsNullOrEmpty(emailAddress))
emailAddress = order.BillToEmail;
if (String.IsNullOrEmpty(emailAddress))
return;
user.UserName = emailAddress;
user.Email = emailAddress;
user.IsAnonymous = false;
user.Save();
user.GeneratePasswordRequest();
Re: anonymous checkout disabled but profile shows anonymous
Thanks for the code. We started to implement but got the following error:
Server Error in '/' Application.
--------------------------------------------------------------------------------
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0118: 'System.Web.UI.Page.User' is a 'property' but is used like a 'type'
Source Error:
Line 489: int orderId = 603;
Line 490: Order order = OrderDataSource.Load(orderId, false);
Line 491: User user = order.User;
Line 492: string emailAddress = string.Empty;
Line 493:
Could you please advise?
thanks, Tony
Server Error in '/' Application.
--------------------------------------------------------------------------------
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0118: 'System.Web.UI.Page.User' is a 'property' but is used like a 'type'
Source Error:
Line 489: int orderId = 603;
Line 490: Order order = OrderDataSource.Load(orderId, false);
Line 491: User user = order.User;
Line 492: string emailAddress = string.Empty;
Line 493:
Could you please advise?
thanks, Tony
Re: anonymous checkout disabled but profile shows anonymous
Seems like we need to make use of classes with their complete names including namespaces. Use this code instead
Code: Select all
int orderId = CommerceBuilder.Orders.OrderDataSource.LookupOrderId(AlwaysConvert.ToInt(OrderNumberTextBox.Text));
CommerceBuilder.Orders.Order order = CommerceBuilder.Orders.OrderDataSource.Load(orderId, false);
CommerceBuilder.Users.User user = order.User;
string emailAddress = string.Empty;
emailAddress = user.Email;
if (String.IsNullOrEmpty(emailAddress))
emailAddress = order.BillToEmail;
if (String.IsNullOrEmpty(emailAddress))
return;
user.UserName = emailAddress;
user.Email = emailAddress;
user.IsAnonymous = false;
user.Save();
user.GeneratePasswordRequest();
Re: anonymous checkout disabled but profile shows anonymous
now the code does take the bill to email and put it to the user email in our test server, however before we put it out live, I have a question because we could reproduce this issue on our test server:
currently the "bad" order thinks it is related to anonymous (group or user, I don't know). Each anonymous user has its own unique identifier? so if we take the billto email and put it to the user field, will it rewrite the email address of all anonymous users or only that one?
thanks again
currently the "bad" order thinks it is related to anonymous (group or user, I don't know). Each anonymous user has its own unique identifier? so if we take the billto email and put it to the user field, will it rewrite the email address of all anonymous users or only that one?
thanks again
Re: anonymous checkout disabled but profile shows anonymous
It will effect only single user belonging to problematic order.
Re: anonymous checkout disabled but profile shows anonymous
Finally we could reproduce the issue in our test environment. Code works properly, although the user is created as disabled. Can we do something that the user is enabled when the scripts has run?
We won't use the password request, we will send them pwds in these special cases.
Thanks again for your help.
Tony
We won't use the password request, we will send them pwds in these special cases.
Thanks again for your help.
Tony
Re: anonymous checkout disabled but profile shows anonymous
In the script locate following line
and then update it as below
Code: Select all
user.IsAnonymous = false;
Code: Select all
user.IsAnonymous = false;
user.IsApproved = true;
Re: anonymous checkout disabled but profile shows anonymous
Easy enough, thanks