mirror of
https://github.com/pretix/pretix.git
synced 2026-05-09 15:54:03 +00:00
Allow to hide products that require membership (#2240)
Co-authored-by: Richard Schreiber <schreiber@rami.io>
This commit is contained in:
@@ -523,8 +523,18 @@ class RedeemView(NoSearchIndexViewMixin, EventViewMixin, CartMixin, TemplateView
|
||||
context['max_times'] = self.voucher.max_usages - self.voucher.redeemed
|
||||
|
||||
# Fetch all items
|
||||
items, display_add_to_cart = get_grouped_items(self.request.event, self.subevent,
|
||||
voucher=self.voucher, channel=self.request.sales_channel.identifier)
|
||||
items, display_add_to_cart = get_grouped_items(
|
||||
self.request.event,
|
||||
self.subevent,
|
||||
voucher=self.voucher,
|
||||
channel=self.request.sales_channel.identifier,
|
||||
memberships=(
|
||||
self.request.customer.usable_memberships(
|
||||
for_event=self.subevent or self.request.event,
|
||||
testmode=self.request.event.testmode
|
||||
) if getattr(self.request, 'customer', None) else None
|
||||
),
|
||||
)
|
||||
|
||||
# Calculate how many options the user still has. If there is only one option, we can
|
||||
# check the box right away ;)
|
||||
|
||||
Reference in New Issue
Block a user