There are 2 areas here that need better validation.
On events with a limited amount of open signup slots. Currently a user can run through the checkout process with more signups in the cart than available to the event.
Cause: There is validation to prevent this but it only counts the amount of signups being added to the cart. If there are signups already in the cart it will still pass validation.
To replicate:
- Create an event with 5 open signup slots.
- Add 4 signups to the cart.
- Add another 4 signups to the cart.
- Checkout.
- ??.
- Profit.
--
If a user adds an event to their cart and never checks out it can possibly sit there until expired. Expired/closed events within the cart cannot be removed and checkout cannot take place because it fails validation wrongly.
Cause: Validation doesn't allow the manipulation of closed events within the cart.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | uc_signup-better-validation-1708654-1.patch | 1.45 KB | smithmilner |
Comments
Comment #1
smithmilner commentedHere is a patch that fixes both issues for me.
Comment #2
scotwith1tHoly crap, your timing is impeccable. My only client (and likely my last, unless drastic improvements have been made to the D7 version) using signup module has been having clients complain about the stale cart issue for months and I haven't been able to help him with it for simple time constraint reasons. He brought it back up and I thought I'd check the issue queue one more time for a fix! :) I'm probably going to apply this and test it, but have to let my test event pass, recreate the error, apply the patch and hopefully finally satisfy the need here. Will check back in soon.
Comment #3
djdevinPerfect, this should also work if they set the quantity to 0, although not necessary since there is a remove button. Would be nice.
Comment #4
scotwith1tWorks for me on the expired items in cart issue, djdevin! Thanks so much. Never had the issue with the over the signup limits but did try to add more than available slots and could not, so I believe the patch works for both.