Posted: April 28, 2018 at 7:34 pm
Hi guys, I need some help. We have the plugin for multiple events so when someone choose to add “1” event to the cart the pop-up appears with 3 options: 1) View event cart This is not a good flow at all for visitors that want to enroll in many different events at once BECAUSE the “return to events” button just takes them to a page with the upcoming events. I need that button that says “return to events” to say something like “add more classes” OR “add more events” AND when they click that button I want them to return to the EXACT same page they were on when they added the event to the cart. Please advise. Also, please let me know how to paste my website links on here privately because I don’t like how my support tickets show up in google search and I would rather not have my links be associated with search results for support. Thanks for any help you can provide. |
|
Oh, I guess I should add this info to get the best answer. That’s why I want the button to take them to exact page they were on because when they are enrolling for “Camps” for example, I want them to return to the camps page where they were when they added the first event to the cart. The bulk of traffic is mobile so its way to much work for them to just get back to the “camps” page. Thanks |
|
Hi Jarred, You can change the link text and the link URL for the return to events button by using the filter hooks listed in the documentation’s customization section: https://eventespresso.com/wiki/ee4-multiple-event-registration-add-on/#customizations So for example you can add this code to change the URL so they don’t leave the page when they click the return button:
Then, to change the text:
You can add the above to a functions plugin or into your WordPress theme’s functions.php file. We generally recommend adding code snippets like these to a plugin. |
|
With regards to posting private links, I’m afraid the support forums on this website do not have a private link posting feature. If you need to share a link to your site with us, we do have the domain from your activated support key, so maybe what you can do is just include the remainder of the URL. |
|
Hi Josh, Another question regarding your code. If I place that exact code, can you please tell me if this sounds correct to you?:: After placing the function, anyone who adds an event to the cart, will then see the MER pop-up, and if they click “Return to Events” (which will now say “Add More”) button, then they will always just land on the page they were already on? So for example, of they are on the /camps page when the pop-up appears and they click “add more” they will remain on /camps page Or if they were on the /youth-classes page and the pop up appears they will remain on the /youth-classes page. Are both of those examples correct assuming I place the exact function you shared? |
|
You’ll also need to activate the plugin if the code is added to a plugin, then yes, they’ll be returned whichever page they were on when they clicked the button. |
|
Can I just add the code to my child them custom.php? |
|
That may work, but it may also not work, depending on how that custom.php file is loaded by the theme. If you add the code to the custom.php file and find that nothing has changed, then that’s a good indication the custom.php file is loading too late for the changes to take effect. In which case the plugin will be the more reliable and more organized way to achieve this. |
|
Hey guys, so the code above does work for them to click “add more” and it reloads to the exact page they were on when they added an event to the cart. BUT If they view the MER cart, that button also says “ADD MORE” now and it is just reloading the cart page instead of taking them to events. |
|
Also, in addition to my most recent question above. I have another issue. Here is step by step to create it. 1) add “1” event and click “add to event cart” So these 2 most recent posts are what I need help with now. Thanks |
|
if it helps, the page that the MER cart is auto added to is /registration-checkout/ and obviously if they click “add more” from that page we want them going back to events |
|
You can remove this:
and replace with this:
and that will conditionally change the URL for the Add more button depending on whether you’re on the cart page or not.
The 0 you see there is not a count of registrations, it’s actually a quantity selector. So if that gets changed to anything other than a 0 there, it will add more tickets to their cart. |
|
Is there a function or plugin to add that could put a notice beside events sayings something like “1 ticket in the cart for this event already” or if they had 4 tickets it would dynamically tell them “4 tickets for this event currently in the cart” |
|
and for the new code you showed me above, Im not supposed to delete EVERYTHING that you had me add yesterday,, INSTEAD Im just supposed to remove the code that you had in the white box underneath “remove this” and then I add all of the new code you showed me that will be in addition to what you showed me yesterday 🙂 🙂 |
|
So basically to do what I want the final changes to PHP would be this below
|
|
Yes that’s correct, you remove the first block of code from Joshes reply here: https://eventespresso.com/topic/easier-flow-for-multiple-events-registration/#post-268678 and add the second. The code you posted above looks correct.
You’d need some custom development for that, as far as I am aware we currently don’t have any examples of doing this. |
|
The support post ‘Easier Flow for Multiple Events Registration’ 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.