Posted: May 14, 2015 at 10:21 am
|
Hi, We are integrating Event Espresso into a CRM, and need to get when someone has booked onto a course all their details. What hook would we have to use to get this details and send it of to the crm. Many Thanks. |
Hi, a member shared a solution on linking a registration with an affiliate program. That runs after registration checkout. You can see their sample code here: https://github.com/ds-festival/event_espresso_4_custom/blob/master/espresso_custom.php — |
|
|
Hi Do you have a list of all the variables that can be given? so like, As i have tried to implode the array and email myself whats in there but it causes it to fail. If there a way i can see whats all in that array that would be helpful. Also will i be able to get multiple attendees details this way as well? Many Thanks |
|
Hi, In the code Lorenzo linked to I just added:
and it gave up data like this (http://pastebin.com/P2sjCyev), but you need to view it from the Network area in your browser console (screenshot http://take.ms/QQzKL). The wp_die may not be strictly necessary. I didn’t test the multiple attendees, but it should work for them. |
|
Hi, thank you however I am struggling to get any data from it out. So i ahve done to get the tickets ID but it don’t work. i am a b it confused of the syntax i need to use to get the data out, so i need the ticket ID from that one, Also all the attendee details as well. Any way you can help us work out how to pull the data. |
|
Hi, Object Orientated (OOP) PHP is somewhat different. There’s a list of some basic methods for the EE_Transaction class here: /wp-content/plugins/event-espresso-core-reg/core/db_classes/EE_Transaction.class.php For most data points int he objects you can use the general get() method. e.g.
So that uses the registrations() method to get that broad data object into an array, then I simply looped through (in case of multiple registrations) and used the get() method to pull out the TKT_ID values. You can do something similar with the attendee (check here for related methods /wp-content/plugins/event-espresso-core-reg/core/db_classes/EE_Attendee.class.php ), such as
I hope that helps, I know OOP is somewhat confusing, but once you realise that you must use the appropriate methods to get the data rather than trying to access to the objects directly, it becomes a lot easier. |
The support post ‘Hook into sucssesful registration.’ 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.