If you're using a module such as Ubercart Donation Products, which allows the user to select a price for their product, the uc_signup module doesn't completely work.
In my custom module, users can sign up multiple people as well as choose a different price for each person if they choose. (Client's requirements.) This results in multiple entries to the uc_order_products table for a single nid. uc_signup doesn't recognize that there's more than one, since it's assuming a one to one relationship between uc_signup_log and uc_order_products, but the relationship could be one to many. Using order_product_id would be more accurate.
Does anyone know of a reason why uc_signup can't use uc_product_id instead of or along with oid as a foreign key in uc_signup_log? I could work on the necessary changes if this is something that those of you most familiar with this module think should be added/changed.
Comments
Comment #1
anschauung commentedNormally the uid and sid keep that under control ... are you having the same user signing up for the same node multiple times?
Comment #2
ezra-g commentedAdding order_product_id seems reasonable to me.
Comment #3
cwithout commentedanschauung, no, I'm not having a single user be able to sign up for a single node more than once.
I'd like you to be right (since it'd require no work). I looked over the schema again, but I don't see that there's sufficient data to handle instances where a single product can have multiple prices (hence multiple entries in the uc_order_products table).
What I have implemented is functionality on the admin side that doesn't exist in the current module, like displaying who is signed up for each node on the invoice and adding a pane to the order edit screen that lets admins select who to sign up for nodes in the order.
Basically, I'm trying to get the sid and uid from the signup_log table (or multiple sid and uid's) given an order and product.
I just can't see a way to pull out the data so that I can get info such as which user paid $5 for the class and which user paid $7 when they're on the same order.
So essentially I have a query like this:
When I would like to be able to query similar to this:
Anyone please correct me if I'm wrong.
ezra, since it seems fine to you, I'll take a stab at making a patch for that. I'm a PHP developer who's only been doing Drupal for about 6 months. I haven't yet well versed myself with the Drupal coding standards or the process of releasing patches into the wild, but it's probably about time I get that down.
Comment #4
ezra-g commented@changes, http://drupal.org/patch/create might help if you haven't seen it already. Thanks!
Comment #5
cwithout commentedThis turned out not to be possible in the d6 version because of the point at which signups are added in the checkout process.