Support

Home Forums Event Espresso Premium Registration Checkout: Display a detailed results message to the user

Registration Checkout: Display a detailed results message to the user

Posted: April 12, 2023 at 11:04 am

Viewing 1 reply thread


mbeede@tracom.com

April 12, 2023 at 11:04 am

Greetings – My website supports multiple registrations. During the checkout process (submit) I call a web service to also register each attendee with our internal system. The web service call returns JSON that indicates what was, and was not successful. Now I am trying to figure out the best way to display the results to the user. So I have this custom function that does this (pseudocode):

function my_custom_checkout_action ($spco, $data)
{

$response = registerMaxParticipants($spco);
if ($response indicates an error)
Display detailed results to the user in a popup message, or ???
return(true);
else
Display successful popup message
return(false);
}
add_action(‘AHEE__EE_SPCO_Reg_Step_Finalize_Registration__process_reg_step__completed’,’my_custom_checkout_action’, 10, 2);

So the message displayed is NOT a fixed message, it’s a dynamic one. Is there a way to display this info to the user with perhaps an OK button?

Thanks in advance – Mark


Tony

  • Support Staff

April 20, 2023 at 1:22 pm

Hi there,

The single page checkout process doesn’t have a method for this built into, or at least not how I think you are wanting it to work.

The checkout class has a json_response field where you can add your own data and then display it on the front end, but I don’t have any examples of doing that to give you (the EE4 WP User integration add-on does it within EED_WP_Users_SPCO.module.php which you could use as a base to work from).

You may be better opening up an issue on our repo for this HERE and if one of our developers can help point you in the right direction they usually will. However, note that we don’t provide support for custom code so they will open give you advice on where to look rather than a full-blown solution for custom issues like these.

Viewing 1 reply thread

The support post ‘Registration Checkout: Display a detailed results message to the user’ 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