Hi,
As there is no input for the address info in the shipping calculator form, I recommend to disable the shipping calculator in the cart page. Use the calculation in the checkout page instead. We will be updating the plugin to allow user to input the address in the shipping calculator form.
Sofyan
I have disabled the option ‘Activate the shipping calculator on the shopping cart page’ from Woocommerce > settings > sending methodes > sending options and didn’t help. Any suggestions?
Please try to activate the WooCommerce Shipping Options debug, then visit you checkout page, you will see an API URL request printed. Then paste the URL here.
from the order page (/product/19-mammamia/) there is:
API Request URL: https://maps.googleapis.com/maps/api/distancematrix/json?key=**********&mode=driving&avoid&units=metric&language=nl_BE&origins=50.97986176329557%2C3.533301233135262&destinations=Belgi%C3%AB
and on cart page (/cart/) there is:
Cached data: {“distance”:116.789,”distance_text”:”117 km”,”response”:{“destination_addresses”:[“Belgi\u00eb”],”origin_addresses”:[“Gentstraat 35, 9800 Deinze, Belgi\u00eb”],”rows”:[{“elements”:[{“distance”:{“text”:”117 km”,”value”:116789},”duration”:{“text”:”1 uur 17 min.”,”value”:4603},”status”:”OK”}]}],”status”:”OK”}}
and on checkout page (/checkout/):
Cached data: {“distance”:116.789,”distance_text”:”117 km”,”response”:{“destination_addresses”:[“Belgi\u00eb”],”origin_addresses”:[“Gentstraat 35, 9800 Deinze, Belgi\u00eb”],”rows”:[{“elements”:[{“distance”:{“text”:”117 km”,”value”:116789},”duration”:{“text”:”1 uur 17 min.”,”value”:4603},”status”:”OK”}]}],”status”:”OK”}}
but should not be like this because the distance should be 5.5km.
do you want to login an check it? I can give you temporary access but I need an email address.
Hi Sofyan. België is a country. In english is Belgium. I could send you your account details by email. Can you send you email to my? My email is [email protected]
Please send it to sofyansitorus at gmail dot com
Issue caused by wrong configuration
Hello,
i have almost the same Problem. When the api is called only Postcode, City, Country is transfered. So the distance is always to the middle of the Postcode, but noch to the exact adress.
What configuration error caused this Problem?
Thanks in advance.