Support

Home Forums Event Espresso Premium Modifying Text in Espresso Table that Displays When Registration is Closed

Modifying Text in Espresso Table that Displays When Registration is Closed

Posted: September 1, 2016 at 1:41 pm

Viewing 7 reply threads


infosolwebadmin

September 1, 2016 at 1:41 pm

Heyllo,

I’m using a modified espresso table template on my site (it has an add to cart option) and we want to edit the text that displays when a courses registration is closed. I’ve edited this before and have no idea which template it was in and I can’t seem to find it in my post history or in a quick search. I’ve got an example of it on this page:

http://events.infosol.com/web-intelligence-4-1-beginner-intermediate-advanced-boot-camp/

So the ‘Attention

Online registration is not currently available…’

text is what we are looking to modify. We are looking to add a hyperlink in this text as well, I imagine that would be possible? I’m not very familiar with PHP, but I am assuming this text is in a template somewhere.

Thanks!


Josh

  • Support Staff

September 1, 2016 at 1:47 pm

It looks like you might have modified the event_espresso_cart_link() function to make the earlier change to include that phone number. The text from that message is not in a template, but the event_espresso_cart_link() function is override-able with a custom function. Can you check the functions.php file in your theme or maybe in a custom site plugin?


infosolwebadmin

September 1, 2016 at 3:42 pm

Hmm, I checked the functions.php theme file, in a ‘custom functions plugin’ on the site, and checked the custom_functions.php uploads/espresso folder and searched for words in that string and could not find anything. That’s odd. Anywhere else it could possibly be? I may have to dig through my old posts more to try and find what I did.

Also, do you have the exact text string that it defaults to? I may be able to search on some of those words and find it.

Thanks!


Lorenzo Orlando Caum

  • Support Staff

September 1, 2016 at 4:45 pm

Hello,

My guess is that it may be using one of these strings:

Sold Out

Closed

Here is a screenshot of that code: https://cl.ly/173g1p3C2v0N

Are there any custom templates in use in this location?

/wp-content/uploads/espresso/templates

Or a site specific plugin here?

/wp-content/plugins


Lorenzo


infosolwebadmin

September 8, 2016 at 4:49 pm

I do have custom templates there: http://oi63.tinypic.com/wt6453.jpg and I do have a ‘custom functions’ plugin but I searched through and was unable to find that string anywhere in the custom templates. I searched the plugin and didn’t find anything either.

Could this potentially be one of those changes to text where you have to run some code that searches for a text string and then changes it to a string of your choice? I know I’ve had to do that in the past for certain text strings on the site and I am not seeing the string I posted originally anywhere else. Sorry about the vague description, I haven’t had to do that in a while and forgot what it’s called.

Sorry about the delay been a hectic week!

Thanks

-John


Tony

  • Support Staff

September 9, 2016 at 12:49 am

The original string should be:

'We\'re sorry. Either an error occurred or the event(s) you were attempting to register for may no longer be open for registration.'

Could this potentially be one of those changes to text where you have to run some code that searches for a text string and then changes it to a string of your choice?

Using the gettext filter as shown HERE?

Yes it can as the text is translatable so its possible but we would normally recommend either the themes functions.php file or a Site Specific Plugin for this which you appear to have checked already.


infosolwebadmin

September 9, 2016 at 12:28 pm

Hey Tony,

Thanks for the info. Since it sounds better to edit the functions or use a site specific plugin, what code would I use to change that text string? Also, is it possible to include a hyperlink in the text?

I’m not 100% sure how to use the custom functions plugin that I have, the plugin settings for it have a bunch of checkbox options for various site setting options, but there’s nowhere to throw custom code in. I can’t remember if I ended up using the plugin editor and added code in there, so it seems like it would be best to follow that link and create another custom plugin for this code so I don’t hose anything unknowingly.

Thanks!


Tony

  • Support Staff

September 9, 2016 at 6:15 pm

Thanks for the info. Since it sounds better to edit the functions or use a site specific plugin, what code would I use to change that text string?

You need to find the original function that is changing the text, adding another function to change the same text means they will both conflict with each other.

Also, is it possible to include a hyperlink in the text?

Yes but you need to find the correct code first. You can’t just keep adding additional functions to change the same text, its just asking for more trouble.

I’m not 100% sure how to use the custom functions plugin that I have, the plugin settings for it have a bunch of checkbox options for various site setting options, but there’s nowhere to throw custom code in.

That sounds like a custom plugin as we don’t have any custom functions plugins that addd various checkboxes to enabled/disable functionality.

I can’t remember if I ended up using the plugin editor and added code in there, so it seems like it would be best to follow that link and create another custom plugin for this code so I don’t hose anything unknowingly.

How you change the text will all depend on how you made the changes originally so you need to find out how it was done.

Check your functions.php, custom functions plugins, custom_functions.php files etc for ‘event_espresso_cart_link’ to see if you previously override the function for your own.

Check for the string I posted above, or smaller sections of that string just incase its formated different and your search isn’t picking it up, for example try Either an error occurred or the event(s).

Are you sure you didn’t modify the code directly within the Event Espresso plugin files?

Viewing 7 reply threads

The support post ‘Modifying Text in Espresso Table that Displays When Registration is Closed’ 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