Allow to redirect to checkout directly after adding a product to the cart

This commit is contained in:
Raphael Michel
2019-03-27 16:45:15 +01:00
parent d8a7de8b23
commit 697cdfd5c9
7 changed files with 20 additions and 3 deletions

View File

@@ -425,6 +425,11 @@ class RedeemView(NoSearchIndexViewMixin, EventViewMixin, TemplateView):
# Cookies are not supported! Lets just make the form open in a new tab
)
if self.request.event.settings.redirect_to_checkout_directly:
context['cart_redirect'] = eventreverse(self.request.event, 'presale:event.checkout.start')
else:
context['cart_redirect'] = eventreverse(self.request.event, 'presale:event.index')
return context
def dispatch(self, request, *args, **kwargs):