Support » Plugin: Amazon Link » Localisation not working

  • Resolved Zokiu

    (@zokiu)


    The localisation feature stopped working. I cannot identify why… :/

    I tried to reinstall the plugin and the ip2nation databases. I didn’t work. What other steps can I take to identify the issue?

    Thanks for your help. ^^

    The page I need help with: [log in to see the link]

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author paulstuttard

    (@paulstuttard)

    Hi,

    If you are using any caching plugin, that might have cached the US version of the page, stopping localisation working.

    If a product is not available in the local of the user then it will show the default country version of the product.

    Double check on the settings page that localisation is enabled ‘Localise Amazon Link’ setting is checked.

    Check that all locales are enabled under the ‘Enabled Countries’ setting.

    When you install the ip2nation database do you get the message ip2nation install: Database downloaded and installed successfully. 63649 queries executed.

    Try installing the ‘spoof locale’ extras plugin and then adding ?spoof_locale=uk to the end of the site URL. e.g. https://guerric.co.uk/reading-list/?spoof_locale=uk

    Hope that helps,

    Paul

    Thanks a lot for your answers! 😀 Here are my comments. ^^

    If you are using any caching plugin, that might have cached the US version of the page, stopping localisation working.

    I checked. It doesn’t look like there’s any caching plugin on the website.

    If a product is not available in the local of the user then it will show the default country version of the product.

    These are products available globally. (Books).

    Double check on the settings page that localisation is enabled ‘Localise Amazon Link’ setting is checked.

    It is checked.

    Check that all locales are enabled under the ‘Enabled Countries’ setting.

    Do I need to check all of them or only the relevant ones?

    When you install the ip2nation database do you get the message ip2nation install: Database downloaded and installed successfully. 63649 queries executed.

    I do not get the message but it says:

    Your ip2nation database is up to date. (It was last updated on Sun, 25 Nov 2018 10:51:54, the latest version available is dated: Thu, 26 Jul 2018 19:58:54).

    Try installing the ‘spoof locale’ extras plugin and then adding ?spoof_locale=uk to the end of the site URL. e.g. https://guerric.co.uk/reading-list/?spoof_locale=uk

    Does it risk to impact SEO?

    How could I install the “spoof locale” extras plugin? I cannot find the option. :/

    Edit:

    I found! 🙂 Testing now…

    I also try to deactivate plugins but it didn’t change anything. :/ What’s strange is that I have a very similar configuration on another blog and it works

    Edit 2:

    It works using the spoofing:

    https://guerric.co.uk/reading-list/?spoof_locale=uk

    But how can I make sure that the readers get the right country Amazon link?

    • This reply was modified 11 months, 3 weeks ago by  Zokiu.
    • This reply was modified 11 months, 3 weeks ago by  Zokiu.
    • This reply was modified 11 months, 3 weeks ago by  Zokiu.

    @paulstuttard

    What would recommend so I can find where the problem is coming from?

    Plugin Author paulstuttard

    (@paulstuttard)

    Hi,

    Sorry, busy week.

    Clutching at straws, are you/the host using Cloudflare?

    Can you add a file (e.g. info.php) on your site that contains:

    info.php:

    
    <?php
    phpinfo();
    ?>
    

    Browse the new page info.php and check for:

    $_SERVER["HTTP_CF_IPCOUNTRY"]
    $_SERVER['REMOTE_ADDR']

    If the first exists it _should_ be your country, if the second exists it should be your IP address. Enter the IP address in the ‘Check IP’ prompt at this web page: http://ip2nation.com/ it should be your country.

    Don’t forget to delete the info.php file.

    Paul

    Thanks a lot, @paulstuttard.

    No worries for the delay.

    I tried.

    $_SERVER["HTTP_CF_IPCOUNTRY"] doesn’t exist.

    And $_SERVER['REMOTE_ADDR'] gives me an IP address that isn’t mine and is based in the US, which may explain why all the links point to Amazon.com.

    We don’t use Cloudflare or any CDN. This blog is on the same server as another blog where Amazon Links works.

    How come this is happening?

    Plugin Author paulstuttard

    (@paulstuttard)

    I don’t know, when you did the phpinfo print out, were there any $_SERVER items that had your correct IP address in?

    If there is then I could update the plugin to check those first.

    Paul

    Just tried to have a look. No other IP addresses are shown in the info.php file. 🙁

    Do you know what could be causing this type of issue? Happy to get some inspiration before I start digging into our infrastructure.

    What is so strange is that other blogs do work well with Amazon Link.

    Hi @paulstuttard,

    I think I solved the issue. Thanks a lot. The info.php was really useful in the end. ^^

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Localisation not working’ is closed to new replies.