mirror of
https://github.com/pretix/pretix.git
synced 2026-05-05 15:14:04 +00:00
Checkout: do not show bundled products as "Selected add-ons" in questions step (#2820)
This commit is contained in:
@@ -2714,6 +2714,10 @@ class CartPosition(AbstractPosition):
|
||||
self.tax_rate = line_price.rate
|
||||
self.save(update_fields=['line_price_gross', 'tax_rate'])
|
||||
|
||||
@property
|
||||
def addons_without_bundled(self):
|
||||
return [op for op in self.addons.all() if not op.is_bundled]
|
||||
|
||||
|
||||
class InvoiceAddress(models.Model):
|
||||
last_modified = models.DateTimeField(auto_now=True)
|
||||
|
||||
@@ -114,14 +114,14 @@
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if pos.addons.all %}
|
||||
{% if pos.addons_without_bundled %}
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">
|
||||
{% trans "Selected add-ons" %}
|
||||
</label>
|
||||
<div class="col-md-9 form-control-text">
|
||||
<ul class="addon-list">
|
||||
{% regroup pos.addons.all by item_and_variation as addons_by_itemvar %}
|
||||
{% regroup pos.addons_without_bundled by item_and_variation as addons_by_itemvar %}
|
||||
{% for group in addons_by_itemvar %}
|
||||
<li>{% if group.list|length > 1 %}{{ group.list|length }}× {% endif %}{{ group.grouper.0.name }}{% if group.grouper.1 %} – {{ group.grouper.1.value }}{% endif %}</li>
|
||||
{% endfor %}
|
||||
|
||||
Reference in New Issue
Block a user