Hi,
I am trying to get user address inside easy profile view.
What I want is to show user shipping address street, city, zip and use them to show location on google map....
I have read this topic
www.hikashop.com/support/forum/developme...ikashop-address.html
and used code below Provided by Nicolas 3 years ago:
// Get a db connection.
$db = JFactory::getDbO();
$db->setQuery('SELECT user_id FROM #__hikashop_user WHERE user_cms_id = ' . (int) $userId);
$hikashop_id = $db->loadResult();
$db->setQuery('SELECT * FROM #__hikashop_address WHERE address_user_id =' . (int) $hikashop_id);
$address = $db->loadObject();
//then you can do like that to get the address_street for example:
echo $address->address_street;
Issue is that I get address of wrong user. I think some connection between user id is missing but as I have never done something similar I need help here. Could it be that code has changed after 3 years?
Thanks