Support

Home Forums Event Espresso Premium change registration steps

change registration steps

Posted: September 6, 2018 at 8:44 am


Peyton Earey

September 6, 2018 at 8:44 am

Is there a way to hook into the steps that are at the top of the “Registration Checkout” page?

Ideally, I’d like to change those steps to, “step 1 “register” on the single event view, then on registration checkout, ‘step 2 “attendee info”, step 3 “Payment Options”.


Josh

  • Support Staff

September 6, 2018 at 12:15 pm

Hi,

There is a way to hook in and I put together an example in this gist:
https://gist.github.com/joshfeck/82287013af2aa3eb43e0765563d972cb

Please note though that the single event view is not part of the single page checkout, so it’s technically not a step. So the above code just basically creates a first “step”, and skips that step. If you want to show the steps on the single event view you could alter the template to include similar html that’s shown on the registration checkout page.


Peyton Earey

September 8, 2018 at 9:54 am

I’m getting a fatal error on the class we’re trying to extend.

Fatal error: Class ‘EE_SPCO_Reg_Step’ not found


Josh

  • Support Staff

September 8, 2018 at 10:07 am

You’ll need to closely follow the code example. For instance, if you try to define the class in a functions file or elsewhere you’ll get the above fatal error. The code example puts the class it its own file, and the hooked callback function loads the class file with the require_once() function.

This way, the class will be loaded when the filter hook fires.


Peyton Earey

September 8, 2018 at 10:40 am

yes, sorry. this works perfectly. thanks


Josh

  • Support Staff

September 10, 2018 at 1:54 pm

No worries. I did make a few additional tweaks to the code to make sure the class loads when needed, and updated the gist with that code. You may want to make the same adjustments to the code on your site.


Peyton Earey

September 12, 2018 at 12:31 pm

So, with the previous code version you gave, everything works until I try checking out with Paypal, upon return to the site, I get:

Fatal error: EED_Single_Page_Checkout::_load_and_instantiate_reg_steps(): The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "EE_SPCO_Reg_Step_Add_Extra_Step" of the object you are trying to operate on was loaded _before_ unserialize() gets called or provide a __autoload() function to load the class definition in /home/bellaworksdev/public_html/lat/wp-content/plugins/event-espresso-core-reg/modules/single_page_checkout/EED_Single_Page_Checkout.module.php on line 745

But with the updated code, on the attendee step, I get:

This registration step cannot be completed. Please refresh the page.


Josh

  • Support Staff

September 12, 2018 at 1:00 pm

Hi Peyton,

There was likely a fatal error logged somewhere with the latter. If you can post a gist of the code you’re working with now I can review.

You must be logged in to reply to this support post. Sign In or Register for an Account

Support forum for Event Espresso 3 and Event Espresso 4.
Documentation for EE3 and EE4
Documentation for Event Espresso 3

Documentation for Event Espresso 4

Status: publish

Updated by  Josh 1 week, 2 days ago ago

Topic Tags

Notifications

This topic is: not resolved
Do NOT follow this link or you will be banned from the site!