Add clever handling of plus button in cart with voucher (#2893)

This commit is contained in:
Raphael Michel
2022-11-14 16:55:39 +01:00
committed by GitHub
parent 5b8228bea0
commit e32e7e2a50
4 changed files with 63 additions and 4 deletions

View File

@@ -267,6 +267,10 @@
data-asynctask-text="{% blocktrans with time=event.settings.reservation_time %}Once the items are in your cart, you will have {{ time }} minutes to complete your purchase.{% endblocktrans %}"
method="post" data-asynctask>
<input type="hidden" name="subevent" value="{{ line.subevent_id|default_if_none:"" }}" />
{% if line.voucher and not line.voucher.seat %}
<input type="hidden" name="_voucher_code" value="{{ line.voucher.code }}" />
<input type="hidden" name="_voucher_ignore_if_redeemed" value="on" />
{% endif %}
{% csrf_token %}
{% if line.variation %}
<input type="hidden" name="variation_{{ line.item.id }}_{{ line.variation.id }}"