Support

Home Forums Event Espresso Premium Display new content if user has already purchased a ticket

Display new content if user has already purchased a ticket

Posted: February 22, 2017 at 11:24 am


psg_napkin_dev

February 22, 2017 at 11:24 am

Hi, this is a follow up to this thread: https://eventespresso.com/topic/how-to-display-member-is-already-registered-to-event/

I was wondering if it was possible to do this in EE4. The code is for EE3 only.
Basically, I want to be able to embed a webinar on the single-event-espresso page if a user has bought a ticket for that event.

Thanks,
Jason


Josh

  • Support Staff

February 22, 2017 at 12:52 pm

Hi Jason,

Yes it’s possible, and the code in Dean’s example can be adapted to work for Event Espresso 4.

Here’s one example that works with EE4:

https://gist.github.com/joshfeck/f73483e9df1f5ccc55f15a43fcecf463


psg_napkin_dev

February 24, 2017 at 8:41 am

Hey Josh,

Thanks, that worked great! I’m trying to wrap my head around what to do if the user has purchased multiple tickets for the webinar though. Obviously their secondary registrants won’t be registered in the system, and if they are it won’t link up to our wp-user integration.

Thanks,
Jason


Josh

  • Support Staff

February 24, 2017 at 8:59 am

The simple way to avoid that issue is don’t allow purchasing multiple tickets for a webinar. If that’s not feasible, then you can work in a solution like this one:

https://github.com/eventespresso/ee-code-snippet-library/blob/master/addons/eea-wp-user/jf_ee_process_multi_wpuser_for_attendees.php

The above solution can make things quite a bit more complicated though, like you’ll need to figure out a way to communicate with the other ticket holders about how to use their user accounts that they didn’t actually sign up for.


psg_napkin_dev

February 24, 2017 at 9:09 am

Hey Josh,
Hopefully the client will be okay with one registrant per webinar, but I don’t think that would be likely.

With your second method, we’d have to account for users that already exist in the system as well. Since we’re using S2 member to sell memberships, that’s pretty important for the client.

An easier method I thought of was to just let the webinar show on the page to everybody, but make it passworded and display the password to the primary registrants. For the secondary registrants, I guess my client would have send out a mass e-mail before the webinar starts with a password, and include instructions somewhere on the registration thank you page.

Thanks,
Jason


psg_napkin_dev

February 28, 2017 at 3:27 pm

Hey Josh,

This code will show the user post registrant information even if they have cancelled their registration. Any way around this?

Regards,
Jason


Josh

  • Support Staff

February 28, 2017 at 4:23 pm

Hi Jason,

You should be able to add a check for the registration’s status code and if it’s RCN, bail.

The support post ‘Display new content if user has already purchased a ticket’ 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