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: 22.214.171.124 (IE)
- US-1: 126.96.36.199 (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.
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, '188.8.131.52'); 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.