To do this first go to Preferences>>Geolocation
and enable it also download .dat file
after this add this code in controllers >> front >> ProductController.php
before line 238
include_once(_PS_GEOIP_DIR_.'geoipcity.inc');
$gi = geoip_open(realpath(_PS_GEOIP_DIR_.'GeoLiteCity.dat'), GEOIP_STANDARD);
$record = geoip_record_by_addr($gi, Tools::getRemoteAddr());
add this code in smarty assign around line 260
'country_name' => $record->country_name //change country_name to code etc
Use $country_name
in product.tpl where ever you want :)
tested in ps-1.5.6