Hi,
I looked at the plugin code and to get the user ip we call this function:
function hikashop_getIP(){
$ip = '';
if( !empty($_SERVER['HTTP_X_FORWARDED_FOR']) && strlen($_SERVER['HTTP_X_FORWARDED_FOR']) > 6){
$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
}elseif( !empty($_SERVER['HTTP_CLIENT_IP']) && strlen($_SERVER['HTTP_CLIENT_IP']) > 6){
$ip = $_SERVER['HTTP_CLIENT_IP'];
}elseif(!empty($_SERVER['REMOTE_ADDR']) && strlen($_SERVER['REMOTE_ADDR']) > 6){
$ip = $_SERVER['REMOTE_ADDR'];
}
//We add a strip tags here as the ip could definitely be modified by something...
return strip_tags($ip);
}
So this is the common way to get the user IP thanks to PHP.
Then based on that ip, we get the zone of the user.
So if the returned IP is not correct, we take the shop zone (main zone).
You could potentially try to replace the content of the function hikashop_getIP() in "administrator/components/com_hikashop/helpers/helper.php" by another script to get the user ip, but I really think that this is the best way of doing that.
What can be tried to, is to add this code on another HikaShop view in order to see if at this place the returned ip is correct or not.
If it is correct, so the IP is edited at another place...
Please keep us informed of the results of your tests.