custom email template

Home Forums Calendar Products Community Events custom email template

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #716530
    astcit
    Participant

    Im looking to be able to put the custom field details from my event submission form in the subject line of the email and the email notification itself…
    I seem to have found aline within;
    /the-events-calendar-community-events/tribe-community-events/tribe-community-events.php
    to be able to change the subject line and contents of the email…
    but where abouts do i find the right “ID” to grab the details from my custom field?

    below is the details from the email-template.php which i thought might point me in the right direction for the ID…this snipet below is used for the events organizer, and unfortunately doesn’t help me at all finding
    <h3><?php _e( ‘Event Organizer’, ‘tribe-events-community’ ); ?></h3>
    <p><?php echo tribe_get_organizer( tribe_get_event_meta( $post->ID, ‘_EventOrganizerID’, true ) ); ?></p>

    but i used this example to point out what im looking for;
    where can i get the “_EventOrganizerID” style ID for my custom field I’ve created?

    thanks in advance for helping me out with this one, def a stickler!

    #717069
    Casey
    Participant

    astcit,
    Thanks for getting in touch! As of version 3.7 of the Community Events add-on, you can customize the email contents by overriding the email template located in ‘views/community/email-template.php’. Take a look at our themer’s guide to learn more about overriding template files.

    Unfortunately, we don’t currently have a way to change the Subject line of the email that is sent. If this is something you’d like to see in a future release, I would suggest submitting it as an idea on our UserVoice page. Our team periodically reviews the most popular ideas for possible inclusion in a future release of the plugin.

    Hopefully that gets you pointed in the right direction, but let me know if you have further questions. Thanks! πŸ™‚

    -Casey-

    #730475
    Casey
    Participant

    I just wanted to follow up and see if you’re all set here or if you still have further questions. Just let me know if you have further questions or if I should go ahead and close out this thread. Thanks! πŸ™‚

    -Casey-

    #731604
    astcit
    Participant

    unfortunately i still do need assistance on this..
    i just havent had the chance to play with it this past week due to other commitments, do you mind keeping this open until next week?

    #732074
    Casey
    Participant

    No problem! Just reply back here when you’ve had a chance to review my reply above. Thanks! πŸ™‚

    -Casey-

    #760101
    astcit
    Participant

    having a deeper look into the themer’s guide, i have found a little more help, but im still having trouble πŸ™

    i used the information from http://docs.tri.be/Events-Calendar-PRO/source-function-tribe_get_custom_field.html#156-168

    which is exactly what i need… but its not working.. still…
    ive tried so many combinations as well πŸ™

    h3><?php _e( ‘Asset’,’tribe-events-community’ ); ?></h3>
    <p><?php echo tribe_get_custom_field( tribe_get_event_meta ( get_the_ID() )); ?>
    <?php echo $label; ?>
    <?php echo $value; ?>

    <h3><?php _e( ‘Required Asset’, ‘tribe-events-community’ ); ?></h3>
    <p><?php echo echo tribe_get_custom_field(‘Required Asset’, $event->ID)

    <?php echo tribe_get_custom_field(‘CustomFieldLabel’, $eventID) ?>

    <h3><?php _e( ‘Asset’,’tribe-events-community’ ); ?></h3>
    <p><?php echo tribe_get_custom_fields( get_the_ID() ); ?>

    <h3><?php _e( ‘Asset’,’tribe-events-community’ ); ?></h3>
    <p><?php echo tribe_get_custom_field( tribe_get_event_meta ( $post->ID, ‘$eventID’, true ) ); ?></p>

    <h3><?php _e( ‘Asset’,’tribe-events-community’ ); ?></h3>
    <p><?php echo tribe_get_custom_field( tribe_get_event_meta ( $post->ID, ‘_service_id’, true ) ); ?></p>

    <h3><?php _e( ‘Requested Asset’, ‘tribe-events-community’); ?></h3>
    <p><?php echo tribe_get_custom_field( TribeEventsCustomMeta::get_custom_field_by_label( $label, $eventID ) ); ?></p>

    WHERE AM I GOING WRONG?!

    #761358
    Casey
    Participant

    astcit,
    You should be able to just do something like this in the Community email template:


    echo tribe_get_custom_field( 'The Label of your Additional Field', $tribe_event_id );

    The tribe_get_custom_field() function accepts two parameters: the field label to search for, and the Event ID. So, if you correctly pass those two variables then the correct value should be returned.

    Give that a shot and let me know if it does the trick. Thanks! πŸ™‚

    -Casey-

    #767116
    astcit
    Participant

    Hey bud,
    def tried your above code;
    echo tribe_get_custom_field( ‘asset’, $tribe_event_id );
    and then like a million combinations of what i thought the tribe event id might have been….

    <p><?php echo tribe_get_custom_field( ‘Asset’, $eventID );
    <p><?php echo tribe_get_custom_field( ‘asset’, $tribe_event_id );
    <p><?php echo tribe_get_custom_field( ‘$Asset’, $tribe_event_id );
    <p><?php echo tribe_get_custom_field( tribe_get_event_meta( $post->ID, ‘asset’, true ) ); ?></p>
    <p><?php echo tribe_get_custom_field( tribe_get_event_meta( $post->ID, ‘Asset’, true ) ); ?></p>
    <p><?php echo tribe_get_custom_field( tribe_get_event_meta( $post->ID, ‘_AssetID’, true ) ); ?></p>
    <p><?php echo tribe_get_custom_field( echo tribe_get_custom_field( ‘Asset’, $customField ) ); ?></p>
    <p><?php echo tribe_get_custom_field( echo tribe_get_custom_field( ‘Asset’, ‘$customField’, true ) ); ?></p>

    i feel like I’m stuck with such a simple problem that’s laughing at me in the face now πŸ™

    #768135
    Casey
    Participant

    astcit,
    When you look at your ‘Additional Fields’ (Events->Settings->Additional Fields), what is the label name of the field you’re trying to display (screenshot) ? The first parameter in ‘tribe_get_custom_field’ should match that field label exactly.

    I was able to successfully do this, using the following steps:

    • Perform a template override of ’email-template.php’ by copying the file to ‘MY_THEME_DIR/tribe-events/community/email-template.php’
    • Added the custom code below to ’email-template.php’


    <?php echo tribe_get_custom_field( 'Asset', $tribe_event_id ); ?>

    Then I was able to see the value of the ‘Asset’ field that was submitted via the Community form. Give those steps a try and see if there’s something that you’re missing. Thanks! πŸ™‚

    -Casey-

    #774635
    astcit
    Participant

    i bow down to you…
    i swear i tried that πŸ™
    not sure what the hell it was that i was doing wrong.
    its working now.
    you sir, are a god.

    #775464
    Casey
    Participant

    Ha! πŸ˜€ Thanks for the kind words, and glad to hear you were able to get this working.

    Since it looks like you’re all set here, I’ll go ahead and close out this thread. Feel free to create a new thread if you have further questions! Thanks! πŸ™‚

    -Casey-

Viewing 11 posts - 1 through 11 (of 11 total)
  • The topic ‘custom email template’ is closed to new replies.