Allowing ONLY anonymous purchasing?

Posts: 6
Joined: 12/05/2007

The subject says it all.

Because of my client's work habits, I have been toying with the idea of only allowing anonymous purchasing, if that was possible. My client would not update the order status and he'd have customers calling him saying "where is my order, online it says it is still in the 'processing' stage." Ideally I'd like to remove every possible link to /user - where an end-user would simply be unable to log in to check their orders because they don't know their password and don't know the login link.

I can easily remove the new user account info and change the order-link to order-id from the customer.itpl form that gets emailed, and I can remove the new user account text fields from the customer information pane.

Is my only solution to the rest of the places (top of the customer information pane, for instance, in 'click here to login with existing account') to hack the code out of the modules themselves?

If there's any other places I'm missing or if there's a better way to do this, let me know. It feels almost wrong taking this awesome feature away from ubercart Smiling

Posts: 4368
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

The short answer is yes, you're going to have to remove some links like that manually. I would recommend using a module that uses hook_form_alter() to remove the description from that pane, though. Much better for future updates...

Also, I'd like to point out you could just check the box at on the checkout settings form for "New customer accounts will be set to active (uncheck to make the blocked)." so no one can login w/ a new account. Also, you can turn off new user account creation through the Drupal user settings.

Posts: 18
Joined: 01/28/2008
Bug Finder

I'm trying to understand what would be required to have Ubercart honor the Drupal user setting "Only site administrators can create new user accounts". It appears to me, with my somewhat limited understanding of how the Ubercart DB works, that it would be possible to do this with no major changes. The UID remains 0 until the order goes through checkout. The anonymous user is uniquely identified by email address, so adding a UID doesn't really make them more unique. Without an account the user would be unable to check on the status of their order, of course, since that is the only possible login. They would have to ask the site admin what's going on. But the site admin is also the person who controls this setting so it would seem that they are in the best position to judge the trade-offs.

As far as I can tell, UID appears as a foreign key in uc_orders, uc_order_comments, uc_order_log and uc_payment_receipts, all of which also have a key to uc_orders, so the logic of entering orders doesn't seem to depend on the UID.

We are currently implementing a site where we would like to actually honor the "Only site administrators can create new user accounts" setting. I'm thinking of generating a patch to do this, but would like some input on whether it is a vast undertaking based on a half-vast idea Smiling

Posts: 4368
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

Hmm... yes, it wouldn't be a major hack to not create new users, but I'd like to offer the intended alternative. There's nothing preventing you from keeping user accounts invisible to customers. If you change the messages and adjust the e-mail, you can still get the advantage of associating orders with a user account from the back end without ever revealing the accounts to the users. Simply set it to create the new users as blocked, don't send new account e-mails, and make sure no notifications are being sent out with login details or links.

Posts: 18
Joined: 01/28/2008
Bug Finder

What I had in mind would leave the site admin the option of allowing customers to create accounts. For a site with gadzillions of customers, that would probably be more convenient than answering email or the phone, but the client we're building now has a limited niche market and the user accounts on the site will have special significance.

I just want to make it possible to turn off account generation. Actually as of beta 4 the anonymous purchaser is shown their login (email address) and generated password, but when they try to use it they are told it is inactive or blocked (if the site admin selected that).

If you don't think this would be incompatible with the architecture, I'll probably write the code and submit it to the issue tracker as a patch, like I did with the payment watchdog.

Would this discussion fit better into the development forum? Thanks for all your hard work.

Posts: 343
Joined: 10/16/2007

Hawkeye:

Here is a site that uses anonymous purchasing. No login required. No emails sent, etc. It is basically the same as what Ryan has stated. This is built on Alpha 8E so will be a little different than the current Beta 4 version.

http://jewelry.alaskawebfactory.com/

Jim

Posts: 4368
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

Re: anonymous purchase shown their login info, you can simply change the checkout completion message to not display this. Look at /admin/store/settings/checkout/edit/messages.

Posts: 1
Joined: 02/12/2008

Thanks for the posting that link. I am in need of Anonymous File Download purchases. Do you think Ubercart can do that?

Posts: 331
Joined: 08/07/2007
Administrator

If you give anonymous users the "download file" permission upon completion of an order, assuming you have set up download notifications, the customer will be emailed a link which they can download from without being logged on to the site. However that link will only be good for one time use only. The Ubercart File Downloads module was built with the intention of having users being able to access previously purchased files @ user/*/files any time they've logged on.

--

-Shawn Conn: If the Name Don't Rhyme It Ain't Mine