When a user adds an item to their cart, a satchmo_cart_add_verify
signal is sent, and the addition is prohibited if any listener raises
a CartAddProhibited exception.

However, when an item's quantity is changed, no corresponding check is
done.

This presents an obstacle for certain types of modifications.  For
instance, if I wanted to create a product that requires a minimum
purchase of 5 items, I can prevent the user from adding 3 to the
cart.  But I can't prevent them from adding 5 to the cart and then
changing the quantity to 3.

To remedy this, I propose the creation of a satchmo_cart_change_verify
signal with the same signature as satchmo_cart_add_verify, and calling
it from Line 101 (and possibly also from Line 93) of satchmo_store/
shop/views/cart.py (in _set_quantity()).

I'll be implementing this myself in a branch, but thought it might be
useful to the broader community.  Does it sound generally useful?

cheers,
-Nan

-- 
You received this message because you are subscribed to the Google Groups 
"Satchmo users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/satchmo-users?hl=en.

Reply via email to