Open beireken opened 4 years ago
Hi @beireken
Please note that the maps javascript api and the geocoding api needs to be enabled. You can check your key using the following url: https://maps.googleapis.com/maps/api/geocode/json?key=YOUR_KEY&components=country:BE|postal_code:1040
Yes, both are enabled. I get a correct response with my api key.
{ "results" : [ { "address_components" : [ { "long_name" : "1040", "short_name" : "1040", "types" : [ "postal_code" ] }, { "long_name" : "Brussels Hoofdstedelijk Gewest", "short_name" : "Brussels Hoofdstedelijk Gewest", "types" : [ "administrative_area_level_1", "political" ] }, { "long_name" : "België", "short_name" : "BE", "types" : [ "country", "political" ] } ], "formatted_address" : "1040, België", "geometry" : { "bounds" : { "northeast" : { "lat" : 50.844677, "lng" : 4.4114811 }, "southwest" : { "lat" : 50.8224274, "lng" : 4.378913799999999 } }, "location" : { "lat" : 50.8335737, "lng" : 4.3943477 }, "location_type" : "APPROXIMATE", "viewport" : { "northeast" : { "lat" : 50.844677, "lng" : 4.4114811 }, "southwest" : { "lat" : 50.8224274, "lng" : 4.378913799999999 } } }, "place_id" : "ChIJ6dJDVbDEw0cRV7ojR4uaYq4", "types" : [ "postal_code" ] } ], "status" : "OK" }
Is the same API key to be inserted for both client and server field?
When enabling parcelshop i get the following error when trying to open the map in checkout.
opencart log:
2020-08-28 8:56:02 - PHP Notice: Undefined index: REMOTE_ADDR in /var/www/html/opencart/system/library/cart/storecart.php on line 37 2020-08-28 8:57:01 - PHP Notice: Undefined index: REMOTE_ADDR in /var/www/html/opencart/system/library/cart/storecart.php on line 37 2020-08-28 8:57:22 - PHP Notice: Undefined variable: address in /var/www/html/opencart/system/library/dpd/ParcelShop/Client/GoogleMapsClient.php on line 73 2020-08-28 8:57:22 - GoogleMapsClient::getGoogleMapsCenter no results for address:
chrome console:
<b>Notice</b>: Undefined variable: address in <b>/var/www/html/opencart/system/library/dpd/ParcelShop/Client/GoogleMapsClient.php</b> on line <b>73</b>{"success":false,"error_message":"Adres niet gevonden"}