Support

Home Forums Event Espresso Premium Not Require Any Info for Additional Attendees

Not Require Any Info for Additional Attendees

Posted: October 9, 2013 at 1:14 pm

Viewing 13 reply threads


Dan Stover

October 9, 2013 at 1:14 pm

Hello EE team,
I am wondering if there is a way to not require any information from additional attendees at all whilst still having the Multiple Event Registration addon activated. As it is currently, I have “Require Additional Information?” set to “No”, but the attendee information entry form still requires a name and email at each different price level selected. The problem with this is that if I copy my information for all 4 price levels I select, I get 4 separate emails.

An alternative to this could be making the non-primary attendee questions optional so that I may hide them via CSS and not get an error if that would be possible.

Thanks in advance for any help,
-Dan


Sidney Harrell

October 9, 2013 at 1:28 pm

You can use a little jQuery to hide the “copy to” button and all the additional attendee forms and automatically “copy to” whenever one of the primary attendee form fields is changed. (https://github.com/sidharrell/eventespresso/blob/master/simplify-mer-attendee-page.js) And you can override the standard email function to send the email only to the primary attendee. (https://gist.github.com/sidharrell/5924285)


Dan Stover

October 9, 2013 at 2:08 pm

Hey Sidney, could you give me an idea of where in the plugin files the standard email function is located? And could you please tell me whether to replace the old function or simply paste after?

Thanks,
Dan


Sidney Harrell

October 9, 2013 at 4:51 pm

With the email function, you can just put that code from the gist into your theme’s functions.php file, or the custom_functions.php file if you have EE’s custom files add-on. It overrides the standard function, so you don’t have to worry about finding the standard one. (It’s in gateways/process_payments.php, if you are the curious type. But if you put the new code in there, then it will get overwritten the next time you update EE.) The jQuery for the simplified MER attendee form you can put in plugins/event-espresso/scripts/espresso_cart_functions.js (but it will get overwritten when you upgrade EE), you could copy multi-registration_page.php and multi-registration_page_display.php over to uploads/espresso/templates/ and put the js inline. (but you will have to watch for upgrades to those files in order to keep them up to date). Or you can use a plugin like custom-javascript-editor.


Dan Stover

October 10, 2013 at 8:35 am

Hey Sidney,
Thanks for the suggestions, I am working on implementing them now. However, I am running into a bit of trouble. When using your javascript to hide the extraneous forms, I have copied it exactly as is and pasted it inside a new script tag on my version of multi_registration_page_display.php (in uploads) starting at line 12. I am not sure that this is what you meant by adding it to that template, but it does not seem to be working properly. When I enter the primary info and click the button to move on to payment, nothing happens. When I inspect and show the other forms that are being hidden, the errors are appearing which means the entered info is not copying over. Any ideas as to why the script is not functioning properly? I am not getting any javascript errors.

Another problem I am having is what that custom function did to my emails. I placed it on the suggested file, but then when I ran through registering for an event(before I tried hiding the extra attendee forms), I only received 2 emails(Payment Gateway Variable Dump for the Admin and the Payment Recieved email for the user) this time instead of 4(Payment Gateway Variable Dump & Registration Notification for admin and Registration Confirmation & Payment Confirmation for the user). This was not what I wanted to achieve with this and maybe I was not clear about that. I would still like the admin to receive both emails as they were before, and I would like the primary user to receive 2 emails: The Payment Confirmation and one Registration Confirmation that shows all ticket price options chosen (as opposed to before, when the user would receive 3 different emails if they chose 3 different price options). Is this something that is possible?

Thanks,
Dan


Sidney Harrell

October 10, 2013 at 1:24 pm

I updated the gist with a fix. (https://gist.github.com/sidharrell/5924285) It should send out the admin and confirmation emails now. Can you provide a link to a page with an add-to-cart link so I can check out the MER attendee reg form?


Dan Stover

October 10, 2013 at 2:15 pm

Hello Sidney,
Thanks for sticking with this issue, I appreciate it. As for the MER page problem with the hidden forms, well the Copy All button wasn’t showing up because the variable called ‘$eventcount’ wasn’t greater than 1. So what I did was change it to show the button even if eventcount is only 1. That fixed the problem of the primary form not copying to the others, so I’m alright there.

As for your email solution, I think we are getting somewhere, but not quite there. So when I replaced the last code you gave me with the new gist, I did once again receive all 4 emails which is great. The two payment emails (1 admin and 1 user) are just fine, and the main thing that is lacking now is the admin email for Registration Notification. This used to show all price levels selected in it, but now it only shows the first. Hopefully there is an easy way to have it show all of the content that it did originally (a.k.a. all the price levels chosen).

As far as the email to the user to confirm registration goes, it would be nice to include the price options chosen as well as a quantity for each. Last time I tried to include the [ticket_type] it only showed the first selected. I don’t suppose there’d be an easy way to do this would there?

Thanks,
Dan


Dan Stover

October 14, 2013 at 6:11 am

Bump, still looking for a solution to this and appreciate any help


Sidney Harrell

October 14, 2013 at 11:09 am

The email fix basically just sends out the first email that would have been sent out and keeps it from sending out any additional emails. It will not send out a consolidated email. To do that would require major rewrite of the email functionality. However, the link in the admin email should pull up the attendee record with links to the additional attendees. For the attendee email, I would use generic language because the data that it has is for the first attendee, not all the attendees.


Dan Stover

October 15, 2013 at 7:28 am

Sidney, thanks for the response. I understand what you are saying about keeping the single email generic, and will go with that.
A related issue to the original question that I am having is that the hiding of the additional forms does not work in every case. I have a situation where Events A and B have different question groups, and Event B has to non-standard required fields. If I click add to cart for Event A after I already have B in my cart, there are no equivalent fields from Event A to copy to the hidden forms for Event B. Therefore, when I enter info for Event A and try to continue, I’m not allowed forward because I haven’t input the required information but I have no way of entering the missing info.
Could this be set up so that only 1 form shows for Event A, and Registrant 1’s information gets copied to all of Event A, then another form shows for Event B, and Registrant 2’s information gets copied to all attendees for Event B? Sort of like a primary attendee for each event in the cart rather than 1 primary attendee for the entire cart.

Thanks,
Dan


Sidney Harrell

October 16, 2013 at 8:13 pm

I wrote up some modifications that should do what you want. I put them in this file: https://github.com/sidharrell/eventespresso/blob/master/simplify-mer-attendee-page.js. Don’t use the first section, take the second section and use it to replace the lines 375-420 of scripts/espresso_cart_functions.js. Once you’re confident that it’s working, then hide the “copy all” and “copy from” elements on the page. I tested it out and it copies the info from attendee 1 of event 1 into all the additional attendees of event 1, and attendee 1 of event 2 into all the additional attendees of event 2.


Dan Stover

October 18, 2013 at 10:48 am

Hello EE Team,
Unfortunately, the supplied code, when implemented as outlined, did not perform as intended. However, we have reverted to our last version of having additional attendee forms hidden and are looking to go a new way with this. Since we could not get the hiding of the additional attendees to work when multiple events were involved, we would like to limit people to only having 1 event in their cart. The Multiple Event Registration process as we have it implemented is already redirecting a user to their cart whenever they try to register for something, but we cannot guarantee that users will not go back and add other events to their cart. We would appreciate it if you could help us get this to work. We have come up with two methods that we think might work:

1[PREFERRED]) Each time the user goes to hit ‘Register’ for an event, it clears their cart automatically. This would prevent the user from ever being able to get more that 1 item in their cart. Surely, there must be an existing function to clear the cart that we could set to trigger when a user clicks ‘Register’.

2) Set a maximum number of items in the cart to 1.

Thank you for the continued support,
-Dan


Sidney Harrell

October 21, 2013 at 9:27 am

The add event to session function is in includes/functions/cart.php on line 69, event_espresso_add_event_process. The function that clears the session is event_espresso_clear_session(). So just add a call to event_espresso_clear_session() at line 70, so that when an item is added to the session, the session is cleared before the item is added.


Dan Stover

October 21, 2013 at 2:05 pm

Thank you Sidney, you have been very helpful to us. That did the trick!
-Dan

Viewing 13 reply threads

The support post ‘Not Require Any Info for Additional Attendees’ 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