Here we see how to set WooCommerce delivery charges by kilometer, and the features we will cover as –
- Free shipping up to certain kilometer
- After covering free shipping distance charge per kilometer
- Shipping charge by distance(km) will be calculated on checkout page based on user’s shipping address
So, how to do that?
We need – WooODT Extended plugin and it’s Map Addon plugin.
Once you activated both plugin navigate to Map options menu on WooODT Extended menu and put Your storehouse address – this is the place from where distance of customers’s shipping address will be calculated
Google map API key – sign in to google map and grab an API key and paste it there.
Mention – Up what kilometer you will provide free shipping, For example- to 30 kilometer there is no shipping charge
Cost per kilometer – this will be applied to extra kilometer after free kilometer get cover up, if you put it as 2 USD per km and if the customer’s shipping address is 45 km away, so customer will be charged as (45-30)2=30 USD.
Settings page looks like below screen-shot.
Now we are done and lets see what happen on checkout page.
So as per my settings my free delivery area is up to 5 km, and after that it will cost 2 USD/km. and I am choosing an distance that is 9.3 km away from my store house, so when I put my address on checkout page the plugin automatically calculates the distance from store house and heighlight it on Google map and show the distance to customer, like below screen-shot
Now the distance is 9.3 km and we have free delivery up to 5 km, so the cost should be
(9.3 – 5) * 2 = 4.3 * 2 = 8.6 USD
The same is added as delivery charge by distance on total amount to pay, as below screen-shot.
View the product WooODT Extended Map Addon.
read in details how to obtain Google API key here – http://www.blog.byconsole.com/how-to-obtain-google-api-key/
*** This plugin will require SSL / https to work.