Jump to content

Use Gelocation to fill out address during checkout


Recommended Posts

Merry Christmas everyone!

 

I have searched the forums and could not find a discussion on tihs topic.

 

So basically there are two ways to detect a users approximate location

 

Using HTML5 Geolocation method, which needs user permission and using a third party API which connects to a database thats maps IP'S to country/city etc.

 

What i would like to do is two things, and i think tihs would be great for every store.

 

1) Landing Pages using services like MAXMIND or freegeoip to locate the country of the user and say " We Ship to Atlantis" etc..etc.. -- has anyone developed code for this, and if so, can they share it? I would be concered about the latency of the lookup and weather this effects the page load speed?

 

2) During checkot only, i want to create a link during the 5 page checkout (ADDRESS) that says:

"Save time by allowing us to detect your location" once clicked the browser will be prompted for the user permission. I tested this and found the accuracy of this is quite precise that it can pick up the road name, number and house. This data can be pre-filled in the address fields, then the user can then verify and edit accordingly.

 

Please let's have a discussion as to how this can be achieved into prestashop and it would be a great feature to enable/disable, etc.! surely to reduce abandoned carts. 

 

Thanks.

RICKY

Edited by ricky11 (see edit history)
Link to comment
Share on other sites

  • 2 weeks later...
  • 3 weeks later...

bump

HIi ricky11, it is against forum rules to bump.

 

next time update your original post to give more detail, then you can 'bump' saying original post has more detail.

 

on topic: you can dump the array of the returned maxmind data in classes/controller/FrontController.php

 

find this code

					if (is_object($record))
					{

and add print_r($record);

 

this will display what information maxmind returns.  I did this once and I think it has zipcode.  We know it has country.

 

if you do this please let us know what you  find.  I am somewhat familiar with native back office-->preferences-->geo location.

and it looks like your bump  worked for you after all. :rolleyes:

Link to comment
Share on other sites

I will work on this and share my efforts in due course.

 

thanks for letting me know about the rules, duly noted.

 

Google HTML5 location detection is amazing, i am quite surprised a lot of the big ecomm stores are not using it, i couldn't even find one real world example.  I mean instead of typing out city/country/address/house number.

 

The browser will request " We would like to guess your address so that you can save time filling out the form"  I am sure 99% of users will say "OKAY" and then correct if they need be.  What i am going to work on is combing maxmind with Google address detection.  

 

 

 

Thanks.

Edited by ricky11 (see edit history)
Link to comment
Share on other sites

I followed this when you originally posted as I find this area the most interesting aspect of websites.

 

I looked at taking what was in free maxmind and as supported by ps but there was not enough information for me to update cookie with information that could be used later.  The less anyone has to fill in, and the wow factor of helper information is very important feature.

Link to comment
Share on other sites

×
×
  • Create New...