Jump to content

Customer locator


Recommended Posts

Dear my friends

 

We are looking for any way to locate the customer adress "latitude & longitude" to help at the delivery process in quick way.

 

Is there any way to get this automatic during the customer signing up...

 

THANK YOU

Link to comment
Share on other sites

You can try with a custom module, something that calls the google maps api
 

 $url = "http://maps.googleapis.com/maps/api/geocode/json?address=$address&sensor=false";

	    // Make the HTTP request
	    $data = @file_get_contents($url);

It will return a json array. Decode it, then dump it to check its vars. Lat and Long should be something like

 


	    $LatLng = array(
	        'lat' => $jsondata["results"][0]["geometry"]["location"]["lat"],
	        'lng' => $jsondata["results"][0]["geometry"]["location"]["lng"],
	    );
Link to comment
Share on other sites

×
×
  • Create New...