forked from CGM_Public/pretix_original
Button text change if addons are present
This commit is contained in:
@@ -34,7 +34,12 @@
|
||||
<div class="col-md-4 col-md-offset-4 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" %}
|
||||
{% if has_addon_choices %}
|
||||
<i class="fa fa-shopping-cart"></i> {% trans "Continue" %}
|
||||
</a>
|
||||
{% else %}
|
||||
<i class="fa fa-shopping-cart"></i> {% trans "Proceed with checkout" %}
|
||||
{% endif %}
|
||||
</a>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
|
||||
@@ -109,7 +109,7 @@ class CartMixin:
|
||||
'payment_fee_tax_rate': payment_fee_tax_rate,
|
||||
'answers': answers,
|
||||
'minutes_left': minutes_left,
|
||||
'first_expiry': first_expiry
|
||||
'first_expiry': first_expiry,
|
||||
}
|
||||
|
||||
def get_payment_fee(self, total):
|
||||
|
||||
@@ -21,7 +21,7 @@ from pytz import timezone
|
||||
from pretix.base.models import ItemVariation
|
||||
from pretix.multidomain.urlreverse import eventreverse
|
||||
|
||||
from . import CartMixin, EventViewMixin
|
||||
from . import CartMixin, EventViewMixin, get_cart
|
||||
|
||||
SessionStore = import_module(settings.SESSION_ENGINE).SessionStore
|
||||
|
||||
@@ -108,6 +108,7 @@ class EventIndex(EventViewMixin, CartMixin, TemplateView):
|
||||
context['vouchers_exist'] = vouchers_exist
|
||||
|
||||
context['cart'] = self.get_cart()
|
||||
context['has_addon_choices'] = get_cart(self.request).filter(item__addons__isnull=False).exists()
|
||||
|
||||
context['frontpage_text'] = str(self.request.event.settings.frontpage_text)
|
||||
return context
|
||||
|
||||
Reference in New Issue
Block a user