Email RSVP help

Home Forums Calendar Products Events Calendar PRO Email RSVP help

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1140480
    David
    Participant

    Hello,

    I am trying to add an RSVP via email to my Event Detail page’s template and have got it pretty close by using the following to create an email with the event’s category and start/end dates in the subject line:


    %20|%20<?php echo tribe_get_start_date(); ?>%20-%20<?php echo tribe_get_end_date(); ?>"

    This works great in FF and Safari, but not in Chrome. I am not a developer but assume it could be due to the spaces that those tribe functions spit out that are not “%20″s?

    Can anything be done to remedy this? So close to a solution here!

    Thanks

    #1140485
    David
    Participant

    Looks like that code didn’t come out right above, let’s try again…

    %20|%20<?php echo tribe_get_start_date(); ?>%20-%20<?php echo tribe_get_end_date(); ?>”

    • This reply was modified 7 years, 9 months ago by David.
    #1140490
    David
    Participant

    Sorry, here’s a screenshot of the code I’m trying to post!

    #1140945
    David
    Participant

    I’ve been trying to tinker around with Event Tickets plugin and that may be a better solution if can’t get the above working in Chrome.

    In which case, I have a few questions about Event Tickets:

    1) Can I prevent an email confirmation from going out at all when a user fills out the RSVP? I found a function in the forums that allows a redirect to a confirmation page, which is plenty.

    2) We *do* want an email confirm to go to the organizer however.

    3) If that is not possible to prevent the email to the user, how do we customize the subject line of the email confirmation? We don’t want to refer to the RSVP’s as “tickets”, but the subject line says “Your tickets from (company name)”.

    Thanks

    #1141037
    George
    Participant

    Hey @David,

    Thanks for reaching out.

    For starters, just to set your expectations early, we cannot assist with custom coding as per our support guidelines. You can find out more about these rules here ? https://theeventscalendar.com/knowledgebase/what-support-is-provided-for-license-holders/


    1. The “RSVP via Email”

    When it comes to the RSVP-via-email idea you are working on, this may take some more tinkering and may not even be possible to the degree that you want it to be possible.

    One thing that may help is to ensure that you are URL-encoding all of the output of The Events Calendar’s template tags. So, for example, instead of just echo tribe_get_start_date();, you may find more success by using echo urlencode( tribe_get_start_date() );. Next, I noticed your code uses a function called tribe_get_text_categories() — this is not a function that we make or that is available in any of our plugins, so I assume this is a function you have written yourself. If so, ensure that the function is not producing errors. (It’s probably not, but just wanted to highlight this!)


    2. Modifying the RSVP Email Subject and Recipient

    You ask about preventing the RSVP email confirmation from being sent to the attendee—this is indeed possible, especially because you then ask if you can have the confirmation go to the event organizer instead.

    So, what you can do here is basically kill two birds with one stone by just changing the “recipient” of the RSVP confirmation emails. By default, the recipient is the attendee. But you can use a filter to change the email address to that of an organizer. So, something like this:

    add_filter( 'tribe_rsvp_email_recipient', 'tribe_modify_the_rsvp_email_recipient' );

    function tribe_modify_the_rsvp_email_recipient( $to ) {
    return '[email protected]';
    }

    ☝️ In that case, the replacement recipient’s email address is hard-coded. You can make this dynamic, so that it automatically uses the email address of the event organizer instead, but that would require some further and extensive coding.

    Now that the confirmation emails will go to the organizer instead of the attendee, you can change the subject line using another filter called tribe_rsvp_email_subject.

    So, if you wanted to change the subject to, “Your RSVP information!”, you would use code like this:


    add_filter( 'tribe_rsvp_email_subject', 'tribe_modify_the_rsvp_email_subject' );

    function tribe_modify_the_rsvp_email_subject( $subject ) {
    return 'Your RSVP information!';
    }


    To truly get things exactly how you envision them, you will have to take the reins from here for the most part—we are not able to help with customizing and coding, but I hope my examples and information help!

    Best of luck with your customizing,
    George

    #1141177
    David
    Participant

    Hi George,

    It was actually someone on your end who created the function, see here:
    https://theeventscalendar.com/support/forums/topic/display-just-category-name/

    Your snippets above worked for me, I think we’ve got it working well now. I realize you can’t give me the complete answer but if you could point me at any hint on how to make that email recipient dynamic to the organizer rather than hard wired, that’d be appreciated, but understand if beyond scope of support.

    Thanks for your help
    Dave

    #1141502
    George
    Participant

    Thanks for sharing the source of that function! I’m glad to see it was created by a support team member; it’s still not an “official” function that is from within the plugin code itself, so that’s worth keeping in mind, but I am glad it’s useful.

    When it comes to making the organizer email recipient dynamic, this is unfortunately a bit outside the scope of support, but here some closing thoughts on it from me that might be helpful/revealing.

    One of the tricky things about it is that, to get the Organizer’s email address, you need to get the Organizer ID of the event. To do that, you need the Event ID of the event.

    In many cases, this is as easy as using the WordPress function get_the_ID(), but this will not really work here. To see why, head into this file to see where the ‘tribe_rsvp_email_recipient’ action is fired:

    event-tickets/src/Tribe/RSVP.php

    The best hope I can think of is that the variable $order_id may be available, which can be tinkered with and you may be able to extract the event IDs from this reliably, but is tricky. 🙁

    I personally think this should be much easier, and your request here has prompted me to make a proposal for modifying the filters in our plugin to include the Event ID as an argument right from the start; this would make it basically trivial to achieve the sort of dynamic organizer-based thing you are trying to do, for example.

    I am sorry for the trouble here, Dave! Hopefully in the coming weeks and months we make these filters easier to work with in terms of the event ID and such…for now, a great deal of tinkering is unfortunately required here.

    Please let me know what further thoughts you might have on this, and if there are any other issues I can try to help with.

    Sincerely,
    George

    #1150047
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Email RSVP help’ is closed to new replies.