-- HikaShop version -- : 3.0.0
-- Joomla version -- : 3.6.5
-- PHP version -- : 5.5.38
-- Browser(s) name and version -- : Chrome 56.0
Hello!
I'm using Hikashop registration form as default way of registration in my Joomla website. It has nice function like ability to add custom fields (especially dropdowns) to registration form.
Now, what I'd like to do, is add additional custom field (dropdown) during registration. This custom field will be called "Refer to member who invited you to join" and it should return dropdown list of already registred members from my Joomla user category called "Old members". I found the PHP code snippet that allows to return list of members in question (this returns all registred users right now):
$db =& JFactory::getDBO();
$query = "SELECT * FROM #__users" ;
$db->setQuery($query);
$rows = $db->loadObjectList();
foreach ($rows as $row) {
echo $row->id.'|'.$row->username.'|'.$row->email;
}
But question remains - how to pass this code snippet to Hikashop registration form custom field?
I would be very very thankful if somebody would help me by pointing out, which files should be modified to get expected result. Thanks in advance!