Support

Home Forums Event Espresso Premium Creating registration for an event programmatically using db models?

Creating registration for an event programmatically using db models?

Posted: August 30, 2022 at 1:50 pm

Viewing 1 reply thread


dirk.tussing

August 30, 2022 at 1:50 pm

Hi,

We are trying to implement the event registration on our react frontend.

I’m able to get the event and ticket information event example. When click register now button, it will have popup displaying a form to collect answers and fname, lname etc..

Currently not trying API method as it requires authentication.

I generated basic registration record with following test code. It shows incomplete in the event registrations list, I know it should include other related information but not sure how to add them:

$transaction = EE_Transaction::new_instance();
$transaction->set_status('RAP');
// add ticket object to transaction or in registration object below?
$transaction->save();
$transaction_id = $transaction->ID();

$res = EE_Registration::new_instance();
$res->set_event(36351);
$res->set_attendee_id(9802);
$res->set_transaction_id($transaction_id);
$res->save();
print_r($res->event());

https://share.cleanshot.com/O4ejzP

Please advise,

Thanks!


Joao Victor

  • Support Staff

August 30, 2022 at 2:58 pm

Hi there,

Thanks for contacting us.
Our support covers just questions on how to use, bugs, and quick customizations of Event Espresso. Since it’s a third-party implementation in your React front end, we are not able to provide support for custom codes. We recommend to Hire an Event Espresso Consultant.

Viewing 1 reply thread

The support post ‘Creating registration for an event programmatically using db models?’ 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