Support

Home Forums Event Espresso Premium The return to event list button doesn't work

The return to event list button doesn't work

Posted: November 2, 2017 at 10:45 pm

Viewing 10 reply threads


wolfpack4417

November 2, 2017 at 10:45 pm

I have edited my return to event list button (changed the text and the url). Below is the code I used.

function ee_mer_change_event_list_url(){
	return 'http://nrbasketballacademy.com/#homepage-features';
}

add_filter( 'FHEE__EED_Multi_Event_Registration__set_definitions__events_list_url', 'ee_mer_change_event_list_url' );

function ee_mer_change_event_list_text(){
	return 'Return to NRBA Programs';
}

add_filter( 'FHEE__EED_Multi_Event_Registration__return_to_events_list_btn_txt', 'ee_mer_change_event_list_text' );

The button doesn’t work when I add something to my cart, but if I view my cart and click on the button there, it works. Did I do something wrong?


Tony

  • Support Staff

November 3, 2017 at 3:03 am

Hi there,

It seems to be working when I test adding an event to the cart on your site, can you link me to where it doesn’t work for you and provide the steps needed to reproduce, please?


wolfpack4417

November 3, 2017 at 5:56 am

It’s weird it works some places. I just tried it on Vertimax and it worked but then I did Holiday Handles and it didn’t. Can you try clicking the “Register Now” button on the home page for Holiday Handles (It’s in the Programs section). Once there, add a ticket to your cart and on the modal that pops up, click it. This is what the element looked like in the inspector (wrong href)

<a class="cart-results-go-back-button cart-results-button button close-modal-js " href="http://www.nrbasketballacademy.com/event-category/holiday-handles/">
				<span class="dashicons dashicons-arrow-left-alt2"></span>Return to NRBA Programs			</a>


Tony

  • Support Staff

November 3, 2017 at 6:00 am

That URL looks wrong, not just for the function you posted, but for the default output.

Double check you don’t have any other custom functions hooking into FHEE__EED_Multi_Event_Registration__set_definitions__events_list_url as it looks like something else is changing that URL for specific events/categories.


wolfpack4417

November 3, 2017 at 6:12 am

This is my whole custom plugins file

<?php
/*
Plugin Name: Site plugin for nrbasketballacademy.com
Description: Site specific code for nrbasketballacademy.com
*/
/* Begin Adding Functions Below This Line; Do not include an opening PHP tag as this sample code already includes one! */

function my_custom_button_text( $btn_text, $event ) {
	return 'Continue';
}
add_filter( 'FHEE__EE_Ticket_Selector__display_ticket_selector_submit__btn_text', 'my_custom_button_text', 10, 2 );

function ee_mer_change_event_list_url(){
	return 'http://nrbasketballacademy.com/#homepage-features';
}

add_filter( 'FHEE__EED_Multi_Event_Registration__set_definitions__events_list_url', 'ee_mer_change_event_list_url' );

function ee_mer_change_event_list_text(){
	return 'Return to NRBA Programs';
}

add_filter( 'FHEE__EED_Multi_Event_Registration__return_to_events_list_btn_txt', 'ee_mer_change_event_list_text' );

/* Stop Adding Functions */


Tony

  • Support Staff

November 3, 2017 at 6:19 am

Have you checked other locations on your site?

functions.php from within you theme for example?


wolfpack4417

November 3, 2017 at 7:50 am

I don’t have my site downloaded locally so I can’t check through an IDE, but the only place that would be edited to my knowledge is in the file I posted already unless one of the add ons for EE edits it. I have the Calendar, Multi-Event registration, and Attendee mover. Would any of those affect it? Also this is my functions.php

<?php

add_action( 'wp_enqueue_scripts', 'enqueue_parent_styles' );

function enqueue_parent_styles() {
   wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' );
}


Tony

  • Support Staff

November 3, 2017 at 8:22 am

I have the Calendar, Multi-Event registration, and Attendee mover.

No, none of those change that field, unless someone has changed something within the add-ons.

Change the priority on the hooks your using to 999, for example:

add_filter( 'FHEE__EED_Multi_Event_Registration__set_definitions__events_list_url', 'ee_mer_change_event_list_url' );

becomes this:

add_filter( 'FHEE__EED_Multi_Event_Registration__set_definitions__events_list_url', 'ee_mer_change_event_list_url', 999 );

Same result?


wolfpack4417

November 3, 2017 at 9:48 am

Yea same result when I added that.


Josh

  • Support Staff

November 3, 2017 at 11:23 am

This looks like an edge-case bug with post_type_archive_link. You’ll notice the post slug and taxonomy term slug match between the event and event category:

http://www.nrbasketballacademy.com/events/holiday-handles/
http://www.nrbasketballacademy.com/event-category/holiday-handles/

Even if you do not have that filter in place, you’d still see an issue with that return to event list link with that event. You can avoid this by changing one of the above’s slug so the two aren’t exactly the same.


wolfpack4417

November 3, 2017 at 5:09 pm

oh interesting haha. Ok thanks I’ll change that when I get home tonight. I’ll post here again if that doesn’t work.

Viewing 10 reply threads

The support post ‘The return to event list button doesn't work’ 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