mirror of
https://github.com/ae-utbm/sith.git
synced 2026-10-15 15:09:22 +00:00
Add support for subscription typed products in eboutic
This commit is contained in:
1 parent
dfb13c37f2
commit
325da79e45
9 files changed
+175
-133
No files matched your search
+6
-3
@@ -212,9 +212,12 @@ class CounterClick(DetailView):
|
||||
total = self.sum_basket(request)
|
||||
product = self.get_product(pid)
|
||||
can_buy = False
|
||||
for g in product.buying_groups.all():
|
||||
if self.customer.user.is_in_group(g.name):
|
||||
can_buy = True
|
||||
if not product.buying_groups.exists():
|
||||
can_buy = True
|
||||
else:
|
||||
for g in product.buying_groups.all():
|
||||
if self.customer.user.is_in_group(g.name):
|
||||
can_buy = True
|
||||
if not can_buy:
|
||||
request.session['not_allowed'] = True
|
||||
return False
|
||||
|
||||
Reference in new issue
Block a user