My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 154: Negative quantities may be entered
  Back to list
Status:  Fixed
Owner:  ----
Closed:  Jan 2009


 
Reported by ceager, Dec 6, 2008
What steps will reproduce the problem?
1. Navigate to a product page
2. Enter a negative quantity under "How many do you want?"
3. Click "Add to Cart"

What is the expected output? What do you see instead?
A negative quantity should be subtracted from the item's current quantity in the cart, and a 
negative number of units should never be saved in the cart.

In the current version, entering a negative number results in a negative unit count, and therefore 
a negative cart total.

What version of the product are you using? On what operating system?
r163

substruct_item_quantity_patch
2.8 KB   View   Download
Dec 6, 2008
#1 ceager
While adding a check for a negative quantity—and calling remove_product if one is entered—should be enough, I 
think it makes sense to validate that an order_line_item's quantity is a positive integer.
Dec 8, 2008
#2 ceager
I found one small but important error in my patch. The patch attached to this comment
should be reviewed.
issue_154_patch
2.8 KB   View   Download
Jan 25, 2009
Project Member #3 subim...@gmail.com
Fixed r175

Thanks for the test code!
Status: Fixed

Powered by Google Project Hosting