Voucher: Add min_usages parameter (#2853)

This commit is contained in:
Raphael Michel
2022-10-20 18:07:24 +02:00
committed by GitHub
parent ba2d908a89
commit d69d70cfb1
13 changed files with 233 additions and 8 deletions

View File

@@ -410,7 +410,16 @@
{% eventsignal event "pretix.presale.signals.voucher_redeem_info" voucher=voucher %}
{% if event.presale_is_running and options > 0 %}
<div class="row checkout-button-row">
<div class="col-md-4 col-md-offset-8 col-xs-12">
<div class="col-md-4 col-md-offset-8 col-xs-12 text-center">
{% if voucher.min_usages > 1 %}
<p class="text-muted">
<small>
{% blocktrans trimmed with number=voucher.min_usages %}
You need to select at least {{ number }} products.
{% endblocktrans %}
</small>
</p>
{% endif %}
<button class="btn btn-block btn-primary btn-lg" id="btn-add-to-cart" type="submit">
{% if request.event.settings.redirect_to_checkout_directly %}
{% if allfree %}