Admin - Place an Order - Create User Account?

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
niall08
Commander (CMDR)
Commander (CMDR)
Posts: 175
Joined: Tue Dec 09, 2008 10:29 am

Admin - Place an Order - Create User Account?

Post by niall08 » Thu Jul 02, 2009 8:21 am

We've been testing the functionality and there's (another) potential problem..

When using the administrative interface in placing a new order, if the search for an existing user account doesn't return the details and the administrator completes the form, is a new user account created?

If not, why not?

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Admin - Place an Order - Create User Account?

Post by mazhar » Thu Jul 02, 2009 9:12 am

In version 7.0.3 we do have an option to create new user when placing order via merchant side.

User avatar
Logan Rhodehamel
Developer
Developer
Posts: 4116
Joined: Wed Dec 10, 2003 5:26 pm

Re: Admin - Place an Order - Create User Account?

Post by Logan Rhodehamel » Thu Jul 02, 2009 9:16 am

In AC7.0.2 and below, when the merchant is placing an order if you do not locate an existing customer no account is created. The answer to why not is that creating an account is not required to place an order. Our workflow for placing an order in that version was not very friendly. To place an order with a new account, you must first create the account then place the order.

We put some extra effort into refining this feature for 7.0.3, incorporating feedback from customers who were using it.
Cheers,
Logan
Image.com

If I do not respond to an unsolicited private message, it's not because I'm ignoring you. It's because the answer to your question is valuable to others. Try the new topic button.

niall08
Commander (CMDR)
Commander (CMDR)
Posts: 175
Joined: Tue Dec 09, 2008 10:29 am

Re: Admin - Place an Order - Create User Account?

Post by niall08 » Thu Jul 02, 2009 9:24 am

For those of us that don't have v. 7.0.3 - is there any forseeable problem in creating a new user when the administrator checks for the customer's email address?

i.e. either a new account is created with a temporary password and the email address when the search for the customer is performed, or the account is created when the administrator refreshes the shipping options?

kastnerd
Commodore (COMO)
Commodore (COMO)
Posts: 474
Joined: Wed Oct 22, 2008 9:17 am

Re: Admin - Place an Order - Create User Account?

Post by kastnerd » Thu Jul 02, 2009 9:37 am

I have 7.0.3
At the People/user screen. If you click add user, it asks for password, Can There be a button to use a temporary password that the user must reset for security reasons?

ZLA
Commodore (COMO)
Commodore (COMO)
Posts: 496
Joined: Fri Mar 13, 2009 2:55 pm

Re: Admin - Place an Order - Create User Account?

Post by ZLA » Thu Jul 02, 2009 2:04 pm

Logan_AbleCommerce wrote:In AC7.0.2 and below, when the merchant is placing an order if you do not locate an existing customer no account is created. The answer to why not is that creating an account is not required to place an order.
How does the manual admin order create handle multiple shipping destinations, since they require an account?

User avatar
Logan Rhodehamel
Developer
Developer
Posts: 4116
Joined: Wed Dec 10, 2003 5:26 pm

Re: Admin - Place an Order - Create User Account?

Post by Logan Rhodehamel » Thu Jul 02, 2009 11:23 pm

kastnerd wrote:Can There be a button to use a temporary password that the user must reset for security reasons?
We don't have that currently. However I have registered bug 8181 to add this at some point.
Cheers,
Logan
Image.com

If I do not respond to an unsolicited private message, it's not because I'm ignoring you. It's because the answer to your question is valuable to others. Try the new topic button.

User avatar
Logan Rhodehamel
Developer
Developer
Posts: 4116
Joined: Wed Dec 10, 2003 5:26 pm

Re: Admin - Place an Order - Create User Account?

Post by Logan Rhodehamel » Thu Jul 02, 2009 11:24 pm

ZLA wrote:How does the manual admin order create handle multiple shipping destinations, since they require an account?
Merchant place order interface does not support multiple destinations.
Cheers,
Logan
Image.com

If I do not respond to an unsolicited private message, it's not because I'm ignoring you. It's because the answer to your question is valuable to others. Try the new topic button.

niall08
Commander (CMDR)
Commander (CMDR)
Posts: 175
Joined: Tue Dec 09, 2008 10:29 am

Re: Admin - Place an Order - Create User Account?

Post by niall08 » Fri Jul 03, 2009 1:24 am

I know that no account is created, as one is not required.. But if that customer contacts the company the following week and wants to order again, rather than going through the rigmarole of providing their details again, we want to create a user account in the first instance.

In short:
1. Search for the user by email address;
2. If the user doesn't exist:
- Create a new user account
- Repackage the basket and redirect the browser to the PlaceOrder2.aspx page, with the basket ID in the querystring
3. When the admin completes the address fields, this data is stored in the new users primary address fields and order address fields as required

For example:

Code: Select all

int userId = UserDataSource.GetUserIdByEmail(CustomerEmail.Text);
        if (userId > 0)
        {
            //_Basket.UserId = userId;
            User user = UserDataSource.Load(userId);
            Basket.Transfer(_Basket.UserId, userId);
            _Basket.Package();
            _Basket.Recalculate();
            Response.Redirect("PlaceOrder2.aspx?BasketId=" + user.Basket.BasketId);
        }
        else
        {
            String tempPassword = "tempPassword";
            MembershipCreateStatus status;
            User newUser = UserDataSource.CreateUser(CustomerEmail.Text, tempPassword, string.Empty, string.Empty, true, 0, out status);
            newUser.IsApproved = true;
            newUser.Save();
            newUser.PrimaryAddress.FirstName = "TempFirstName";
            newUser.PrimaryAddress.LastName = "TempLastName";
            newUser.PrimaryAddress.Save();
            User user = UserDataSource.Load(newUser.UserId);
            Basket.Transfer(_Basket.UserId, newUser.UserId);
            _Basket.Package();
            _Basket.Recalculate();
            Response.Redirect("PlaceOrder2.aspx?BasketId=" + user.Basket.BasketId);
        }
Are there any obvious problems with this logic?

User avatar
Logan Rhodehamel
Developer
Developer
Posts: 4116
Joined: Wed Dec 10, 2003 5:26 pm

Re: Admin - Place an Order - Create User Account?

Post by Logan Rhodehamel » Fri Jul 03, 2009 10:02 am

niall08 wrote:Are there any obvious problems with this logic?
The suggestion seems OK to me. I haven't tried the custom code, but the concept seems to fit what you want to do.
Cheers,
Logan
Image.com

If I do not respond to an unsolicited private message, it's not because I'm ignoring you. It's because the answer to your question is valuable to others. Try the new topic button.

Post Reply