Posted by ertyu on November 9, 2009 at 9:39pm
16 followers
| Project: | Signup Integration for Ubercart |
| Version: | 6.x-1.0-beta5 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
Issue Summary
I've run into a potential issue for how I intend to use the signup integration. I want to use it to register people for an event. The problem case that occurred to me is for groups that register, such as a family. There would be multiple registrations purchased by one person, but they aren't going to have a unique email address for each registrant to create an account. I would still like to capture each attendee individually for things like name tags and attendance counts. Not sure how to go about doing this.
Comments
#1
I am trying to do the exact same thing... features to be able to do this would be amazing.
#2
The problem with this is that it goes against how the signup module works...
I figured out that our needs would require something much more simple so I created a module... all it does is add a new pane to the ubercart checkout where you can fill in some extra information for each attendee.
I'll be done with the code in a day or so... let me know if you want it!
#3
jackread,
the code would be great if you have it please!
Thanks.
#4
"The problem with this is that it goes against how the signup module works... "
I'm not sure that's the case. There are a couple of ways of working with signup.module to make this kind of a feature work. We can generate accounts for the other users without email addresses, or folks can work on #349228: Signup anonymous users without email. I think the biggest challenge for uc_signup would be smoothly integrating this into the UI while preserving current use cases.
#5
@jackread:
I would love the code, too, please. Thanks.
#6
@ezra-g - you're absolutely right... I wasn't really aware of this at the time but this is potentially the best way to go long term.
However, as I'm sure you will understand, I was working to a deadline and this seemed like the easiest way to get the job done given the time frame. The code I wrote is *EDIT* attached in a comment lower down...
#7
subscribe
#8
I haven't had a chance to read your code, @jackread. Since Drupal's Profile module requires a unique account, and therefore email address, one way to get around this is to generate accounts with emails that are based on the original email, so if I register as bill@example.com then the system asks for the contact information of all 3 of Bill's guests and creates Drupal user accounts with addresses like bill+1@example.com. In keeping with the primary goal of this module, we should make a process like this easy to use (and hide when it is disabled) :).
Changing the issue title for clarity, at least for me. Feel free to suggest a better title ;).
#9
I made a patch that adds this functionality.
There is an admin configuration option where you can select whether email addresses are required for all attendees (it defaults to Yes, so as to not disrupt anything else in the module). If marked as No, only the email of the person signing up will be required.
Any email field that's left empty will be internally populated by the emails as ezra-g specified (bill+1@example.com, bill+2@example.com, etc.). On the checkout pane, those emails are replaced by Guest 1, Guest 2, etc., and user accounts are created accordingly (usernames bill1, bill2, etc.).
I'm still figuring out a way of hiding the account creation messages for those guest accounts. One potential problem would be having our friend Bill signup for two events, with a different guest for each of them: they would both be represented by the same user on the system (both would be bill+1@example.com, username bill1).
#10
Hi, I've been trying to apply this patch for a few hours, using gnuwin32 at first and now with cygwin. I'm afraid I am getting failure errors, and this is the rej file.
I'd appreciate any advice here.
Hunk #5 failed at 684
***************
*** 653,658 ****
if (empty($account->uid)) {
$form_state['values']['mail'] = $mail;
$namenew = preg_replace('/@.*$/', '', $mail);
// From the email registration module:
if (db_result(db_query("SELECT count(*) FROM {users} WHERE LOWER(name) = LOWER('%s')", $namenew)) > 0) {
// Find the next number available to append to the name
--- 684,690 ----
if (empty($account->uid)) {
$form_state['values']['mail'] = $mail;
$namenew = preg_replace('/@.*$/', '', $mail);
+ $namenew = str_replace('+', '', $namenew);
// From the email registration module:
if (db_result(db_query("SELECT count(*) FROM {users} WHERE LOWER(name) = LOWER('%s')", $namenew)) > 0) {
// Find the next number available to append to the name
#11
@jackread : Excellent base module to begin with. Very easy to modify and works well out of the box. Its good just the way it is as it's very modifiable for php developers and easy to read. I used this and modified it rather than using signup/uc_signup because lets face it, 5693874653757436 users with a 0.00000000000000000000000004% login rate is a bit ridiculous :) Just because something exists, doesnt always mean it should be used and signup/uc_signup are a good example of that if you are interested in keeping performance as high as possible :) Not to mention it had 0 bugs which meant a faster deployment for me anyways. Less bells/whistles == better almost every time :)
#12
thanks @crystaldawn
i've actually started work on something similar to this completely outside of ubercart using a generic payments framework that I'm building.
#13
heres the code I referred to... I had to take it down from my old website.
#14
@pstead,
I'm having the same problem with the patch. Hunk #5 keeps failing at 684.
Did you manage to get it working?
#15
@49 digital No, it's beyond my technical knowledge, and as yet I still haven't found a solution to fix the patch.
#16
@jackread Thanks for the uc_attendees module. Looks good. However, when I try to purchase more than one place at an event, I am still required to input an email address for each seperate attendee.
UPDATE: Looks like I needed to disable signup for the event. This works independently.
#17
I created a new patch to work with the latest release. The part that was failing might not be needed anymore, since ubercart should now be handling it, but I included it as a safety measure since it doesn't hurt. Please test it and let me know if it has any other problems.
#18
I can confirm that @vkareh's patch works like a dream with uc_signup 6.x-1.0 beta5.
I'm still amazed by the generosity of people on these forums. Thanks @vkareh for all your help.
#19
Yes I can confirm the patch at #17 works - many thanks to @vkareh for that!
#20
I've come across a few issues after applying @vkarehs patch.
I have a repeat event for children (soccer coaching courses).
The person who registers will be a parent and will not be attending the event.
I have added profile fields which require completion at user registration - Child Name, age etc.
The parent often wants to signup another child. In the UK at least, children rarely have email addresses, and @vkareh's patch lets the user add a guest without email.
With @vkareh's patch everything works fine the first time.
However, next year when the parent logs in to the site, they will receive the message:
"we already have your details" (i.e. the details of the child you signed up last year)
However, the parent may now be signing up a different child, and their "Child Name" profile field is now wrong.
There is also an issue with the creation of a "Guest 1" account.
Maybe the parent will pay for a different child for the next course.
The "User+1" system-generated user account already exists with another child's details in its profile fields.
Does anyone have any ideas how I can build the following ?
Parent signs-up up to 4 children.
Payment method is paypal or cash/cheque.
Each child's details are submitted (name, age, medical condition etc)
A discount is offered for booking more than one child (rules out signup_pay)
#21
hmm I wonder if storing the childs information in profile fields is the best way. sounds like you need to store all the information outside of users account.
the module I posted above does this and should give you a framework and a guide as to how this should be accomplished. it'l definitely need some love before its ready for a production site.
#22
I agree with you Jack - I came across a few other issues with a profile-based signup that uc_signup uses. It's particularly problematic for repeat events, when users are booking places for their guests/family.
For example, uc_signup would store dietary requirements in the user profile, but if those requirements change, you would be relying on the user to amend their site profile for each event. I'm not sure that many would do that. If you are booking for a colleague, you would be even less likely to amend their information. This is particularly crucial issue when you are requesting medical information from each user.
Another major point is the amount of information you need to request from a new user as soon as they create a new account on the site. I don't think people would be ready to submit such personal information until they are further down the line of booking event places. User-name and email address is all you should be requesting on account creation.
I think that extra user info needs to be requested for each and every booking outside of user profile information. Your uc_attendees module is a great start - ideally it would include signup functionality for event admin. Or signup would need a non-profile/email address based approach to attendee management.
#23
Nice patch, this is almost there for me.
My situation is a Parent will sign up their kid for the event and only the Kid will be attending. Any idea what I can do to make it so that it doesn't require the first attendee to be the person signing up?
#24
For the problem in #20, pstead, maybe you can set a Trigger/Action or Rule that deletes guest accounts after the event is past.
This might not be relevant for this project, but I did work on a website where we used the Subuser module to have Parents create Kid accounts. The Subuser module allows the Parent to essentially administer their own Kids' accounts, so they could sign them up for events as if the Kid themselves were signing up.
#25
Subscribing...
#26
subscribing
#27
See #18 on #941920: Signup users that will not have an email address -- we've put some work into a specific implementation of this, and have uncovered some substantial use cases that probably need more discussion before there's a good fix...
Mostly what pstead identified in #20, sounds like we took a similar approach...
#28
this is excellent progress... although it might take a bit more to implement, this should be configurable per node+signup not just globally.
#29
Same issue... patch did not fix it for me. Subscribing.
#30
Hi guys,
Does anyone know how can I find the same module (uc_attendees) for Ubercart 3.0 in Drupal 7 ?
Any help would be really appreciated :)