Support

Home Forums Event Espresso Premium How/Where do I change the link on buttons on cart page, and in popup? Reply To: How/Where do I change the link on buttons on cart page, and in popup?

Reply To: How/Where do I change the link on buttons on cart page, and in popup?

Author Replies
Tony # Posted on May 1, 2018 at 3:12 am

Hi there,

The “Return to programs” (the left button) on: 1) the cart page (registration-checkout), and; 2) the pop-up box created after you add an item to the cart “return to programs go to a page that doesn’t exist – yoursite.com/calendar — How do I get it to go to a specific page?

It looks like someone has tried to do exactly that and used this function incorrectly:

https://gist.github.com/joshfeck/e51ac13a3d9fd345ad40

Those links use WP core functions to generate the URL used for the button which will never return ‘yoursite.com/calendar`, however, the URL is filterable so a function like the above can set it to whatever you want it to be.

Can you check your themes functions.php for any functions hooking into FHEE__EED_Multi_Event_Registration__set_definitions__events_list_url, it may also be in a custom function plugin on your site.

Ideally I would like it to go back to the previous page they were on. Is that possible? It would be different for each different visitor who is adding different programs to their own cart.

There’s no method that is 100% for this as it depends on the server setup (which is one of the reasons EE does what it does), but you can try using a function like this:

https://gist.github.com/Pebblo/844777c4c5be9f647b752f8a9bda50d0

As mentioned, that may or may not work depending on your server setup and bear in mind, if a user adds the event to the cart from an event itself, they will be directed back to that event using this function.

I want it to say program not event. The “select at least one event” also needs to go to a different specific URL, not the page to which it is going currently.

That text is filtered so you can use something like this:

https://gist.github.com/Pebblo/43556e9fc43df5696fb8eea15b356b9b

You can change the text used on line 6, and the link used on line 10.

Add both of the above functions to a custom functions plugin on your site.

Do NOT follow this link or you will be banned from the site!