Improves the error message when per_user_limit on category is breached.

Fixes #80
This commit is contained in:
Christopher Neugebauer 2016-09-13 13:33:20 +10:00
parent 1c239c361f
commit 2658c2ccde

View file

@ -205,7 +205,8 @@ class CartController(object):
to_add = sum(i[1] for i in by_cat[category])
if to_add > limit:
message = "You may only have %d items in category: %s" % (
message_base = "You may only add %d items from category: %s"
message = message_base % (
limit, category.name,
)
for product, quantity in by_cat[category]: