Support

Home Forums Event Espresso Premium Add a Question Group to Step 2 Payment Options

Add a Question Group to Step 2 Payment Options

Posted: June 1, 2016 at 3:46 am


theagilemindset

June 1, 2016 at 3:46 am

I hope you can help!

I am having an urgent crisis. I need to do the following, but looking through the forums, the docs and Googling hasn’t helped.

1) I need to add another Step to the Payment Process so that I can add a question group to that step.

2) I need to add a question (Accept T&Cs) to the Payment Options.

So basically my steps would be.

Step 1) Registration
Step 2) Further questions
Step 3) Payment Options / Accept T&Cs

Surely the Espresso plugin allows this out of the box.
Any help?, I will respond to all help. Thank you in advance.


Lorenzo Orlando Caum

  • Support Staff

June 1, 2016 at 6:49 am

Hello,

Custom questions are collected in attendee information (typically step 1) of registration checkout as they are recorded to the individual registration record.

You could create a custom question for the terms and conditions question using the checkbox question type and set that to required and then add it to a question group.

If you would like some additional static messaging to appear on the registration checkout page, then you could use something like this:

https://gist.github.com/lorenzocaum/4778a56ba7a84f8261874311105c2968

And if you need another location to add that information, then you could also edit the payment received message type which is sent to the registrant after they register and pay for a registration. It can be found in Event Espresso –> Messages. Then look for the payment received message type for the primary registrant and click on it. Then make changes and save.


Lorenzo


theagilemindset

June 3, 2016 at 2:57 am

Hello Lorenzo

Thank you for the reply, Im quite there with creating a question, question groups etc.

One thought I had was to use a hook, but due to a lack of list of hooks, I cant understand (without searching the code) where / what the hook is for / to add to the payment gateway.

I guess now knowing this little function, ‘ee_add_custom_messaging_after_attendee_information_registration_checkout_footer’ would be the place, however, what do I hook into to put a question group there instead of a plain message?

I really need T&Cs to be on the payment area, to be selected before paying, not really on the reg page.

On the other topic, I still need the ability to create more steps, to add question groups.


Josh

  • Support Staff

June 3, 2016 at 11:21 am

I can give you a few tips on how to find available hooks. You install the Debug bar plugin and its companion Debug Bar Actions and Hooks plugin. This way you’ll be able to see all of the available hooks listed in real time on whatever page you’re viewing on your WordPress site.

Also, it is possible to create more steps to the registration process. There’s a real world example that shows how in the WP User integration plugin where it adds a log-in/register step before sending them along to the step where they fill out the registration form. You can open up the WP User Integration add-on (or specifically the EED_WP_Users_SPCO.module.php file) into your IDE and do a search for the use of the
AHEE__SPCO__load_reg_steps__reg_steps_to_load filter hook and follow the code through the register_login_reg_step() method to see how it adds the additional step.


theagilemindset

June 6, 2016 at 7:39 am

Hello Josh

Thank you, I had forgotten about the debug bar. It is a big help.

I have looked at WP User, but without going to far into it in comparison to EE4, it does just create the login step, when really i’m looking for a Step 2 to use as a question base, so Step1/ Registration, Step2/Questions, Step3/ Payment options. At this time we aren’t using a normal login/user area, just the EE4 registration that’s already built in as questions. Its a matter of time/budget.

If I could just add that next step after registration, that would be great. I know my way around PHP but want to stick as much to plugin without changing too much in the templates, if possible.

I will look at these hooks in debug, but if anyone can think of anyother way to add a step, if not, i’ll close this question.

Thank you again.


Josh

  • Support Staff

June 6, 2016 at 3:39 pm

Since the step that you want to add doesn’t already exist, you’ll need to write some PHP to create that step. Then you use the hooks so your new step is included.

The support post ‘Add a Question Group to Step 2 Payment Options’ 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