cdeese8 Posted January 10, 2019 Share Posted January 10, 2019 (edited) May you please point me into the right direction on how I could achieve this? This is what I imagine would just magically work if I typed into a .tpl file... {if statecode = "AK"} hi people from Alaska {elseif statecode = "CO"} hi people from Colorado {else} hi everyone else... {/if} Right now I'm still doing research, here are some notes I have: * https://www.docs.modulesgarden.com/Geolocation_Hook_For_WHMCS * site:whmcs.community conditional logic geo localization * maxmind Geolocation whmcs -fraud * https://dev.maxmind.com/geoip/geoip2/geolite2/ * https://ipinfo.io/ * https://whmcs.community/topic/249129-custom-html-panel-for-specific-country/ * http://www.smarty.net/docs/en/language.function.if.tpl * https://www.smarty.net/docs/en/plugins Any wisdom you may have that can help me achieve what I desire would be awesome. Thanks! :) Edited January 10, 2019 by cdeese8 updated title 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted January 11, 2019 Share Posted January 11, 2019 16 hours ago, cdeese8 said: May you please point me into the right direction on how I could achieve this? you missed out one vital piece of information - do you want to do this for everyone or just for logged in clients ? if logged in clients, then it's simple as "state" will be one of the values in the $clientsdetails array and all clientarea pages will have access to that. if everyone, then you're in the realms of utilising a third-party Geo-IP location service (e.g one of the ones that you've listed that includes city/states)... although bear in mind that no such service is 100% accurate, and certainly not if the visitor is using a VPN to view the site. 1 Quote Link to comment Share on other sites More sharing options...
cdeese8 Posted January 11, 2019 Author Share Posted January 11, 2019 This addon might be overkill, but perhaps the Geolocation Hook For WHMCS config.php (geolocation_hook_2.0.1_whmcs\includes\Geolocation\config.php) file might be the best starting point. I can add the GeoLite2 City.mmdb and see what kind of damage I can do in a couple of hours. Maybe you know this kind of stuff just because... 😃... if you had to guess, do you think, by adding a 59 meg file to the addon will make website load speed noticeably slower? Of course! I didn't think about doing something for logged in clients but yea, you make good point about VPN. Using WHMCS 7.4.* and stock template, I thought it would be fancy for logged out clients to see something a tad-bit more welcoming. The idea is to make a landing page that converts and having a little bit extra touch of personal might help (or deter because it's creepy). Alright, gonna dig my fingers into the keyboard.. thanks for feedback 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.