mirror of
https://github.com/pretix/pretix.git
synced 2026-05-13 16:33:59 +00:00
Apply suggestions from code review
Co-authored-by: Richard Schreiber <schreiber@rami.io>
This commit is contained in:
@@ -28,10 +28,11 @@ cross_selling_mode string If ``null``, cr
|
||||
step.
|
||||
If ``"both"``, it is visible on the normal index page
|
||||
as well.
|
||||
Only available if ``is_addon`` is ``false``.
|
||||
cross_selling_condition string Only relevant if ``cross_selling_mode`` is not ``null``.
|
||||
If ``"always"``, always show in cross-selling step.
|
||||
If ``"products"``, only show if the cart contains one of
|
||||
these products.
|
||||
the products listed in ``cross_selling_match_products``.
|
||||
If ``"discounts"``, only show products that qualify for
|
||||
a discount according to discount rules.
|
||||
cross_selling_match_products list of integer Only relevant if ``cross_selling_condition`` is
|
||||
|
||||
@@ -122,8 +122,8 @@ class ItemCategory(LoggedModel):
|
||||
)
|
||||
CROSS_SELLING_CONDITION = (
|
||||
('always', _('Always show in cross-selling step')),
|
||||
('products', _('Only if the cart contains one of these products')),
|
||||
('discounts', _('Only show products that qualify for a discount according to discount rules')),
|
||||
('products', _('Only show if the cart contains one of the following products')),
|
||||
)
|
||||
cross_selling_condition = models.CharField(
|
||||
verbose_name=_("Cross-selling condition"),
|
||||
|
||||
@@ -1617,6 +1617,7 @@ def set_cart_addons(self, event: Event, addons: List[dict], add_to_cart_items: L
|
||||
ensure the requested addon state.
|
||||
:param event: The event ID in question
|
||||
:param addons: A list of dicts with the keys addon_to, item, variation
|
||||
:param add_to_cart_items: A list of dicts with the keys item, variation, count, custom_price, voucher, seat ID
|
||||
:param cart_id: The cart ID of the cart to modify
|
||||
"""
|
||||
with language(locale), time_machine_now_assigned(override_now_dt):
|
||||
|
||||
@@ -102,7 +102,7 @@ class CategoryForm(I18nModelForm):
|
||||
_('Cross-selling category'), _('Products in this category are regular products, but are only shown '
|
||||
'in the cross-selling step, according to the configuration below.'))),),
|
||||
('both', mark_safe('{} <span class="text-muted">{}</span>'.format(
|
||||
_('Combined category'), _('Products in this category are regular products displayed on the front page, '
|
||||
_('Normal + cross-selling category'), _('Products in this category are regular products displayed on the front page, '
|
||||
'but are additionally shown in the cross-selling step, according to the configuration below.'))),),
|
||||
))
|
||||
self.fields['category_type'].initial = self.instance.category_type
|
||||
|
||||
@@ -588,8 +588,16 @@ 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;
|
||||
|
||||
Reference in New Issue
Block a user