Support

Home Forums Event Espresso Premium Short codes for messages

Short codes for messages

Posted: November 5, 2015 at 2:57 am

Viewing 6 reply threads


woodendnh

November 5, 2015 at 2:57 am

Hi there,
Can you tell me which are the corresponding shortcodes for the following pieces of info please:

1) The start date of the course
2) The start time of the course (1&2 can be one shortcode or two separate ones)
3) the venue
4) teacher name (not sure if that’s even possible)

Thanks so much,
Kate


Tony

  • Support Staff

November 5, 2015 at 5:05 am

Hi Kate,

For the date and times you can use:

[DATETIME_START] – [DATETIME_END]
[DATE_START] – [DATE_END]
[TIME_START] – [TIME_END]

Within the datetime_list section.

Not you can find all of these by clicking the lines icon to the right of each section, that lists the valid shortcodes for that section – http://take.ms/99RqI

Venues are assigned to events and so are used within the event_list section – http://take.ms/jY27A

You basically have all of the individual venue sections available as shortcodes there.

However, most of that information should already be included within the registration approved message (all but the teacher name)

Which message template are you editing?


woodendnh

November 8, 2015 at 8:42 pm

Thanks Tony, that’s great. It’s taking me a while to get my head around how the messages work, but I’m getting there I think. I have a couple more questions about them please:

1) I’ve created a custom message for a new enrolment but (I’m not sure why), I’ve used the ‘not approved registration’ message type. I’ve edited it to look like and contain the info I’m after, will the ‘not approved registration’ show up anywhere other than in the custom message templates page?

2) I need to create a reminder email which basically tells them the start date and time of their course. I also need to create a blank template (but with our banner and signature) to use as a batch message at a later date. Which are the best templates to use please?

Thanks so much,
Kate


woodendnh

November 8, 2015 at 8:47 pm

Sorry I forgot to add one more thing…is it possible to change the text that comes up when I select the [INVOICE_LINK] shortcode please? It currently says something like ‘click here for invoice’ and I’d like it to say ‘download your invoice’ instead.
Thanks again for everything,
Kate


Tony

  • Support Staff

November 9, 2015 at 5:28 am

1) I’ve created a custom message for a new enrolment but (I’m not sure why), I’ve used the ‘not approved registration’ message type. I’ve edited it to look like and contain the info I’m after, will the ‘not approved registration’ show up anywhere other than in the custom message templates page?

Sorry, I’m not sure I understand.

Do you have your default registration status within the events set to ‘Not Approved’? That’s when that message type is sent but I’m not sure if you need that or not.

Do you want to manually approved all registrations before they can pay?

2) I need to create a reminder email which basically tells them the start date and time of their course. I also need to create a blank template (but with our banner and signature) to use as a batch message at a later date. Which are the best templates to use please?

Reminder and batch emails would both need to be manually created using the ‘Newsletter’ message type.

Sorry I forgot to add one more thing…is it possible to change the text that comes up when I select the [INVOICE_LINK] shortcode please? It currently says something like ‘click here for invoice’ and I’d like it to say ‘download your invoice’ instead.

There is a couple of ways to do this, you can either translate the string used within that shortcode, which is ‘%sClick here for Invoice%s’, you can do this using this function:

//* Please do NOT include the opening php tag, except of course if you're starting with a blank file
function mycustom_filter_gettext( $translated, $original, $domain ) {
 
    // This is an array of original strings
    // and what they should be replaced with
    $strings = array(
        '%sClick here for Invoice%s' => '%sDownload your Invoice%s',
        // Add some more strings here
    );
 
    // See if the current string is in the $strings array
    // If so, replace its translation
    if ( isset( $strings[$original] ) ) {
        // This accomplishes the same thing as __()
        // but without running it through the filter again
        $translations = get_translations_for_domain( $domain );
        $translated = $translations->translate( $strings[$original] );
    }
 
    return $translated;
}
 
add_filter( 'gettext', 'mycustom_filter_gettext', 10, 3 );

Or another way is to manually build the link that shortcode creates using the [INVOICE_URL] shortcode, like this:

<a href="[INVOICE_URL]">Download your invoice</a>

You can add that within your message template to build the link yourself.

Does that help?


woodendnh

November 11, 2015 at 7:40 pm

Hi Tony,
Yes that’s great thanks. One thing about the newsletter template though. One of the two custom templates I want to build is a reminder to send to course attendees (ie Dear XX, your [course name] starts on [start date] at [start time]. We look forward to seeing you there. The second is literally just the company branding, but it’ll need the option to include course info (similar to the above). The newsletter template doesn’t have those shortcodes available to use. Is there a way round this please?
Cheers,
Kate


Tony

  • Support Staff

November 12, 2015 at 2:09 am

Not currently.

The newsletter is contact based, meaning it pulls in all of the contacts for the selected registrations and sends the message to those contacts, at the time of sending it has no idea which event the contact is from which is why the event shortcodes aren’t available there.

The second is literally just the company branding,

Would the branding then be used on all the messages?

Viewing 6 reply threads

The support post ‘Short codes for messages’ 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