Support

Home Forums Event Espresso Premium Change Text on "Show Details" Button

Change Text on "Show Details" Button

Posted: September 3, 2018 at 11:58 am

Viewing 9 reply threads


fasten-wellness

September 3, 2018 at 11:58 am

https://fasten-wellness.de/termine/

In german this button is labeled “Details anzeigen”, but my customer wants to change the text to something different. in the DisplayTicketSelector.php I can not find the settings for this. Can someone help me with this?


Tony

  • Support Staff

September 3, 2018 at 2:54 pm

Hi there,

That text is run through a filter, so you can add this:

https://gist.github.com/lorenzocaum/e024d66d25a272185390

To either your themes functions.php file, or preferably a custom functions plugin:

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

Just change the REPLACE ME text for the text you want the button to show.


fasten-wellness

September 4, 2018 at 2:14 am

Thank you very much. Worked out very good! Is it planned to modify These Settings in the backend someday?


fasten-wellness

September 4, 2018 at 2:14 am

…to be able to modify…


fasten-wellness

September 4, 2018 at 2:18 am

Now I have another question regarding the same button. I would want to Change the Background Color and I do not find anything in the Stylesheets..


Tony

  • Support Staff

September 4, 2018 at 3:05 am

Thank you very much. Worked out very good! Is it planned to modify These Settings in the backend someday?

We’ve discussed this previously internally and as it stands, we do not have plans to add settings that allow you to set the text used on the buttons from within the admin, however that may change in the future.

Currently, you can use various filters to change the text displayed on buttons within EE, or you can also translate the strings using PO/MO files.

Now I have another question regarding the same button. I would want to Change the Background Color and I do not find anything in the Stylesheets..

You don’t need to modify the stylesheets to change the colour used (you shouldn’t edit any of EE’s core files as they will be lost each time the plugin updates), you can just add your own custom styles to your theme to override the colour.

For example this:

.ticket-selector-submit-btn.view-details-btn {
    background-color: yellow;
}

Changes that buttons background to yellow, you can change the colour to suit and then add that to Dashboard -> Appearance -> Customize -> Additional CSS.


fasten-wellness

September 10, 2018 at 6:35 am

Thanks for your reply again.

I tried to change the button background color as you wrote above, but it does not work. see the code I added to the custom-css section:

.ticket-selector-submit-btn.view-details-btn
{background-color: red;
}

here the link to the page:
https://fasten-wellness.de/termine/

Also I try to change the text on one event which had not enough participants. the text on this event detail page is “ausverkauft” but the customer would like to have “Nicht mehr buchbar” as text here. this is the link to this event:

https://fasten-wellness.de/veranstaltungen/basisch-entschlacken-07-10-18-14-10-18/

and I used this code in the functions.php:

add_filter (‘FHEE__EE_Ticket_Selector__ticket_selector_table__sold_out’, ‘ee_sold_out’);

function ee_sold_out() {
return ‘Nicht mehr buchbar’;
}

Do you have any suggestions?


Tony

  • Support Staff

September 10, 2018 at 10:11 am

It looks like you are loading the events list within an iframe on the same site the iframe is loading from? May I ask why you are using iFrames?

The embed/iframe code is intended to allow you to list your events on a separate site if needed (using an iframe to load the content from your site on the ‘other site).

I also can’t see the ticket selector buttons loading on that output (which the CSS I gave you applies to), has this changed since you posted your above reply?


fasten-wellness

September 10, 2018 at 2:25 pm

Ok, I guess using iframe was not the best idea and I really do not remember, why I did it :-)))

Maybe you were not able to see the buttons, because this afternoon I had to turn off all plugins to be able to edit the start page (I have an open case with the theme designers)?!

As by now it seems that the problem is solved by using the shortcodes instead of the iframe.

The problem with the sold out text is still not solved, maybe you could check again now


Josh

  • Support Staff

September 10, 2018 at 2:46 pm

Hi,

The filter hook for changing the “Sold Out” text is actually:
FHEE__ticket_selector_chart_template__ticket_sold_out_msg

source: https://github.com/eventespresso/event-espresso-core/blob/master/modules/ticket_selector/TicketSelectorRow.php#L242

So your custom code with the correction will be:

add_filter(
    'FHEE__ticket_selector_chart_template__ticket_sold_out_msg', 
    'ee_sold_out'
);
function ee_sold_out() {
    return 'Nicht mehr buchbar';
}
Viewing 9 reply threads

The support post ‘Change Text on "Show Details" Button’ 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