• Resolved allanext

    (@allanext)


    Hi @oscargare,

    I’m following up on your pinned post on the geo-localization not working

    The issue is the product is still in USD when looking at a product and will change to EUROs only when the shipping address is entered; the client of course doesn’t like that as the price in EUROs is higher (because of handling etc).

    @ranarass did you ever resolved the issue?

    I’ve checked for the php error PharData and nothing (I’m using PHP 7.1.19)

    The Geo logs show this, see IP below:

    HTTP_CF_IPCOUNTRY: x
    GEOIP_COUNTRY_CODE: x
    HTTP_X_COUNTRY_CODE: x
    HTTP_X_REAL_IP: x
    HTTP_X_FORWARDED_FOR: x
    REMOTE_ADDR: 127.0.0.1
    Real external IP: 185.128.27.146
    Const WCPBC_USE_REMOTE_ADDR: –
    Geolocation Test: Checked

    also:

    WooCommerce version: 3.7.1
    WordPress version: 5.2.3
    MaxMind GeoIP database: ../site/wp-content/uploads/GeoLite2-Country.mmdb

    I’ve tried to set and reset the “default custom location” trying also with caching and without, i’ve also tried on woocommerce -> settings -> default test mode to italy (I’m now working on a local version from the US with VPN to italy to test it out, see IP above).

    I’ve added a “Prevent caching” plugin on the server side, on the browser i’ve open the developer console and checked “Disable cache”, I’ve also tried the incognito mode.

    How to debug this? can you point out where in the code I can check for this perhaps?

    • This topic was modified 5 years, 1 month ago by allanext.
    • This topic was modified 5 years, 1 month ago by allanext.
    • This topic was modified 5 years, 1 month ago by Jan Dembowski.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Oscar Gare

    (@oscargare)

    Hi,
    the REMOTE_ADDR is 127.0.0.1, this is IP is localhost. Geolocation does not work in the localhost. Are your runing test on local server?

    If the answer is “no,” you should contact your hosting provider.

    Thread Starter allanext

    (@allanext)

    Hi @oscargare,

    Thanks for your quick reply. I thought that but never tried it ??

    Now it works, just for other people having the same issue: when testing you need to open a different browser or open the incognito mode because if you are logged in, even if you are connecting from a different country, you’ll still see the default currency.

    Cheers

    • This reply was modified 5 years, 1 month ago by allanext.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Geolocation Prices in correct currency only when adding shipping address’ is closed to new replies.