In the Doofinder module you can configure if you want to display prices with or without VAT. But if you have the Geolocation by IP feature enabled, you can experience some problems with VAT and Doofinder.
Doofinder access your data feed from these IP addresses:
- EU-1: 184.108.40.206 (IE)
- US-1: 220.127.116.11 (US)
If your GeoIP database is outdated you can detect our IPs as located in the wrong country and that can affect how the prices are read for your products. For example, if you’re in Europe and you detect that our server is in USA then PrestaShop will send us prices without VAT.
To fix this error you only have to replace the
GeoLiteCity.dat file inside
/tools/geoip ;by the most recent version. If you need details about how to do this you can read the PrestaShop documentation.
If you want to check if you’re not correctly detecting our country by IP you can try the following:
- Access to your server through a terminal and navigate to your PrestaShop directory.
- Access to the
- Open a PHP terminal and execute this code:
my_machine:geoip user$ php -a Interactive shell
php > require_once 'geoipcity.inc'; php > $gi = geoip_open(realpath('./GeoLiteCity.dat'), GEOIP_STANDARD); php > $record = geoip_record_by_addr($gi, '18.104.22.168'); php > echo $record->country_code;
The result of the
echo function will be the detected country code.
If everything is right it should match the country code in the IPs list above.