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:
Mira
2024-10-14 14:39:49 +02:00
committed by GitHub
parent 7607cc5d2f
commit 359df1f51e
24 changed files with 1737 additions and 218 deletions

View File

@@ -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 () {

View File

@@ -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;