I see in invoice_vars.php that there is a link with with a variable: download_invoice=true. I’m wondering if there is a variable I could use to have them email the invoice to themselves, like email_invoice=true.
No not as far as I am aware, however in their email you can add the [invoice_link] tag so they can obtain the invoice directly from their registration email.
I included the registration ID and the organization name in the URL for the next page. In the payment_overview.php in templates I added the following code to email the invoice:
<?php
if(isset($_SESSION['emailed'])&&$_SESSION['emailed']==$registration_id){
echo stripslashes_deep($email);
}else{
if(event_espresso_send_invoice( $_REQUEST['r_id'], 'Payment Reminder for [event]', 'Dear [fname] [lname], Our records show that we have not received your payment of [cost] for [event_link]. Please visit [payment_url] to view your payment options.[invoice_link]Sincerely,' . $_REQUEST['org'] . '')){
echo 'Did not work. <a href="' . home_url() . '/?download_invoice=true&attendee_id=' . $attendee_id . '&r_id=' . $registration_id . '">Please Download Invoice</a>.';
}else{
echo stripslashes_deep($email);
$_SESSION['emailed'] = $registration_id;
}
}
?>
Works great! 🙂
Viewing 2 reply threads
The support post ‘Easy way to allow attendees to email invoice to themselves’ 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.
Support forum for Event Espresso 3 and Event Espresso 4.