Closed (fixed)
Project:
Signup Integration for Ubercart
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
15 Jul 2009 at 16:56 UTC
Updated:
21 Sep 2009 at 23:50 UTC
Jump to comment: Most recent file
Comments
Comment #1
ezra-g commentedFor 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.
Comment #2
BillyMG commentedI 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.
Comment #3
ezra-g commentedThanks for the patch. Marking as needs review.
Comment #4
ezra-g commentedThanks 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.
Comment #5
ezra-g commentedThis is now committed.
Comment #6
BillyMG commentedThank 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.