Support

Home Forums Event Espresso Premium Make all errors that return to Event List page return to Registration page

Make all errors that return to Event List page return to Registration page

Posted: February 16, 2018 at 3:25 pm


TOCIFT

February 16, 2018 at 3:25 pm

When a cart times out the site returns the user to the Events List I would prefer they return to http://184.154.244.76/~tocift07/register/

How can I change this?

Thanks,

Laura


Tony

  • Support Staff

February 19, 2018 at 2:58 am

Hi Laura,

Do you not want to use the default event list link at all?

If so you can use a function like this:

https://gist.github.com/Pebblo/16bf7bc52af949fd60e0ee1e6db801a9

Add that to your custom functions plugin you previously created and be sure to change line 7 to the URL you cant to use.


TOCIFT

February 19, 2018 at 6:18 pm

I’m having trouble regenerating the error that took me to that page, so I don’t know the url that I can’t use. How can I get there? It’s obviously an EE4 generated page because it’s not in the “Pages” area.

I looked at the php I’m to alter and it seems like I would put the page I want the system to go too insead of changing line 7 to the URL I “can’t” use. I just want to be sure. I’m doing this right. Also, do I replace the words “site url” and leave the open and closed paren after it?

Thanks for the help!

Laura


Tony

  • Support Staff

February 20, 2018 at 3:20 am

I’m having trouble regenerating the error that took me to that page, so I don’t know the url that I can’t use. How can I get there?

On depends on the specific error you saw, do you know the exact wording? Or a screenshot?

It sounds like it was the expired session notice, which is thrown if you add tickets to the cart and then try to process after the session has expired (by default its 1 hour) but it could be something else.

I looked at the php I’m to alter and it seems like I would put the page I want the system to go too insead of changing line 7 to the URL I “can’t” use. I just want to be sure. I’m doing this right.

Yes, you could use:

return site_url() . '/register/';

Also, do I replace the words “site url” and leave the open and closed paren after it?

site_url() is a function that pulls the URL for where you WordPress files sit, say you had them in a directory call ‘wordpress’ on your site, site_url() would return something like http://domain.com/wordpress

You may actually want to switch out site_url() for home_url() which links to the ‘site address’ in your general settings, it depends on your setup.

So you could use:

return home_url() . '/register/';


TOCIFT

February 20, 2018 at 8:25 pm

Here is the pastebin url. Please check and make sure it looks right.

https://pastebin.com/tvy1mjky

Thank you so much for your help!


TOCIFT

February 20, 2018 at 8:25 pm

It is the last filter.


Tony

  • Support Staff

February 21, 2018 at 2:01 am

Yes, that filter looks correct, it will tell EE (and WordPress) to change the default event list to direct your to {domain}/register/ which looks correct to me.


TOCIFT

February 23, 2018 at 8:06 am

This php is working but I would like to change some text in the error message. Here is the screenshot of the message.

efa14dfe15091bdbb1af154a1147eb8f

I would like for the link to say REGISTRATION PAGE in all caps and strong.

Appreciate the help!

Laura


TOCIFT

February 23, 2018 at 8:08 am

Sorry. Link text wasn’t complete…

https://gyazo.com/efa14dfe15091bdbb1af154a1147eb8f


Tony

  • Support Staff

February 23, 2018 at 8:08 am

Hi Laura,

Can you report that link please, the above isn’t working.


TOCIFT

February 28, 2018 at 4:39 pm

I just tried the link and it’s working fine now. Can you try again?

Thanks!

Laura


Tony

  • Support Staff

March 1, 2018 at 3:23 am

Works now 🙂

Are you still using a custom function to translate text on your site?

If so you can add this:

'%3$sThis can sometimes happen if too much time has been taken to complete the registration process.%3$sPlease return to the %1$sEvent List%2$s and reselect your tickets. If the problem continues, please contact the site administrator.' => '%3$sThis can sometimes happen if too much time has been taken to complete the registration process.%3$sPlease return to the %1$sREGISTRATION LIST%2$s and reselect your tickets. If the problem continues, please contact the site administrator.',

To your strings array.

The support post ‘Make all errors that return to Event List page return to Registration page’ 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.

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: closed

Updated by  Tony 6 months, 3 weeks ago ago

Topic Tags

Notifications

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