Hi,

By default, when an administrator creates an order he/she can only find an existing customer by first/last name or by email. Is there a way (through a setting or module) to also search by username? I've been searching high and low for this, to no avail. I hope the answer was not in front of my nose!

If I have to build a module to get this feature, does anyone have pointers on the hooks I'd have to implement ?

Thanks a lot.

CommentFileSizeAuthor
#4 1170792-search-by-username.patch7.46 KBtr

Comments

phen’s picture

Title: Search by username » Can't create order for existing user who is not already a customer
Category: feature » bug

I'm also looking for this-- it is IMO a bug, because if I (as admin) want to create an order for a person who is already an authenticated user, but not already a "customer", I can't.

If you try to create a new customer with an email address that matches an existing authenticated user,you get error: 'An account already exists for that e-mail.'

If you try to search by email, you don't find the person, because UC is looking through its order tables for existing "customers,"

(In UC, a customer is a person who has already ordered. As a side note, UC customers don't have to correspond nicely to actual drupal users, because a single user can create many alias customers with different names and email addresses.)

Maybe I could use masquerade to workaround...

I'm working in D7. So maybe I should clone the issue? Not sure of protocol.

tr’s picture

Title: Can't create order for existing user who is not already a customer » Search by username
Version: 6.x-2.4 » 6.x-2.x-dev
Category: bug » feature
Issue tags: -search, -Ubercart, -order, -username, -feature request, -customer

#1 is just not true, and besides that would be an entirely different issue than what this thread is about.

In D7 Ubercart, you can create an order for an existing user or for a new user from admin/store/orders/create. The existing user can be either a previous customer or an authenticated user who hasn't purchased anything yet.

Resetting the issue status back to the original. If someone would like to make a patch to implement that new feature I'd be happy to review it.

phen’s picture

TR,
Thanks for the reply.

You prompted me to dig a little deeper and I figured out that in order to create an order for an existing user who is not a customer, you have to select the "no customer account required" radio and find the user later. Trying to search for such a user with the search form doesn't work.

In my mind this is a little obscure; it would be more intuitive if the search could return a registered user.

But you're right, it is possible to do this. Sorry for the hijack.

tr’s picture

Version: 6.x-2.x-dev » 7.x-3.x-dev
Assigned: Unassigned » tr
Status: Active » Needs review
StatusFileSize
new7.46 KB

The attached patch addresses the original feature request for Ubercart 7.x-3.x.
New features should go into 7.x-3.x first.

tr’s picture

Version: 7.x-3.x-dev » 6.x-2.x-dev
Status: Needs review » Patch (to be ported)

Committed to 7.x-3.x. Maybe this should be backported to 6.x-2.x.

tr’s picture

Status: Patch (to be ported) » Fixed

Backported patch in #4 to D6, tested and committed.

http://drupalcode.org/project/ubercart.git/commitdiff/e23f470

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.