Hi Stackideas, we implemented a simple Geolocation in the checkout, but in order to do so, we needed to alter some core files which is obviously not a good idea in longterm. I want to ask you how much it would cost to implement this as a Payplans feature as preselecting the country would improve the UX for everyone.
I will describe what we did:
1) we changed administrator/components/com_payplans/themes/default/helpers/form/country.php, line 35. Changed the values of the select options from $country->country_id to $country->isocode2 so the HTML output is e.g. <option value="MY">Malaysia</option> instead of a number <option value="150">Malaysia</option>. The problem with this change is that geolocation works just fine, but VAT ID stops working. It requires your edits as you know what files might be affected by this.
2) we added a piece of JS code that takes care of geolocation into components/com_payplans/themes/wireframe/checkout/default/default.js. Don't wanna paste it here and clutter the message, but I will provide you with it when needed.
Let me know what you think. Again, I emphasize we are happy to pay for the development. Michael