Automatic Currency, Language And Template Setup For WHMCS – Updated

The recognition of our Geolocation Hook For WHMCS has been continuously growing among the global community of WHMCS users. Having this exhilarating trend in mind, we felt extremely tempted to breathe new life into the original Blog post dated March 2013, and show the current potential lying within this simple, yet undoubtedly powerful tool.

One of the most interesting novelties as compared to the then hook’s advantages is the addition of support for Polish Language Translation For WHMCS. With it, all Polish clients will enjoy a detailed localization of your entire system into their very own mother tongue.

What we present below is the catalog of most essential maneuvers you may carry out thanks to our hook. To help you find your way through the particular features more easily, the article has been supplemented with the exact code lines and clear guidelines on how to adjust them.

  1. Configure the rules of currency, language and template changes
  2. Adjustment of the client area pages depending on your clients location has been simplified to the maximum possible level. Edit the code with the provided in the commented areas tips to achieve any configuration of currency, language and templates.

  3. Select a template depending on a mobile device or a domain used
  4. You may point a template that shall be called, following the device type used, a tablet or a mobile. In the very same way, point the domain names that your visitors are redirected from, to turn on a specific template for them. Uncomment the lines and provide required templates names.

  5. Select adjustable pages of your client area
  6. The hook offers huge flexibility when it comes to personalizing a whole or just a specific part of your client area. You are free to select the exact pages where the alterations should be performed.

  7. Disable the hook with ease
  8. There might be cases when you do not wish the hook to alter the client area. You are given a wide range of possibilities to turn off the hook for specific IP addresses, IP pools or certain user agents – all is up to you!

  9. Get the country with MaxMind GeoIP2
  10. In order to track your clients’ locations, either use the included in the package submodule, or add your own submodule.

If the article does not cover the configuration scheme you look for, it most likely can be found in our Wiki article. Apart from detailed instructions on how to upload and configure the tool, you will find there several visualizations of how the client area may be adapted with this neat, completely free of charge hook.

Get the Hook!

VN:F [1.9.22_1171]
Rating: 4.9/5 (136 votes cast)
Automatic Currency, Language And Template Setup For WHMCS - Updated, 4.9 out of 5 based on 136 ratings
Main , , , , , , ,

210 comments


  1. Good one, Thanks ModulesGarden!

  2. Great tip, and it works perfectly well.

  3. Everything looks to be fine except the case of forced currency in links (&currency=*). If the customer clicks the button which has such a link it is redirected to cart.php and not to the product or even product group. On second click it works as it should but only after clicking it twice. Testing it several times before adding this comment with 4 browsers.
    You have my email address for explicit details.

  4. Hi Experthost.ro,

    We have just fixed the problem with (&currency=*). You can download the updated hook directly from this blog article. We are waiting for your feedback.

  5. Hello Piotr
    Are you sure that the downloadable archive is updated ? I did compared previous file and last one and there is no difference between them. This time I didn’t made any modifications (default currency/language) and just uploaded it on server and obviously the problem was still there.
    I’d like to have it work at 100% as much as you do and this is the reason why I’m bothering.
    PS: I use a new and different browser after each test to get ride of session or cookie which remembers data/values. You can message me directly on Tweeter, Skype or email.

  6. Yes Gabiel, the file has been updated. Today we have verified this twice on our end (downloaded the module from the link provided in this blog article) and the problem you described was fixed, as stated before.
    Please create a ticket https://www.modulesgarden.com/openticket and we will assist you, as we expect that the problem is caused by your environment and not by the hook file itself.

  7. Daniel

    Thanks for your great work guys.
    Having a problem. The old versione of the script posted in february was working great, but the new one is simply not making any action.

    Is it possible that the problem is related to recent update to WHMCS 5.2.3?

  8. Daniel, we have verified our hook in WHMCS V5.2.3 and we didn’t find any problems. Script is working properly.

    We will be able to further assist over our ticketing system and verify your case.
    If you are still having problem with the hook please create a ticket here: https://www.modulesgarden.com/openticket

  9. mrl14

    I’ve been looking for this type of functionality for quite some time. The modules here are excellent and really extend the power of whmcs.

  10. This would really help out in my companies expansion plans

  11. Vincent

    This looks great, I just have downloaded it and will test it out!

  12. Excelent work, not only development , your tutorial is very clear, and available for all kind of users. Thanks !

  13. This is a very useful articles and tutorials.
    If it can adapt to 4.5.2 WHMCS version?

  14. Hello CEFHOST, hook should work on WHMCS V4.5.2 however we didn’t have the opportunity to test it.

  15. adersh

    Good one, Thanks ModulesGarden! Great work

  16. ish

    Excelent work modulesgarden

  17. Nicolas

    Will this affect SEO in any way?

    In case of all default conditions and in case the visitor is a search engine, i think the hook should not add the “?language=eng&systpl=tplname…”.

    • Nicolas, to be honest, we didn’t focus on making our hook as SEO friendly as most likely it should be. However we will take this into consideration. I am pretty sure that we are not yet finished with performing changes to the hook, so sooner or later an updated version will appear.

  18. TGE

    Does thi module working exactly?
    I will download and test it…

  19. Yes TGE, hook works properly. Feel free to download and use it!

  20. Hello,
    this seems to be very helpfull! How complicated would it be to also force payment gateway depending on selected language (or GeoIP country)? I’d like to block PayPal payments for visitors coming from a certain country.

  21. It won’t be that easy Vinko, because it will require direct template modification in the invoice template. Hook script would need to be called separately to assign the variables within your template. If you are interested, please contact our Development Department.

  22. Awmusic12635

    Thanks for the helpful guide, I will most certainly be using it.

  23. Davis

    I think other web site owners should take this web site as an model – very clean and excellent style and design, in addition to the content. You are an expert in this area and I will definitely try the hook in my WHMCS!

  24. That looks very interesting and very confusing, I personally have different domains. eg: .eu .co.uk .in and they redirect to my main website with the ?currency=1 and that configures my website’s prices.

    Your way is by the country which is better than my way however they can change the currency by the flags on the new layout or by the cart :) .

    Nice article, might look into it in the future.

  25. You may have a version in Spanish. Many of our clients are Spanish-speaking and it would be necessary

  26. Nice module.
    I will buy this next week.

  27. I think this is one of the most popular hook it is on the market, I’ll get it immediately and I’m sure the support I receive to make the installation will be more expert in customer service on my system management customer. Cheers ModulesGarden!

  28. Konstantin

    nice work guys..

    all this – for free – LIKE!

  29. Paris

    Great article, lot’s of great info.. thank you!

  30. Jennifer

    These modules here are great, just what I was looking for. Thank you!!

  31. I discovered your blog website on google and check a couple of of your early posts. Continue to keep up the really good operate. I just additional up your RSS feed to my MSN News Reader. Searching for forward to reading even more from you later on!

  32. Very nice blog, and also nice modules for WHMCS can really use it for production environment.

  33. I’ve recently started a business, the info you provide on this site has helped me greatly. Thank you for all of your time & work.

  34. Hello,
    Your tip is very good and a must have. Should be a default feature of WHMCS.
    I will try the hook in my WHMCS soon.

    Thanks,

  35. Thanks for the interesting blog post, how can I make is so that I get an email when you make a new post?

  36. Vit

    Please can you add installation instuctions for this addon? Im unable to find it in WHMCS when uploaded to /modules/addons as folder or as php file. or into /modules/

    • Hi Vit,

      The first part of the article/tutorial with installation steps can be found on the WHMCS Blog. Link is located on the top of this page. This article is a second part.

  37. Mohsin

    It wont perfectly work if end user first time try to goto cart.php?a=add&pid=141
    it just redirect to cart.php?language=xxx&systpl=xxx

  38. Darshan

    I am new to whmcs. I have downloaded the files and placed them in the includes/hooks folder as mentioned. However I do not know where and how I should configure the $country variable. Could you please provide a few more steps of instructions.

  39. Mahdy

    Hi :

    Thank you for your great code , it work fine .
    I need also any code for auto switch payment gateway base user IP like language and template , is it possible generate this code ?

    Thank you

    • Hi Mahdy,

      I am happy to hear that hook is working well for you.
      It won’t be a problem for us to create such a code. Please contact us here: modulesgarden.com/order/request

  40. I added domainchecker.php to the list of allowed files.But when I do so,I get a blank page when I check for the domain availability

  41. Nicolas

    Lets says the visitor enters domain.com/cart.php?gid=1

    If a language redirect applies, the hooks will redirect him to domain.com/cart.php?language=english

    Is there any way to properly redirect the visitor to domain.com/cart.php?gid=1&language=english

    • Hi,

      According to our quick tests you should have been redirected to domain.com/cart.php?gid=1&language=english . I have updated the hook file on our server which should help. Please download it once again and check whether this solved the problem.

    • Nicolas

      Thanks for the prompt reply.

      Works great now!

  42. Nicolas

    I’m looking for a way to prevent adding the default language to the URL redirection (?language=english) but still updating the currency.

    What do you think about this:

    if($_language == $country_to_language['default']){
    ob_clean();
    header(‘location: ‘.$_SERVER['REQUEST_URI']);
    die();
    }
    else {
    ob_clean();
    header(‘location: ‘.$location);
    die();
    }

  43. Hi Nicolas,

    One of our developers will need to verify this. I will get back to you on Monday.

  44. This will not work as intended. Indeed, language won’t be changed, but neither the template. Do you want to make ‘language’ parameter invisible in URL when customer’s language is the same as default WHMCS language?

    Please open a support ticket and provide us with more details.

  45. I’d love to see this packaged as an addon, adding for example payment methods per country.

    In case anyone else is interested as well, please show your support ModulesGarden forums!

  46. Hohny

    Waiting to be released for the new 5.3.5 version, because it doesn’t work!
    Thanks!

    • Could you describe which part of the hook doesn’t work?
      We will verify this as soon as possible.

    • Hohny

      As i have seen until now, the allowed scripts page, is not working.
      For example:
      I will initially try to visit site.com/a.php
      The result is a blank page!
      But if I visit, site.com and then try to visit /a.php, the script works fine…

  47. Ricardo

    Hello,
    After updating to version 5.3.5 I am getting a blank page with the message of “Incorrect redirection” (Firefox) / “Redirection Loop” (chrome).

    Any idea please?
    Thank you

    • We are on it Ricardo. Our developer is currently investigating all the problems with the hook and WHMCS 5.3.5.
      I will attach an updated version with fixes as soon as possible.

  48. agung

    Hi,
    any update on whmcs 5.3.6?

  49. We have just updated the hook to work properly with version 5.3.5. Sorry guys that it took so long. We haven’t tested it on 5.3.6 yet but we don’t expect any troubles with this version.

  50. Hello,

    Awesome! I can’t wait to test it on my WHMCS.

    Thanks

  51. Hi,
    any update on whmcs 5.3.7?

    installed not work

  52. Hi,
    Could you be more specific please? What exactly does not work?
    We will verify this as soon as possible and release an update if necessary.

    • language and currency does not work,
      I did not do any configuration, I just uploaded the file geolocation_hook.php, geoip.inc and GeoIP.dat.
      always display default language and currency, try change my ip , but not work
      Another configuration?
      thank you

  53. language and currency does not work,
    I did not do any configuration, I just uploaded the file geolocation_hook.php, geoip.inc and GeoIP.dat.
    Another configuration?
    thank you

  54. We will check this out Brian. Thank you the information.

    • additional
      when first open, after upload 3 files
      and I access client.mydomain.com
      just display geoip.inc
      not display index page ,
      after refresh, display client.mydomain.com /? systpl = default
      I really need this hook

      Thank you Piotr

  55. Brain,

    We have verified this on WHMCS 5.3.7 but we are unable to find a malfunction in our hook. We expect that the problem lays within your configuration but we are not sure about that. Could you please create a ticket and provide us with access details to your system? In this way our developer will help you solve the problem.

  56. Hello, that it is necessary to prescribe in order depending on user IP automatically put the country (ex. RU-Russia, DE-Germany and etc.).

  57. Arnold

    Hello, how to configure auto-detection of the country, depending on the IP?

  58. Where can i find the Donate Button?, this totally works for my site :) , i will make some adjusts to the custom template, and everything should be perfect.

    • We are delighted to hear that Jose! Your feedback is the greatest reward for us, there is no need to donate ;)
      Feel free to share your opinion on our Forums or any other place.

  59. Hello,

    Is there a way to call this hook to the non whmcs pages? I added price feeds on it and it would be great if they could change depending the country visitor.

    Thanks!

    Ernesto

  60. Hello Ernesto,

    Are those non whmcs pages anyhow connected or have anything to do with WHMCS? Or are they completely separate and independent from WHMCS in all aspects?

    • They are completely separated from WHMCS and independent. They are php but not smarty.

    • Ernesto, in this case we would need to access your environment and check it out because basing on last statement, it is difficult to guess whether we can call the hook or not. Feel free to create a ticket and one of our developers will check this for you.

  61. ivan

    If you go as new visitor, with no session nor cookies on a custom page the module is not working.
    Custom pages send the headers differently from default whmcs pages.
    How to solve that?

    • Please make sure that the array $allowed_scripts contains php file name that is associated with the custom page.

      If this does not resolve your problem, please open a ticket. Our Support Team will find the cause and eliminate it in the shortest time possible.

  62. Don

    I have the plugin working, but I noticed that it’s no longer possible to change currency by clicking on the flag/currency tab after it’s been set. So it does work, but changing currency is no longer an option after it gets assigned to the client. Is there a way to allow users to still change their currency?

    • Don

      Actually, I think I’ll just remove the option to choose currency, and have the hook take care of it. So the plugin is working as expected. Nice work.

  63. Don

    Where I think this module would be great would be to integrate with MultiBrands and ResellerCenter. Think of it from EU VAT where you may want different Brand or Reseller for specific region/partners. Just my 2 cents.

  64. Hi

    how long until this is updated to work with WHMCS v6?

  65. HI

    I’ve replaced the old code with the new code and it still doesn’t work for me :(

  66. Aivaras

    I have uploaded and added country LT and language lithuanian, but Im always getting error:
    PHP Fatal error: Cannot redeclare geoip_country_code_by_name() in includes/hooks/geoip.inc on line 438

    Please help!:)

    • Hello Aivaras,

      Your problem stems most probably from the fact that you attempt to overwrite the existing country. LT is already included in ‘geoip.inc’ file and that may cause conflict in the hook.

  67. Aivaras

    I have added ‘LT to the file geolocation_hook, but not to the ‘geoip.inc’.
    Just simple as in instructions:
    $country_to_currency = array(
    ‘default’ => ‘USD’,
    ‘LT’ => ‘EUR’,

    and geting error: PHP Fatal error: Cannot redeclare geoip_country_code_by_name() in includes/hooks/geoip.inc on line 438

    • In this case, please open a ticket and include access details to your WHMCS admin area and FTP server so our Support Team can help you find the cause of your problem and eliminate it.

      Remember that you can use Secured Messages box to encrypt any fragile data.

  68. Hello, it work fine for me, in my whmcs 6.1.1, but now my visitors can’t manually change the currency in cart.php

  69. Please note that there is a following section at the end of a hook’s file:

    /**
    * Preventing from switching currency by user
    * NOTE: You can remove/disable this part if not needed.
    */
    if(isset($_SESSION['switched_currency']) && $_SESSION['switched_currency'] != $_SESSION['currency'] ) {
    $_SESSION['currency'] = $_SESSION['switched_currency'];
    }

    If you remove it your clients will be able to change the currency.

  70. Thanks and let it installed on my site :) .

  71. Hi, i like your plugin,

    but each time i use it show me 500 error and all site down…

    i really appreciate if you can help me out, thxx

    -Amit

  72. this script works well in cart.php, but not working in index.php. Index.php is added in $allowed_scripts array. Hook works in index.php, but i dont know how to get the currency id.

    • Kindly note that there is no need to search for currency id because there is a built-in function in the hook which carries out this task automatically.

      Should you require any further assistance in that matter, please contact our Support Team.

  73. Aivaras

    After uploading script, Im Always get the same error:
    Fatal error: Cannot redeclare geoip_country_code_by_name() in includes/hooks/geoip.inc on line 438

    My country is LT
    Please help, I can’t find the solution more than 6 months

    • Hi Aivaras,

      It will be best if you open a ticket in that matter as we suggested in the response to your previous comment. Once you provide required access details, we will be able to eliminate the issue directly in your environment.

  74. cagri

    ?language=english&systpl blabla

    This script must cause Bad rep for SEO, I try to add rewrite url rules Web.config/htaccess or geo locatin php for other method but i couldn’t get any sollution.

    If when user get indexphp?language=english&systpl blabla is rewrite for ex: index.php/en or default domain.com, This script Would be %100 Perfect for using

    Anyone have got idea for solve this problem?

    Thank You

  75. excited anticipation continues for new version :) If SEO problem will be solved

    thank you

  76. Please update with the problem described by Cagri. It really hurts the SEO and even it doesn’t looks professional. I am also waiting for the update. Hope to get it soon.

  77. Hi guys!

    We are pleased to inform that the update is ready for your use!

    The new version covers the ability to define the HTTP response code for site redirection and, of course, the fix to the reported SEO issue. Thank you for your patience!

  78. Aivaras

    Finally, now it works great!

  79. On the 7.1 which is to remove the currency change from the template, apparently this does not appear out as lines of codes under the WHMCS v6 standard_cart. While the hook is added on 7.2 to prevent the changes, it might be good to just take this off from the client area cart as trying to click to change the currency does not looks to be working due to the use of this geolocation hooks.

  80. Okay got it.. apparently the modern template was being reference as well from the standard_cart, removing the currency in the modern cart products.tpl did the trick. However, we do notice there’s 2 section of the code needs to be remove – one as outlined on the guides above and the other one just at the end of the same files.

  81. Would you be so kind as to contact our Support Team directly and elaborate a bit more on what you think should be changed? Thank you!

  82. Jota

    Where do we setup $country variable ? in geoip.inc file ?

    Thanks !

    • There is no $country variable in the hook, a country is determined basing on client’s IP.
      IP addresses database (IP pool per country) is located in GeoIP.dat file.

  83. Hi again :) Your last update had cause little bit something wrong js. When our customers get on Mobile, we just forward ?systpl=mobile with javascript on header, Now your systpl is not working this hook, Already we are tryin on

    $useragent=$_SERVER['HTTP_USER_AGENT'];
    if(preg_match(‘/(android|bb\d+|meego).+mobile|avant….. blabla ?? …..

    { $language_to_template = array(
    ‘english’ => ‘mobile’,
    ‘turkish’ => ‘mobile’,
    ‘default’ => ‘mobile’

    // NOTE: You can add more below
    );

    } else
    {$language_to_template = array(
    ‘english’ => ‘desktop’,
    ‘turkish’ => ‘desktop’,
    ‘default’ => ‘desktop’

    // NOTE: You can add more below
    );}

    Gotta any ideas?

    Best Regards.

  84. Aivaras

    Sorry, but this version still have a bug.
    1. $responseCode = 302; – killing seo completely, and search robots goes away because site moved permanently to nowhere..

    2. If part |$language_to_template” removed, SEO works good, but country to language redirection stops working.

  85. Aivaras

    How to safe remove all parts about template redirecting, to get script still working for country and currency redirection and still accessible for search robots.

    • To successfully prevent template redirection please do as follows:
      1) Remove code snippet: "&& !empty($systpl)", you should find it in line 167.
      2) Comment out code snippets in lines 172, 174 and 191-233.

  86. I have installed this hook however its throwing an error on the admin of whmcs

    Fatal error: Call to undefined function geoip_open() in /home/XXXXXX/public_html/includes/hooks/geolocation_hook.php on line 123

    how do i correct this error?

    • Hi Steve,

      It appears that you have not uploaded the files correctly. Please refer to section above: 5. Uploading GeoIP.dat And Library To The System.

  87. Yasin

    Hello

    The geoip.dat file is started to became older and not recognizing the new ips. Are you thinking to refresh the module for the new built GeoIP2 ip database of MaxMind ?

  88. Yasin

    Hi Again,

    How can i set a currency if the IP is not recognised by the geoip ? For example it some times not recognizing ip addresses and changes the currency of the order to my local currency. However the problem is, if the product is priced as 5 usd it creates an invoice as 5 euro . I think the problem is about defining the ip and the country ip belongs to.

    My aim is, where ever a visitor comes, if the ip is not recognized , force him to set currency predefined.

    Hope you can help.

  89. Yasin,

    The functionality you described is already available in Geolocation Hook For WHMCS. Please search for $country_to_currency array and modify it according to your needs.

  90. Excellent Module , very useful

    Thank you

  91. Excelente blog, con buenas ideas y contenido me gustaría recomendarte una empresa donde podras conseguir y donde te podrán ayudar a tener un sitio web propio.

    Saludos

  92. Alex

    Hi there,

    with php7 and whmcs 7.0.1 i have the problem, that we get the blank page, if customer come to site. The same like amit at 20 November 2015 here uper case. If we reload the page, all is very well. What can we do?

    Thanks

  93. Stathis

    Hey! Script is in a redirect loop for whmcs 7 and php 7.

    Can you check and provide an update?

  94. Hello Alex and Stathis!

    All your troubles most probably stem from the fact that the hook has not been yet adjusted to support WHMCS V7 and PHP 7. We are currently working on it, please expect the update to be available next week!

    • Alex

      Hello Joanna Zając,

      thanks for infromation, so we wait :-)

    • Please be aware that the update of Geolocation Hook For WHMCS might be available a bit later than initially anticipated. I will certainly keep you informed on the progress in that matter.

      I also encourage you to visit our social media profiles – we post there instant announcements on each relevant release.

  95. Hashmi

    Hi,

    Thank you for this great help.

    However, when I do all this, nothing is changed. No error, it simply does not change any thing. Do I need to have any other module with this too or it is not working because you are going to update the script?

    Thanks

    • You do not need any additional pieces of software to make the hook work, Hashmi. If you use WHMCS V7 please wait for the coming release as your issues are most likely related to the current lack of compatibility with V7.

    • Hashmi

      Thank you so very much. I will be waiting eagerly for that. Was curious just because I saw people mentioned redirection errors/blank pages on v7 but mine just didnt do any thing.

  96. Automatic Currency And Language hook not working on my site i am using WHMCS Bridge Version 3.8.3 . I try this hook on my site but this hook not working means it not changed currency based on geolocation i want if customer open this site in UAE then selected currency should be in AED and if customer open my site in other country then selected currency will be in $. please tell me the solution

    • It is difficult to identify the root cause of your troubles without looking into your system directly. Please join us in a ticket – use Confidential Data field to provide all access details in a highly secure manner.

  97. Hi,

    I would like to have the hook for the V.7, How I can do it? Seem now the link for download is death.

    Kindly advise.

    • Hi Montri,

      Kindly check it once again, the link should work properly.

      Please be advised, however, that the hook has not been yet adjusted to support WHMCS V7. Its new version is due in the next couple of weeks.

  98. We are happy to announce that the next generation of our
    Geolocation Hook For WHMCS
    with WHMCS V7 & MaxMind GeoIP2 support and fully rewritten code has been released (v2.0.0). We have also created a documentation available on our Wiki. Enjoy!

  99. I want to get current currency value in homepage.tpl, how would i get currency value in homepage.tpl

  100. Johnny

    Thank you for creating it a newer version! It doesn’t seem to work on my end though, and I have a question.
    I want to use only “country to language”! Is it possible to change the language on the first visit without adding “?language=…”?

    • If I understand your question correctly, setting up a desired language as a default one should do the job. This is the section you need to adjust:
      $countryToLanguage = array(
      'default' => 'english',
      'US' => 'english',
      'DE' => 'german',
      'NO' => 'norwegian'
      // NOTE: You can add more below
      );

      If the above mentioned suggestion does not resolve your doubts, I would like to kindly ask you to provide us with more detailed explanation via ticket.

  101. Please look at making a video tutorial for dummies…

    • We are eager to provide customers with precise information on our products so we will surely consider creating a video presentation of Geolocation Hook For WHMCS. For now, you are more than welcome to explore our Wiki documentation that will guide you through the operation of the hook step by step!

  102. Kazi S.

    When it’s in active state WHMCS started showing warning “A Certificate Authority verified SSL certificate was not detected on domainname. This will prevent some features, such as OpenID Connect, from functioning. This may also affect your ability to receive PCI or other accreditation.”

    If I disable the hook then warning disappear and OpenID used to function properly.

    What’s the way how I can use OpenID and your geo hook together?

    • It might be difficult to find the exact reason behind such irregularity without accessing your environment. The best you can do is reach out to our support specialists directly and let them check the issue right within your system. No worries, all sensitive data are perfectly safe when passed through the Confidential Data box available on the ticket’s submitting page.

  103. I found the error [WHMCS Application] ERROR: exception ‘Whoops\\Exception\\ErrorException’ with message ‘Class ‘ModulesGarden\\Geolocation\\Geolocation’ not found’ in … on whmcs 7.2

    It’s working before update, kindly check out please.

    • Another line error
      PHP Fatal error: Class ‘ModulesGarden\\Geolocation\\Geolocation’ not found in /public_html/includes/hooks/geolocation_hook.php on line 24

  104. Many thanks for bringing these issues to our attention, Montri! They have been already forwarded to the relevant department for further examination.

    • Kindly let me know the update for this issue, if you need any more details, feel free to contact me as email provided.

      Thanks.

    • Reaching our experts at Support Team directly through a ticket is the easiest way to be kept closely informed on the progress in this case, Montri. We warmly invite you to do so.

  105. Johny

    There is a problem with facebook share. When you are trying to share a link on facebook, it doesn’t parse anything simply because it uses the redirection method.
    I have tried debugging the link in facebook debugger, but the problem is still there.

    Anybody found a work around on this?

    • Please note however, that our module makes redirections by default and in principle this part should not be tampered with. If you require further assistance on how to work around this issue, just contact our Support Team and they will do their best to come up with a solution.

  106. Hello,
    After following the instructions in your blog we find that the currencies for other countries setup switches for USA, Germany and United Kingdom but does not work for Nigeria. Could you please help?

    • Can you please make sure that you have configured all the relations in the ‘includes/Geolocation/config.php’ file correctly? This is the exact section you need to adjust:

      $countryToCurrency = array(
      'default' => 'USD',
      'US' => 'USD',
      'GB' => 'GBP',
      // NOTE: You can add more below
      );

      It should contain the country code specific to Nigeria which is ‘NG’. Should you encounter any more difficulties, contact us via a ticket for further instructions.

  107. all the explanation you provide for this is only about the hook file i also see other folder in the zip i downloaded but there is no explanation where i can place it i also follow the explanation above and the result that my website stop working completely and the code i copy and past just same as you give above and it give me error and it become red color . so is there easy way to make this more easy for us ? i am just wandering for something why you just not make this ready for people to upload you can just place the code that you write pages about it in the files of the program and make it more easy for people to just upload in the folder than it will work . i feel like i need to study coding so i can use this lol its like you are giving us coding lesson not only program for use . anyway is there way for me to use this ? i want only to change language for countries so . i do not know what to do and as i said i copy the code you give above and it make my website stop working completely . code error . thanks

  108. Lucian

    When i want to buy a product (cart.php?a=add&pid=1) is redirecting to cart.php. Why?

    • Hi Lucian,

      There are at least several possible causes behind this sort of an error, and without a deeper insight it is rather difficult to identify the right one. Please join our support specialists in a ticket so they can have a closer look at the issue.

  109. Ramiz Syed

    Hi,
    I was using it on WHMCS 7.1.2, it was working perfectly, after update WHMCS 7.6 it’s not working.
    I prefer it for IP based currency switch.
    have you test it on latest WHMCS 7.6 version?

    Thank you

    • Hi Ramiz,
      We have not detected any faults in Geolocation Hook For WHMCS during the internal WHMCS V7.6 compatibility check. Please discuss this further with our experts at the Support Team, they will help you remove all problems affecting the hook’s operation.

  110. Simon

    Hello,
    Thanks for your great product.
    Is it possible to translate the Company name (WHMCS Website name)?
    And also translate the contents of template like footer text and etc…

  111. Hi Simon,

    Geolocation Hook For WHMCS enables you to set up the automatic switch of only such elements as currency, language, and WHMCS client area template.

    You may freely discuss any other issues that might be troubling you with our Support Team directly.

  112. Great! this helps a lot when you had sites for multiple countries.

  113. Joachim

    Hello

    I am trying to get this to work with a template I bought “control”, but it does not load that template, even if it is set to default.

    What can be wrong?

  114. Hello Joachim, we are unfortunately unable to specify the exact reason for this occurrence without some extra information. If you could join us in a ticket, we will gladly look into your issue in a closer detail and help you dispel the doubts.

  115. Mic

    Will I still to:
    1. Add the new currencies in the Currency page in the Admin?
    2. Click on Update Product Prices in the Currency page in the Admin?

    Will the currencies still lined up in the Order form or it will not but rather clients will automatically have the assigned currency?

    • Please mind that the module is aimed to automatically switch only the already defined currency, language or template of your WHMCS client area. Therefore, you will still need to visit your admin area in order to add new currencies and update product prices. In case of further questions, please reach out to our folks at the Support Department.

  116. Hi, Thanks for this plugin.

    We have 2 currencies usd (default) & inr

    We have setup the config as INR for india and usd for the rest of the world & the default currency

    Now when we sign-up from india, initally the currency is switched to INR, now if the user creates the order goes to the payment gateway, and returns without a successful payment, now the currency in india is displayed in USD

    i.e. when the user has been logged in the hook is not working, can we apply the hook to logged-in users too, can we do that?

    If we logout the currency shows in INR correctly

    Our whmcs url infinityonlinesolutions.com/infyadmin

  117. We would like to take a closer look at this case and advise you on the best possible solution. Will you please join us in a ticket? Looking forward to hearing from you!

  118. Kamil

    Module is not working with current WHMCS 7.8.2. It is getting error with including GeoIP2/geoip2.phar/phar-stub.php

    • While we are actively working on ensuring the full compatibility between our modules and the newest WHMCS 7.8 version, Geolocation Hook For WHMCS is yet to go through the required testing procedures. Please find the full list of already confirmed modules on our official Forums. As soon as we have integrated the hook as well, it will be added to the record immediately.

  119. Thanks for your great work guys.

    i am Already Whmcs Version 7.x Requirement php Version Minimum 7.1
    now issue file geolocation hook.php Requirement php Version 5.6.x

    • Thank you for reaching out! Our Support Team has already received your inquiry – we will investigate the matter in the shortest time possible and then get back to you with more details.

  120. Praveen

    I am getting the following error

    Whoops\Exception\ErrorException: require(): Failed opening required ‘phar:

    Can someone help me with it?

    • Hello Praveen, we are unfortunately unable to specify the exact reason for this occurrence without some extra information. If you could join us in a ticket, we will gladly look into your issue in a closer detail and help you dispel the doubts.

  121. Hi, my first landing page in card shows that the hook is working but on all other pages dollar is selected and i just don’t get removed no matter what i try, can anyone help ?

  122. thanks

    after checking your module for version 8.1.0 I see that it doesn’t work.

    throws multiple errors.

    it works fine in whmcs v8.0.4, but in 8.1.0 it doesn’t.

    If you are kind enough to support the hook I would be grateful.

  123. To add to @jesus suarez’s comment about the GeoLocation incompatibility, if you upgrade to 8.11 you get this in the Client Area (Admin area still works):

    Error: Call to undefined method WHMCS\View\Template::getTemplateConfigValues()

    I couldn’t find anything on Google so submitted a ticket to WHMCS. On the first reply they just told me to re-install, but because my system was down for two days already I completely deleted all files and had to set everything up from scratch.

    • Thanks for sharing an additional input, Eugene! This and all other problems related to WHMCS V8.1 incompatibility will be disposed of as soon as we release the new version of Geolocation Hook For WHMCS, yet this month.

  124. Omar

    Hi,

    Joanna Byjoś earlier in March you were telling Eugene that this Hook would be ready for whmcs 8.1 compatibility during that month, apparently it has been extended a bit more. Any announcement on when 8.1.3 compatibility will be ready? Thanks

    • Hi Omar! We still have quite a few complex modules on the examination table, hence this unfortunate delay in works on a new version of Geolocation Hook For WHMCS. This should take just another couple of weeks tops, thanks a bunch for your patience so far!

  125. Frazer

    Hi Guys,

    Hope you’re well.

    Tried the module today, but it didn’t work.
    Looks like it’s still not compatible with whmcs 8.1

    Hoping you will release an update ASAP :-)

    • Hi Frazer, I come bearing great news! There is a strong chance that Geolocation Hook For WHMCS will receive the awaited WHMCS V8.1 support yet this week, so keep your eyes peeled! :)

  126. Cee

    I have added the currency and country, do I have to change the IP address too please? and how?

  127.  
    We are thrilled to bits to finally confirm that our Geolocation Hook For WHMCS is now in full compatibility with WHMCS V8.1!
     
    Go ahead and log in to our client area to gain access to this
    brand-new and totally free update.
     

  128. VNIT

    when module error The address x.x.x.x is not in the database. module not return default currency in setting

  129. Someone's Son

    Does this module work if you are using Cloudflare?

    • Yes, our Geolocation Hook For WHMCS can be used with Cloudflare, but you need to set up your server appropriately. You can learn more about that specific configuration here.

  130. Hari

    Hi, When will it be compatible with the latest version 8.2.1? Will this work with 8.2.1, I don’t want to break my site.

  131. Hello, thanks for this great module!
    How can update ip database? I think this file: GeoLite2-Country.mmdb
    And i find this: https://dev.maxmind.com/geoip/geolite2-free-geolocation-data?lang=en

    Is it true?

    Thanks again.

    • Hi! It’s so great that our hook fits your needs well, Taha.

      And to answer your question: all you need to do is download the mentioned file and overwrite the one that is currently in our module. Hope that helps!

  132. Otavio Marchioli

    Hi, i’m having a bug with this hook where in the first page load (incognito) the language is correctly set but if I have lang overrides files, the overrides are not loaded, and I end up with a page half translated. If I reload, since the language is already set in the session, the page is loaded correctly.

    • Otavio Marchioli

      To solve this I had to edit the lib code, do you guys have a public repo where I could send a PR with this change?

    • Hello Otavio, thanks for your feedback! Unfortunately we don’t have a public repo, but you are more than welcome to get in touch with our team and share details via a ticket.

  133.  
    Time for a much-anticipated piece of news: our Geolocation Hook For WHMCS is now in full sync with WHMCS V8.8 and WHMCS V8.9, and features support for PHP 8.1 version!
     
    Don’t miss out on this major update and enjoy free access to this useful tool!
     

Leave a Reply to Davis Cancel reply

Your email address will not be published. Required fields are marked *

*


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">