Caution
This is an advanced tutorial and is not supported by Zetya. Knowledge of web design languages such as HTML, CSS, Javascript and Liquid is required. We suggest hiring a Shopify Expert if you are not comfortable proceeding with the following tutorial.
BookThatApp automatically makes the booking date a required field however for themes that use Ajax to add products to the cart you need to customize the Javascript code that adds the product to the cart.
The easiest way to do it is to find the code and put in a check yourself. E.g.
$(".addtocart").click(function(e){
var elem = $(this);
if ($('#booking-start').val() === "") {
alert('Please select a date');
return false;
}
$(elem).prop("disabled", true)
e.preventDefault();
addItem('add-item-form');
});
Please note that while we are happy to answer any questions via a support ticket implementing changes to Ajax falls outside our no-charge support.
Comments
3 comments
This isn't working for me. I have one of the new html 5 themes and and updated browser. My site still acts as if I didn't change the code. Any ideas?
Hi Yuzu, Please raise a ticket so we can investigate: http://support.zetya.com/tickets/new
This also isn't working for me. I will create a ticket.
Please sign in to leave a comment.