forked from CGM_Public/pretix_original
Added voucher redemption
This commit is contained in:
@@ -7,6 +7,9 @@
|
||||
{% if line.variation %}
|
||||
– {{ line.variation }}
|
||||
{% endif %}
|
||||
{% if line.voucher %}
|
||||
<br /><span class="fa fa-ticket"></span> {% trans "Voucher code used:" %} {{ line.voucher.code }}
|
||||
{% endif %}
|
||||
{% if line.has_questions %}
|
||||
<dl>
|
||||
{% if line.item.admission and event.settings.attendee_names_asked%}
|
||||
|
||||
@@ -6,32 +6,32 @@
|
||||
|
||||
{% block content %}
|
||||
{% if cart.positions %}
|
||||
<div class="panel panel-primary cart">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">{% trans "Your cart" %}</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
{% include "pretixpresale/event/fragment_cart.html" with cart=cart event=request.event editable=True %}
|
||||
<div class="row-fluid">
|
||||
<div class="col-md-6 col-xs-12">
|
||||
{% if cart.minutes_left > 0 %}
|
||||
<em>{% blocktrans trimmed with minutes=cart.minutes_left %}
|
||||
The items in your cart are reserved for you for {{ minutes }} minutes.
|
||||
{% endblocktrans %}</em>
|
||||
{% else %}
|
||||
<em>{% trans "The items in your cart are no longer reserved for you." %}</em>
|
||||
{% endif %}
|
||||
<div class="panel panel-primary cart">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">{% trans "Your cart" %}</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
{% include "pretixpresale/event/fragment_cart.html" with cart=cart event=request.event editable=True %}
|
||||
<div class="row-fluid">
|
||||
<div class="col-md-6 col-xs-12">
|
||||
{% if cart.minutes_left > 0 %}
|
||||
<em>{% blocktrans trimmed with minutes=cart.minutes_left %}
|
||||
The items in your cart are reserved for you for {{ minutes }} minutes.
|
||||
{% endblocktrans %}</em>
|
||||
{% else %}
|
||||
<em>{% trans "The items in your cart are no longer reserved for you." %}</em>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="col-md-4 col-md-offset-2 col-xs-12">
|
||||
<a class="btn btn-block btn-primary btn-lg"
|
||||
href="{% eventurl request.event "presale:event.checkout.start" %}">
|
||||
<i class="fa fa-shopping-cart"></i> {% trans "Proceed with checkout" %}
|
||||
</a>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
<div class="col-md-4 col-md-offset-2 col-xs-12">
|
||||
<a class="btn btn-block btn-primary btn-lg"
|
||||
href="{% eventurl request.event "presale:event.checkout.start" %}">
|
||||
<i class="fa fa-shopping-cart"></i> {% trans "Proceed with checkout" %}
|
||||
</a>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if not event.presale_is_running %}
|
||||
<div class="alert alert-info">
|
||||
@@ -67,7 +67,7 @@
|
||||
data-title="{{ item.name }}"
|
||||
data-lightbox="{{ item.id }}">
|
||||
<img src="{{ item.picture|thumbnail_url:'productlist' }}"
|
||||
alt="{{ item.name }}" />
|
||||
alt="{{ item.name }}"/>
|
||||
</a>
|
||||
{% endif %}
|
||||
<a href="javascript:void(0);" data-toggle="variations">
|
||||
@@ -100,7 +100,8 @@
|
||||
<div class="col-md-2 col-xs-6 price">
|
||||
{{ event.currency }} {{ var.price|floatformat:2 }}
|
||||
{% if item.tax_rate %}
|
||||
<br /><small>{% blocktrans trimmed with rate=item.tax_rate %}
|
||||
<br/>
|
||||
<small>{% blocktrans trimmed with rate=item.tax_rate %}
|
||||
incl. {{ rate }}% taxes
|
||||
{% endblocktrans %}</small>
|
||||
{% endif %}
|
||||
@@ -127,7 +128,7 @@
|
||||
data-title="{{ item.name }}"
|
||||
data-lightbox="{{ item.id }}">
|
||||
<img src="{{ item.picture|thumbnail_url:'productlist' }}"
|
||||
alt="{{ item.name }}" />
|
||||
alt="{{ item.name }}"/>
|
||||
</a>
|
||||
{% endif %}
|
||||
<strong>{{ item.name }}</strong>
|
||||
@@ -136,9 +137,10 @@
|
||||
<div class="col-md-2 col-xs-6 price">
|
||||
{{ event.currency }} {{ item.price|floatformat:2 }}
|
||||
{% if item.tax_rate %}
|
||||
<br /><small>{% blocktrans trimmed with rate=item.tax_rate %}
|
||||
incl. {{ rate }}% taxes
|
||||
{% endblocktrans %}</small>
|
||||
<br/>
|
||||
<small>{% blocktrans trimmed with rate=item.tax_rate %}
|
||||
incl. {{ rate }}% taxes
|
||||
{% endblocktrans %}</small>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if item.cached_availability.0 == 100 %}
|
||||
@@ -156,8 +158,29 @@
|
||||
</section>
|
||||
{% endfor %}
|
||||
{% if event.presale_is_running %}
|
||||
{% if vouchers_exist %}
|
||||
<div class="row-fluid voucher-row">
|
||||
<div class="col-md-4 col-md-offset-8 col-xs-12">
|
||||
<div id="voucher-box">
|
||||
<label for="voucher">{% trans "Redeem a voucher" %}</label>
|
||||
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><i class="fa fa-ticket fa-fw"></i></span>
|
||||
<input type="text" class="form-control" name="voucher" id="voucher"
|
||||
placeholder="{% trans "Voucher code" %}">
|
||||
</div>
|
||||
</div>
|
||||
<div id="voucher-toggle">
|
||||
<a href="javascript:void(0);">
|
||||
<span class="fa fa-ticket"></span> Redeem a voucher
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="row-fluid checkout-button-row">
|
||||
<div class="col-md-4 col-md-offset-8">
|
||||
<div class="col-md-4 col-md-offset-8 col-xs-12">
|
||||
<button class="btn btn-block btn-primary btn-lg" type="submit">
|
||||
<i class="fa fa-shopping-cart"></i> {% trans "Add to cart" %}
|
||||
</button>
|
||||
|
||||
Reference in New Issue
Block a user