Posted: October 9, 2013 at 1:14 pm
|
Hello EE team, 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, |
|
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) |
|
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, |
|
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. |
|
Hey Sidney, 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, |
|
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? |
|
Hello Sidney, 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, |
|
Bump, still looking for a solution to this and appreciate any help |
|
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. |
|
Sidney, thanks for the response. I understand what you are saying about keeping the single email generic, and will go with that. Thanks, |
|
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. |
|
Hello EE Team, 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, |
|
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. |
|
Thank you Sidney, you have been very helpful to us. That did the trick! |
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.