If you chose the option “Display a textfield quantity widget on the add to cart form.” You can sometimes add a quantity that’s larger then the stock level.
The code currently has two separate paths:
One is for multiple products per display, I hope I fixed that one in http://drupal.org/node/1182384#comment-4638436
The second is when you only have one product or are using attributes to select your product like colour and size, and that’s the one that needs fixing.
so:
Stock: 1
product X quentity: 50 add to cart
=you have 50 x items in your cart
I am hoping to get a chance to look at this at some stage as I am beginning to be familiar with that code
Comments
Comment #1
guy_schneerson commentedPatch to add quantity validation for the above issue
Comment #2
rfayI ran into this yesterday. You're doing awesome work!
Would you consider comaintaining this module?
Comment #3
guy_schneerson commentedYes would love to. I also have some ideas about what we could do with it in the future, I think it can be refactored to be rules based.
I am happy with working with the code, the only thing is I am not experienced with is the mechanics and logistics of maintaining/co-maintaining but am happy to learn.
Comment #4
rfayThanks - you now have commit and project access!
There are some guidelines at http://drupal.org/node/363367
What I ask:
1. In general, work transparently in the issue queue, even if nobody else comments. But give them a chance to, and make it obvious what you're doing.
2. Subscribe to all issues, so you get notified early about problems.
3. Introduce fixes, not bugs :-)
Yay! Thanks so much.
Comment #5
guy_schneerson commentedWill spend some time tomorrow or Monday getting familiar with things
Comment #6
rfayThis patch seems to be broken - can you reroll please
Comment #7
guy_schneerson commentedSorry will do
Comment #8
guy_schneerson commentedThis should work fine
I created two new git repositories one for developing and creating the patches and one for testing and committing the patches. Also got a site to test the patched file on
Please let me know if this patch is ok.
I will go over all my other patches and recreate them using this pattern to make sure they are ok.
Comment #9
rfayIt does apply fine - thanks! Hope to be able to test it today.
Comment #10
rfayComment #11
guy_schneerson commentedtested it on commerce rc1 - and works fine for me
Comment #12
guy_schneerson commentedcommited: cbf94ba