Choose client for further orders from the administ

  • Posts: 267
  • Thank you received: 5
11 years 11 months ago #77922

Hello,

In my case I have about 20,000 users in hikashop.
When I need from the administration, add a new order to a customer, I'm going to orders / new, to choose the existing client, I going to client; This shows a new form with a drop-down, in my case it is useful to many customers .
You could turn that down in a search engine from the customer to choose from.
Another question is instead of looking for the id of the customer, making the search for the username.

thank you very much

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
11 years 11 months ago #77932

Hi,

It's already on our TODO list. It will be available in the new component HikaMarket as soon as it will be available.

You can change the id to username by editing the file "administrator/components/com_hikashop/types/user.php".

The following user(s) said Thank You: dvddvd

Please Log in or Create an account to join the conversation.

  • Posts: 267
  • Thank you received: 5
11 years 11 months ago #77970

thank you very much

Please Log in or Create an account to join the conversation.

  • Posts: 267
  • Thank you received: 5
11 years 7 months ago #94737

I'm trying to modify the file "administrator / components / com_hikashop / types / user.php" so that anybody do searches within "username" in the table "users" of joomla, I can not get it.
I made ​​changes user.php shown in the attachment "user.txt and achieving the results shown in image.jpg

thank you very much

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
11 years 7 months ago #95019

You have to edit the query:
$query = 'SELECT user_id,user_email FROM '.hikashop_table('user');
To take the username from the joomla user table.

And the replace "$user->user_id" by "$user->username" in the line:
$this->values[] = JHTML::_('select.option', (int)$user->user_id, $user->user_email. ' ' .$user->user_id );

Please Log in or Create an account to join the conversation.

  • Posts: 267
  • Thank you received: 5
11 years 6 months ago #101525

I can't get properly QWERY from the joomla user table.

Please Log in or Create an account to join the conversation.

  • Posts: 82760
  • Thank you received: 13347
  • MODERATOR
11 years 6 months ago #101718

It should be:
$query = 'SELECT a.user_id,a.user_email,b.username FROM '.hikashop_table('user').' AS a LEFT JOIN #__users AS b ON a.user_cms_id=b.id';

The following user(s) said Thank You: dvddvd

Please Log in or Create an account to join the conversation.

  • Posts: 267
  • Thank you received: 5
11 years 6 months ago #101859

thank you very much works perfect now

Please Log in or Create an account to join the conversation.

Time to create page: 0.079 seconds
Powered by Kunena Forum