Improves the error message when per_user_limit on category is breached.
Fixes #80
This commit is contained in:
parent
1c239c361f
commit
2658c2ccde
1 changed files with 2 additions and 1 deletions
|
@ -205,7 +205,8 @@ class CartController(object):
|
||||||
to_add = sum(i[1] for i in by_cat[category])
|
to_add = sum(i[1] for i in by_cat[category])
|
||||||
|
|
||||||
if to_add > limit:
|
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,
|
limit, category.name,
|
||||||
)
|
)
|
||||||
for product, quantity in by_cat[category]:
|
for product, quantity in by_cat[category]:
|
||||||
|
|
Loading…
Reference in a new issue