Currently uc_signup observes the signup limit by validating the qty of items as the cart contents are updated, and by stopping order submission if signup capacity is reached. It should also observe the $node->signup_status value when an event has been marked as closed.

CommentFileSizeAuthor
#4 520190.diff7.43 KBezra-g
#2 uc_signup_SIGNUP_SCHED_FIX.patch3.23 KBBillyMG

Comments

ezra-g’s picture

For the record, it now prevents people from adding events to their cart when signups are closed. So, this is likely to be a somewhat uncommon but nonetheless important situation to handle.

BillyMG’s picture

StatusFileSize
new3.23 KB

I tried rolling up a patch for this one to do what was suggested. This checks against the time set in the setup for the Signup module to say that you can't buy an item because of time, and another one just if the item is closed for any other reason.

ezra-g’s picture

Status: Active » Needs review

Thanks for the patch. Marking as needs review.

ezra-g’s picture

StatusFileSize
new7.43 KB

Thanks for taking the time to submit a patch. Your patch contained several coding standards errors, including tabs for indentation instead of spaces and conditional styling. Please keep in mind http://drupal.org/coding-standards when rolling future patches ;).

I decided to take another approach and refactor the code flow for checking whether a signup can be purchased for a particular node. Instead of having multiple functions to do different types of validation on a node, I created a single function that does the validation and provides the appropriate message if validation fails. A patch is attached.

ezra-g’s picture

Status: Needs review » Fixed

This is now committed.

BillyMG’s picture

Thank you for pointing me to the coding standards, as I actually was not aware of them. I'm glad I was able to at least get the ball rolling here, and I'm glad to see your better method in place and committed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.