Posted: November 6, 2014 at 1:57 pm
|
Is there a way in EE3 to have an additional attendee be free without using MER? My client wants to let every attendee bring a guest without additional charge. Thanks! |
Hi there, Event Espresso 3 doesn’t have a buy one get one promotion feature. One work-around that may do the job is have a 50% discount code could be applied, but you’d likely need to prevent the discount code box from being input into until there’s an even number of attendees selected. Which could be done with a bit of jQuery added to the registration form page. |
|
|
That could work. I was also thinking of making up a price modifier question with a negative value that would zero out the second person’s fee, but I wouldn’t want it to show the negative price value. Is there a way to hide the price? |
|
Then I found this thread, and this might be the most elegant solution. Would this kind of thing still work? https://eventespresso.com/topic/additional-attendees-different-pricing/ |
Have you tried the price modifier with a negative value? I’m not aware that it allows for a negative price. If it did, you could apply a content filter to move the part where it displays price value in the html spans that display on the page. |
|
|
I haven’t but I thought you could have a negative value as long as the total did end up in the negative. I could be wrong on that, but I’ll check it out. And I’m going to try Sidney’s solution too. |
|
Please let us know how you get on and if you need further assistance. |
|
Thanks, Dean. So, I think I’m doing what Sidney suggested, but I’m getting an error that suggests the registration ID is being misinterpreted because of the “-” between the event ID and the rest of the number. Is there a way to get around that? I assume it comes up elsewhere. [Mon Nov 10 19:42:28 2014] [error] [client 68.50.209.40] WordPress database error Unknown column ‘54611524c81a1’ in ‘where clause’ for query SELECT * FROM wp_17_events_attendee WHERE registration_id=50-54611524c81a1 /* From [ulmanfund-trispies-com.trispies.staging.wpengine.com/event-registration/] in [/nas/wp/www/staging/trispies/wp-content/uploads/espresso/custom_functions.php:367] */ made by require(‘wp-blog-header.php’), require_once(‘wp-load.php’), require_once(‘wp-config.php’), require_once(‘wp-settings.php’), do_action(‘init’), call_user_func_array, event_espresso_run, event_espresso_add_attendees_to_db, do_action(‘action_hook_espresso_save_attendee_data’), call_user_func_array, espresso_make_additional_relay_teammates_free, referer: http://ulmanfund-trispies-com.trispies.staging.wpengine.com/events/2014-columbia-triathlon-relay/
|
|
There’s a couple of issues with that code. I have added a modified version here: https://gist.github.com/Apina/c341a2af96017f983bd3 That should stop the database error, and will also make ALL additional attendees free. |
|
That stopped the MySQL errors, but isn’t changing the price to $0. I’m putting the code in the custom_functions.php file, should I put it someplace else? |
Hi there, That’s a good enough place to put the code. You could try echoing out something if you don’t think the code is being executed though. Another thing that you can check for is that hook where Sidney said to change in EE3 core. That’s been fixed in the EE 3.1.37 pre-release, but if you’re on 3.1.36, you’ll need to change the hook like Sidney showed in the gist. |
|
|
It was the hook. In Sidney’s notes it said the bug was 3.1.36.1.P and while I was on a later version, its not yet 3.1.37. Thanks, Josh! You guys are awesome. Its really comforting to know that you all are here and have our backs! Have a great day! |
You’re welcome. |
|
The support post ‘Free Additional Attendee’ 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.