If you are using the maximum radius or maximum driving distance as the delivery validation method, and the address bar is not autocompleting while on a mobile device, try adding the following code to your store.
This is most likely caused by a package included in your theme called fastclick.min.js.
Add support code
These steps apply only to the Zapiet - Pickup + Delivery widget version 1 or 2. Which version of the widget am I using?
If you're on a legacy version, please reach out to us on chat, and we would be happy to update the widget to the newest version for you!
Click Settings, then Developers.
In the Advanced section, add the code below into the Custom scripts box.
$(function() {
var needsClick = FastClick.prototype.needsClick;
FastClick.prototype.needsClick = function(target) {
if ( (target.className || '').indexOf('pac-item') > -1 ) {
return true;
} else if ( (target.parentNode.className || '').indexOf('pac-item') > -1) {
return true;
} else {
return needsClick.apply(this, arguments);
}
};
FastClick.attach(document.body);
});
Troubleshooting
Go through our checklist of settings to ensure everything is set up correctly.
Make sure you have the correct country added in Settings > Developers > Advanced.
You can check the validity of your Google Maps API in our app. In Settings > Local Delivery > Distance validation, click Google Maps API key.
Click Check your API key.
If the API key is invalid, take a look at troubleshooting section in our Creating a Google Maps API key article.
You can check the validity of your Google Maps API key through the link below. Copy the link to your browser and replace the API_KEY with your Google Maps API key.
Compare the error messages with the error messages below.
If the code mentioned in the article did not help to fix the issue with address autocompletion, please copy and paste the following code to Settings > Developers > Custom scripts.
$(document).on({
'DOMNodeInserted': function() {
$('.pac-item, .pac-item span', this).addClass('needsclick');
}
}, '.pac-container');