Signup

Slow loading of widget in poor bandwidth regions


Andrew Cargill avatar
Written by Andrew Cargill
Updated over a week ago

If you are located in a region with poor bandwidth you may have issues with customers checking out before our widget has fully loaded. In order to combat this issue we recommend disabling the Checkout button until our widget has loaded. This guide demonstrates how to do just that.

 

First ensure you are using v4.1.0 of the widget or above, then follow the steps below.

 

Within your theme open the storepickup-addons.liquid file

 

 

Copy and paste the following code into the file

 

<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha256-3edrmyuQ0w65f8gfBsqowzjJe2iM6n0nKciPUp8y+7E=" crossorigin="anonymous"></script>
<script type="text/javascript">
$(document).ready(function() {  
  $('[name="checkout"]').attr('disabled', 'disabled');
   
  window.ZapietEvent.listen('widget_loaded', function() {
    $('[name="checkout"]').removeAttr('disabled');
  });
});
</script> 

 

If your theme already includes jQuery you can remove the first line of the code above. 

 

 

Click Save

 

D
S
Stephane is the author of this solution article.

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.