Choosing vendor users

  • Posts: 252
  • Thank you received: 1
8 years 3 weeks ago #253691

-- HikaShop version -- : 2.6.4
-- HikaMarket version -- : 1.7.2
-- Joomla version -- : 3.6
-- PHP version -- : 5.5.12

Hi,
When I choose administrator or users for a vendor, I found the bigger ID users just don't shows in the drop down list, so I can not choose the right person for it. Can I set only user in vendor usergroup shows in the list ?


Thanks

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
8 years 3 weeks ago #253699

Hi,

The user selection is using the "namebox" system.
That system allow to perform search (on various fields, like "username" or "email") and it also have a dynamic loading (where you are at the bottom of the list, the rest is retrieved using an ajax call).

In the backend view "vendormarket / form" you will find the code which use the namebox type to display the selection of a user.
It is possible to add options in order to change some elements (like the sort) but there is no group filter available for the moment.
To implement new options it requires to modify the HikaMarket user class (which is core file).
Displaying only the users in a specific group is possible, it needs to add a filter in the function "getNameboxData".

		$sqlJoins = array();
		$sqlFilters = array('juser.block = 0');
		if(!empty($options['filters'])) {
			foreach($options['filters'] as $filter) {
			}
		}
With the variable sqlJoins you can add tables in the SQL query (to include the joomla user groups) and with the variable sqlFilters you can add the filter to only get the user in one specific group.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: twscott

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

Moderators: Obsidev
Time to create page: 0.058 seconds
Powered by Kunena Forum