mirror of
https://github.com/pretix/pretix.git
synced 2026-05-06 15:24:02 +00:00
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 () {
|
||||
|
||||
@@ -567,7 +567,7 @@ table td > .checkbox input[type="checkbox"] {
|
||||
}
|
||||
}
|
||||
}
|
||||
.form-horizontal .big-radio {
|
||||
.form-horizontal .big-radio, .form-horizontal .big-radio-wrapper .radio {
|
||||
border: 1px solid #ccc;
|
||||
border-bottom: 0;
|
||||
padding: 0;
|
||||
@@ -588,6 +588,17 @@ table td > .checkbox input[type="checkbox"] {
|
||||
border-bottom: 1px solid #ccc;
|
||||
}
|
||||
}
|
||||
.form-horizontal .control-label:has(+.big-radio-wrapper),
|
||||
.form-horizontal .control-label:has(+div > .big-radio) {
|
||||
padding-top: 16px;
|
||||
}
|
||||
.form-horizontal .big-radio-wrapper .radio label {
|
||||
font-weight: bold;
|
||||
}
|
||||
.form-horizontal .big-radio-wrapper .radio label > span {
|
||||
display: block;
|
||||
font-weight: normal;
|
||||
}
|
||||
.accordion-radio {
|
||||
display: block;
|
||||
margin: 0;
|
||||
|
||||
@@ -102,6 +102,17 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
.cross-selling .panel-body h3 {
|
||||
font-size: 21px;
|
||||
line-height: inherit;
|
||||
margin-top: 20px;
|
||||
}
|
||||
.cross-selling .panel-body > *:first-child > h3:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
.cross-selling .panel-body h3 small {
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
|
||||
.panel-confirm {
|
||||
|
||||
Reference in New Issue
Block a user