BookThatApp is not validating min pickup date restriction for some orders

Follow

Comments

3 comments

  • Avatar
    Zetya Support

    Hi Vero,

    What we recommend in this case is to put in validation on the page so that it checks there is a value in the field.

    Here is some example Javascript:

    $('#checkout').click(function() {
      if($("#delivery-date").datepicker("getDate") === null) {
        alert("Please choose a delivery date");
        $("#delivery-date").focus();
        return false;
      }
    });
    

    (please ensure the id's for the checkout button and datepicker field match what you are using in cart.liquid) 

    Thanks, Gavin.

     

  • Avatar
    Vero Lamas

    Thanks for your answer. That is what I am already doing as a workaround.

    Any other option?

  • Avatar
    Zetya Support

    Hi Vero, 

    What I found was that I can add the product to the cart while the page is still being loaded

    Another suggestion would be to make the checkout button disabled until the page has finished loading. Then once it has finished loading the validation should be making sure there is a date selected.

    Thanks, Gavin.

     

Please sign in to leave a comment.