Plugin Directory

Changeset 1149350


Ignore:
Timestamp:
04/29/2015 06:10:07 PM (11 years ago)
Author:
avdude
Message:

adding changes to use [custom] in attendee confirmation email to include custom questions/responses in the attendee confirmation mail.

Location:
event-registration/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • event-registration/trunk/public/evr_public-process_confirmation.php

    r1139578 r1149350  
    187187    }
    188188    $payment_link = evr_permalink($company_options['return_url']). "id=".$reg_id."&fname=".$reg_form['fname'];
     189    //Get responses to custom questions
     190    $events_answer_tbl = get_option('evr_answer');
     191    $events_question_tbl = get_option('evr_question');
     192    $qry = "SELECT ".$events_question_tbl.".id, ".
     193                                $events_question_tbl.".sequence, ".
     194                                $events_question_tbl.".question, ".
     195                                $events_answer_tbl.".answer ".
     196                                " FROM ".$events_question_tbl.", ".$events_answer_tbl.
     197                                " WHERE ".$events_question_tbl.".id = ".$events_answer_tbl.".question_id ".
     198                                " AND ".$events_answer_tbl.".registration_id = ".$reg_id.
     199                                " ORDER by sequence";
     200     $rows = $wpdb->get_results( $qry);
     201        if ($rows){
     202            foreach ($rows as $answer){
     203                $custom_responses .=  $answer->question."   ".$answer->answer."<br/>";
     204            }
     205        }
    189206    //search and replace tags
    190207    $SearchValues = array(  "[id]","[fname]", "[lname]", "[phone]",
     
    219236                            "[contact]", "[coordinator]","[company]", "[co_add1]", "[co_add2]", "[co_city]", "[co_state]","[co_zip]",
    220237                            "[payment_url]", "[start_date]", "[start_time]", "[end_date]","[end_time]",
    221                             "[num_people]","[attendees]","[tickets]");
     238                            "[num_people]","[attendees]","[tickets]","[custom]");
    222239    $ReplaceValues = array($reg_id, $reg_form['fname'], $reg_form['lname'], $reg_form['phone'],
    223240                            $reg_form['address'], $reg_form['city'], $reg_form['state'], $reg_form['zip'], $reg_form['email'],
     
    227244                            $company_options['company_state'], $company_options['company_postal'],
    228245                            $payment_link , $start_date,$start_time, $end_date, $end_time,
    229                             $reg_form['quantity'],$attendee_names, $ticket_list);
     246                            $reg_form['quantity'],$attendee_names, $ticket_list, $custom_responses);
    230247    $wait_message_replaced = str_replace($SearchValues, $ReplaceValues, $wait_message);
    231248    if ($reg_form['reg_type']=="WAIT"){$email_content = $wait_message_replaced;}
  • event-registration/trunk/readme.txt

    r1148134 r1149350  
    111111* Changed color picker from Farbtastic to wp-color-picker
    112112* Changed public style to resolve conflict with themeforest themes
     113* Added ability to add custom question responses to attendee confirmation emails. Use tag [custom].
    113114
    114115= Version 6.01.08 =
Note: See TracChangeset for help on using the changeset viewer.