mirror of
https://github.com/pretix/pretix.git
synced 2026-05-10 16:04:02 +00:00
Allow to pass user data to the widget (#1095)
- [x] Logic - [x] Tests - [x] Docs - [x] find a way to integrate with tracking
This commit is contained in:
@@ -189,6 +189,9 @@ class EventIndex(EventViewMixin, CartMixin, TemplateView):
|
||||
return redirect(eventreverse(request.event, 'presale:event.index', kwargs=kwargs) + '?require_cookie=true&cart_id={}'.format(
|
||||
request.GET.get('take_cart_id')
|
||||
))
|
||||
elif request.GET.get('iframe', '') == '1' and len(self.request.GET.get('widget_data', '{}')) > 3:
|
||||
# We've been passed data from a widget, we need to create a cart session to store it.
|
||||
get_or_create_cart_id(request)
|
||||
elif 'require_cookie' in request.GET and settings.SESSION_COOKIE_NAME not in request.COOKIES:
|
||||
# Cookies are in fact not supported
|
||||
r = render(request, 'pretixpresale/event/cookies.html', {
|
||||
|
||||
Reference in New Issue
Block a user