All Collections
Zapiet - Pickup + Delivery
Troubleshooting
Google autocomplete prediction not working on mobile devices
Google autocomplete prediction not working on mobile devices
When your customers are having trouble entering their delivery address in our widget when using the mobile device
Jelizaveta avatar
Written by Jelizaveta
Updated over a week ago

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.


The placement of the code will depend on the widget version your store is on. If you're not using the newest version of our widget, contact our support team at [email protected], and we'll be happy to update your store!


Online Store 2.0

  1. In Zapiet - Pickup + Delivery, click Settings.

  2. In the Advanced section, click Developers.

  3. In the Advanced section, add the code below into the Additional 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);
    });

Version 7.1.2 or older

  1. Add the code below to storepickup-addons.liquid file in your theme.

    <script src="https://code.jquery.com/jquery-3.5.1.slim.js" integrity="sha256-DrT5NfxfbHvMHux31Lkhxg42LY6of8TaYyK50jnxRnM=" crossorigin="anonymous">
    </script> <script type="text/javascript">
    $(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);
    });
    </script>

  2. Click Save.


Troubleshooting

Go through our checklist of settings to ensure everything is set up correctly.

Did this answer your question?