This commit is contained in:
2025-09-25 03:03:31 +05:00
commit ae480cf2f6
2768 changed files with 1485826 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
theme.DynamicCheckout = function() {
function DynamicCheckout() {
this.load();
};
DynamicCheckout.prototype = $.extend({}, DynamicCheckout.prototype, {
load: function() {
function update() {
var $this = $(this),
$dynamic_checkout = $this.parents('.js-dynamic-checkout'),
$button_wrapper = $dynamic_checkout.find('[data-js-dynamic-checkout-button-wrapper]');
$button_wrapper[$this.is(':checked') ? 'removeClass' : 'addClass']('disabled');
};
$body.on('change', '.js-dynamic-checkout [data-js-dynamic-checkout-confirmation]', update);
$('.js-dynamic-checkout [data-js-dynamic-checkout-confirmation]').each(update);
}
});
theme.DynamicCheckout = new DynamicCheckout;
};
$(function() {
theme.DynamicCheckout();
});