With our delivery validation feature, you can check if the customer is eligible for delivery. Depending on the address entered in the widget, a matching delivery location will be selected.
Maximum driving distance method checks the address that your customers entered in the widget. That address will need to be within the driving radius you entered in your location settings for the customer to be able to check out.
To learn more about other delivery validation methods, take a look at our Delivery validation article.
To set up delivery validation, follow the written steps or the video instructions. The video includes all delivery validation methods - for maximum driving distance, skip to 09:35.
Requirements
You need to have Google Maps API key. Follow our Google Maps API key article to create one.
Compare delivery validation methods
If you're not sure if this is the right method for your use case, compare the validation methods we offer.
| ||
Google Maps API key | Required | Required |
Recommended use | If your delivery zone is set by a straight line radius from your store | If your delivery zone is set by a driving distance from your store |
Example distances | 10 km | 10 km |
Eligible addresses | Any address within 10 km straight line distance from your store | Any address within 10 km driving distance from your store |
Non-eligible addresses | Any address further than 10 km straight line distance from your store | Any address further than 10 km driving distance from your store |
How does maximum driving distance work?
Enabling the maximum driving distance method will add a field to the Local delivery section of our widget.
You will need to enter your driving distance in the location settings.
Your customers will need to enter their address to check if delivery is available.
They will start typing their address and must select it from the dropdown menu.
If the address is within your driving distance, they will be able to proceed.
The address will automatically populate in the next step of the checkout, if you have Prepopulate shipping address fields setting enabled in Settings > Local Delivery.
If the address is not within your driving distance, they will get an error and not be able to proceed further.
The distance measured is the actual driving distance from your store to the customer's address.
Enable maximum driving distance validation
Click Settings then Local Delivery.
In the Distance validation section, select Customer within maximum driving distance.
Enter your Google Maps API Key. If you do not have one, please follow the steps in our Creating a Google Maps API Key article.
Click Check your API key.
If the API key shows as valid, click Done.
If the API key shows as invalid, check you have copied the full API key correctly, with no blank spaces or missed characters.
If you have copied it correctly, check the troubleshooting steps in the Google Maps API article.Select whether the driving route should avoid highways, tolls, or ferries.
Select the route options.
Fastest route will assess traffic conditions and select the fastest route at the time of entering the address.
Shortest route will always select the shortest possible route.
Tick the Enable address autocompletion setting.
In the Checkout section and make sure the Prepopulate shipping address fields setting is enabled.
Click Save.
Your delivery validation settings are set, now you need to add delivery radius to every location that offers delivery.
Add maximum driving distance to a location
You can change the distance units in Zapiet - Pickup + Delivery > Settings > Standards and formats.
Click Locations.
Click the name of the location you want to edit.
In the Local delivery section, click Edit settings.
In the Distance validation section, enter your Maximum driving distance.
Click Save.
Repeat for all locations that offer local delivery.
Change the wording in the widget
Click Settings, then click Text and Design.
In Text and design section, click Show next to Delivery widget.
Change the wording in every field containing postal code/zip code into address. You can edit:
Search field placeholder
Instructional text (optional)
User has not selected a location, date or time (if required)
Click Save.
This is how your widget will look when you change the wording.
Limitations
You can use address autocompletion if your store delivers to only one country—we don't support autocompletion for multiple countries.
Troubleshooting
Check if you've selected the correct validation method.
Check if you've added the correct max driving distance within a location.
Check Google Maps API article to make sure you have:
Enabled all the APIs (Maps, Geocoding, Places, Directions, Distance Matrix)
Enabled billing
Removed the restrictions on your Google Maps API key.