Support

Home Forums Event Espresso Premium Ticket Extras

Ticket Extras

Posted: March 6, 2018 at 8:38 am


msaEEticket8

March 6, 2018 at 8:38 am

I am setting up a registration for a conference. Attendees have to option to bring their families to the awards banquet at the conference at an extra cost. And attend a Baseball game. I am wanting to add options to the attendee ticket that will allow for those.

I found the example from “https://eventespresso.com/topic/ticket-add-on/” and think I have a grip on it, but I don’t need the “Size” option part. Just a quantity of extra tickets needed.

As follows:
$products = array(
0 => array(
‘product_question_id’ => 51,
‘product_option_details’
‘name’ => ‘Extra Banquet Ticket – Adult (12+)’,
‘code’ => ‘ExtraBanquetTicket-Adult’,
‘description’ => ‘Extra Banquet Ticket – Adult (12+)’,
‘unit_price’ => 35.00,
‘taxable’ => false,
),

0 => array(
‘product_question_id’ => 52,
‘product_option_details’
‘name’ => ‘Extra Banquet Ticket – Child (5-11)’,
‘code’ => ‘ExtraBanquetTicket-Child’,
‘description’ => ‘Extra Banquet Ticket – Adult (5-11)’,
‘unit_price’ => 15.00,
‘taxable’ => false,
),

0 => array(
‘product_question_id’ => 53,
‘product_option_details’
‘name’ => ‘Night at the Ballpark Ticket’,
‘code’ => ‘NightAtTheBallparkTicket’,
‘description’ => ‘Night at the Ballpark Ticket’,
‘unit_price’ => 0.00,
‘taxable’ => false,
),
);

Can you confirm that I have that correct? formatting and code wise?

Also I am not sure where to put the “AHEE__bc_ee_add_product_surcharge__add_product__product_added” to trigger the add ons. The comments say “Added Anywhere in the system code” but could you be more specific, which file would be best, for example.

Or is it triggered from the question groups being added to the registration questions.


Tony

  • Support Staff

March 6, 2018 at 9:38 am

Hi there,

Before going through trying to add custom code, could you not just use additional tickets for the above?

If you don’t require information for the additional registrations the users can just select X amount each ticket type they want, provide a single set of registration details and pay all at once?

Does that not work for your set up?


msaEEticket8

March 6, 2018 at 10:08 am

That would work, but it creates a lot of confusion on the attendee info side. Doing it that way would make the attendee fill out Personal info (name address email phone), and company Info (name address phone company details) for each extra banquet ticket and ball game ticket. Which wouldn’t be too bad using the “Use attendee 1” check box, but what happens if a company wants to send 3 attendees each with a spouse and 2 kids. So you would have 3 attendee tickets to fill out, and then it would ask for info for 6 adult Banquets, 3 child banquests, and 12 ball game tickets. So 24 sets of information need to be filled out, with no easy way to associate banquet and game tickets to the 3 attendees.

That is what I am trying to avoid with my option. Each attendee fills out their info only once, and just indicates how many extra banquet and game tickets are needed (we don’t need names, personal info or company info for them). With no need to fill out form after form. That way we know Attend 1 needs 5 game tickets, and Attendee 2 only needs 2, for example.

Or is there a way to have different question groups for different tickets? That would be much easier, as we could just have them fill out Name only on Banquet and Game tickets.


Josh

  • Support Staff

March 6, 2018 at 11:15 am

Code-wise there’s at least one mistake with the array keys. The first array has a correct key, but the second array key is 1, then the third array key is 2 (they can’t all have 0 for the array key).

Formatting-wise it’s impossible to review the code as posted here because of the way the forum software changes 'into ‘. If you’re copying the code directly from Github the formatting should be fine.

Also I am not sure where to put the “AHEE__bc_ee_add_product_surcharge__add_product__product_added” to trigger the add ons. The comments say “Added Anywhere in the system code” but could you be more specific, which file would be best, for example.

If you’re starting from scratch, you’ll put all of the code into its own plugin. There are specific instructions on how to set up the plugin here:
https://eventespresso.com/wiki/create-site-specific-plugin-wordpress-site/


msaEEticket8

March 6, 2018 at 11:40 am

Fantastic. Code-wise is what I was looking for. Thanks for all the help. And for the nudge in the right direction from here. Cheers!

The support post ‘Ticket Extras’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso