3 replies [Last post]
PaulW's picture
Offline
Joined: 05/23/2008
Juice: 148
Was this information Helpful?

I am developing a website for The Sandlot Society (www.sandlotsociety.com). It is a baseball-oriented group focusing primarily little league players. Since most of the members are under age, we will require that a parent register with the web site and make any purchases, schedule events, etc on behalf of their children.

My plan is to create events for which the parent does not "sign up" himself for, but rather purchase as a seat or "ticket" for his/her children. Some parents have more than one child that may attend an event. When the parent purchases an event, he may buy one or more for his children. Now comes my problem: We need to collect the names of the children who will be attending the event. Think of it as selling "tickets" to an event than are person-specific.

I'm imagining that when a parent fills in the quantity of "tickets" to purchase, he will be presented with a space to fill in the names of his/her children that will be attending. If he purchases three "tickets", the he would have to enter three names for the attendees. This would occur before the "tickets" are added to the shopping cart.

I also imagine adding a table to the MySQL database something like 'event_attendees' that would have a record for each name attending the event linked to the event by the nid for that event.

I've explored the eCommerce modules a bit and do not find anything that fits my needs. Before I spend considerable time exploring Ubercart I would appreciate some feedback from you experts regarding whether the concept I have in mind is doable via Ubercart straight "out of the box" or whether the basic elements are there and I would need some custom development work to make it happen.

I also am open to suggestions regarding alternative ways to address the issue of parents buying events for their children and specifying the child's name as a part of the purchase process.

Thanks in advance . . .

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Collecting attendee information when selling tickets

Paul, I'm curious if you think our normal attributes system can work here... If you create a ticket product, give it an attribute called "Attendee's name" or something similar, and don't create any options for it, it will display as a textfield on the product page. Then each ticket in the shopping cart will remain unique, as long as a unique name is put in. This won't solve all of your implementation, but it seems like a logical start. Check out the attributes docs for a little more info.

PaulW's picture
Offline
Joined: 05/23/2008
Juice: 148
Ryan, Thanks for your reply.

Ryan,

Thanks for your reply. Based on the following documentation snippet, it looks like a text attribute will work (sort of).

Quote:

Many Ubercart users have taken advantage of our attribute system to let customers enter custom messages or text for a specific field. If you simply need a text field where a customer can enter, for example, a name to be engraved on a plaque, follow the above steps for creating an attribute but don't create any options for it. Any attribute assigned to a product with no options enabled will be displayed in the add to cart form as a text field where the customer can enter their own message. There are limits to this method in number of characters allowed and the lack of validation, so you may end up needing to have a custom module made if you need to change either one of these things.

I would need the customer to enter multiple names in one text field and then I would have to sort it out after receiveing the order. What I envisioned was a number of text fields corresponding to the number of tickest, so that if three tickets were being purchased, the buyer would be confronted with three fields to enter the names of the thre individual attendees.

The text attribute field is not exactly what I want, but it's better than nothing.

Again, thanks for your suggestion.

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Ryan, Thanks for your reply.

No prob, and it's entirely possible w/ a custom module to add any sort of validation on the text that gets entered. This would be done using hook_form_alter() on the add to cart form to add a custom validate handler to the form. This requires a little bit o' Drupal coding mojo, but kudos to Drupal's Forms API for making it possible.