mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-22 06:03:20 +00:00
Small fix on counters
This commit is contained in:
parent
f600e174b1
commit
4498877283
@ -154,7 +154,8 @@ class CounterClick(DetailView):
|
|||||||
|
|
||||||
def add_product(self, request, q = 1, p=None):
|
def add_product(self, request, q = 1, p=None):
|
||||||
""" Add a product to the basket """
|
""" Add a product to the basket """
|
||||||
pid = p or str(request.POST['product_id'])
|
pid = p or request.POST['product_id']
|
||||||
|
pid = str(pid)
|
||||||
price = self.get_price(pid)
|
price = self.get_price(pid)
|
||||||
total = self.sum_basket(request)
|
total = self.sum_basket(request)
|
||||||
if self.customer.amount < (total + q*float(price)):
|
if self.customer.amount < (total + q*float(price)):
|
||||||
|
Loading…
Reference in New Issue
Block a user