Support

Home Forums Event Espresso Premium Change cart redirect – return to events list – URL

Change cart redirect – return to events list – URL

Posted: March 31, 2021 at 7:46 pm


TTBC

March 31, 2021 at 7:46 pm

Hi

When inside the shopping cart the return to events goes off to an archive page which is not nice for the user. HERE

I have built a custom events list here and this is where I want this link to go to how do I set this or how do I extend the code and add it into my custom plugin.

Cheers
Mike


Tony

  • Support Staff

April 1, 2021 at 6:13 am

Hi Mike,

We have a filter for that URL: FHEE__EED_Multi_Event_Registration__set_definitions__events_list_url

So you can use a snippet like this: https://gist.github.com/joshfeck/e51ac13a3d9fd345ad40

You can add that to a custom functions plugin on your site, we have some documentation on creating one here:

https://eventespresso.com/wiki/create-site-specific-plugin-wordpress-site/

Set the URL you want to use and EE will direct them there.


TTBC

April 2, 2021 at 4:16 am

This snip of code was exactly what i was looking for but as I am running a multi-site to handle multi-currency I added in the switch component, so it would redirect depending on get_site_url

/* Filter to change the URL for the "Back to List" button from the Multi Event Registration cart. */
function ee_mer_change_event_list_url(){

    switch (get_site_url()) {
        case 'https://buscircle.com':
            return 'https://buscircle.com/briefings-australia/';
            break;
        case "https://nz.buscircle.com":
            return 'https://nz.buscircle.com/';
            break;
        case 'https://sg.buscircle.com':
            return 'https://sg.buscircle.com/';
            break;
    }
}

add_filter( 'FHEE__EED_Multi_Event_Registration__set_definitions__events_list_url', 'ee_mer_change_event_list_url' );


Tony

  • Support Staff

April 2, 2021 at 5:16 am

Great, I’m glad it’s working for you.

Thanks for sharing your solution 🙂

The support post ‘Change cart redirect – return to events list – URL’ 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