add discount label

This commit is contained in:
Mira Weller
2024-10-02 12:12:43 +02:00
parent 3856095088
commit 6587cca608
2 changed files with 6 additions and 2 deletions

View File

@@ -60,7 +60,7 @@
</h3>
</summary>
<div class="panel-body">
{% include "pretixpresale/event/fragment_product_list.html" with items_by_category=cross_selling_data ev=event %}
{% include "pretixpresale/event/fragment_product_list.html" with items_by_category=cross_selling_data ev=event is_cross_selling=True %}
</div>
</details>
{% endif %}

View File

@@ -8,7 +8,11 @@
{% for tup in items_by_category %}{% with category=tup.0 items=tup.1 form_prefix=tup.2 %}
{% if category %}
<section aria-labelledby="{{ form_prefix }}category-{{ category.id }}"{% if category.description %} aria-describedby="{{ form_prefix }}category-info-{{ category.id }}"{% endif %}>
<h3 id="{{ form_prefix }}category-{{ category.id }}">{{ category.name }}</h3>
<h3 id="{{ form_prefix }}category-{{ category.id }}">{{ category.name }}
{% if is_cross_selling and category.cross_selling_condition == 'discounts' %}
<small><span class="label label-success"><i class="fa fa-star"></i> {% trans "Your order qualifies for a discount" %}</span></small>
{% endif %}
</h3>
{% if category.description %}
<div id="{{ form_prefix }}category-info-{{ category.id }}">{{ category.description|localize|rich_text }}</div>
{% endif %}