Use exclusive checkboxes for addon items with max_count == 1 and !multi_allowed

This commit is contained in:
Mira Weller
2024-03-08 19:34:54 +01:00
parent ef3420f761
commit eae2d04884
@@ -333,6 +333,9 @@
{% elif item.initial %}
checked="checked"
{% endif %}
{% if c.max_count == 1 %}
data-exclusive-prefix="cp_{{ form.pos.pk }}_item_"
{% endif %}
name="cp_{{ form.pos.pk }}_item_{{ item.id }}"
id="cp_{{ form.pos.pk }}_item_{{ item.id }}"
aria-label="{% blocktrans with item=item.name %}Add {{ item }} to cart{% endblocktrans %}"