I am using EE3 with multiple event attendees registration plugin add-on. I want my invoice to be printed with VAT details and event charges separately for each attendees and with a summation of VAT + Total charges and a grand total.
I am modifying the invoice payment gateway template to show the VAT.
I need to show surcharge (VAT) as separate column.
I have managed the template UI, but I am stuck at the point to fetch the attendee specific price plan. As the EE DB structure does not create any direct or indirect relation between the event_attendees table and event_prices table.
Here’s some example code that might get you on the right track:
// pull the selected ticket price breakdown from the database
global $wpdb;
foreach( $registration_ids as $registration_id ) {
$price_query = "SELECT event_id, price_option FROM " . EVENTS_ATTENDEE_TABLE . " WHERE registration_id=%s";
$att_price_info = $wpdb->get_results( $wpdb->prepare($price_query, $registration_id ));
foreach ( $att_price_info as $price_item ) {
$event_id = $price_item->event_id;
$price_option = $price_item->price_option;
}
$SQL = "SELECT event_cost FROM " . EVENTS_PRICES_TABLE . " WHERE event_id=%d AND price_type=%s ORDER BY id ASC LIMIT 1";
$single_cost = $wpdb->get_var( $wpdb->prepare( $SQL, $event_id, $price_option ));
}
Viewing 1 reply thread
The support post ‘Fetch attendee specific price plan’ 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.