Callbacks
The BookThatApp widgets support callbacks during the booking lifecycle. Callbacks let you customize behavior or respond to changes on your product page.
How to Register a Callback
Create a
Bta.callbacksobject under the appropriate key.This must be done before the line:
{% render 'bookthatapp-widgets.liquid' %}
in your theme.liquid file.
Variant Changed
The variantChanged callback is invoked when the selected product variant changes.
Useful if your product page dynamically updates information, like price or availability, when a variant changes.
Bta = {
callbacks: {
variantChanged: function(variant) {
console.log(variant);
}
}
}Applies to any product widget.
Comments
0 comments
Article is closed for comments.