forked from CGM_Public/pretix_original
Cross selling (#4185)
Product categories can now be marked as "cross-selling categories", causing them to appear in the add-on checkout step as additional recommendations, depending on their cross-selling visibility (always, only if certain products are already in the cart, or only if they qualify for a discount according to discount rules). --------- Co-authored-by: Raphael Michel <michel@rami.io> Co-authored-by: Richard Schreiber <schreiber@rami.io>
This commit is contained in:
@@ -397,6 +397,9 @@ var form_handlers = function (el) {
|
||||
enabled = !enabled;
|
||||
}
|
||||
var $toggling = dependent;
|
||||
if (dependent.attr("data-disable-dependent")) {
|
||||
$toggling.attr('disabled', !enabled);
|
||||
}
|
||||
if (dependent.get(0).tagName.toLowerCase() !== "div") {
|
||||
$toggling = dependent.closest('.form-group');
|
||||
}
|
||||
@@ -411,8 +414,9 @@ var form_handlers = function (el) {
|
||||
}
|
||||
};
|
||||
update();
|
||||
dependency.closest('.form-group').find('[name=' + dependency.attr("name") + ']').on("change", update);
|
||||
dependency.closest('.form-group').find('[name=' + dependency.attr("name") + ']').on("dp.change", update);
|
||||
dependency.each(function() {
|
||||
$(this).closest('.form-group').find('[name=' + $(this).attr("name") + ']').on("change dp.change", update);
|
||||
})
|
||||
});
|
||||
|
||||
el.find("input[data-required-if], select[data-required-if], textarea[data-required-if]").each(function () {
|
||||
|
||||
Reference in New Issue
Block a user