Events Made Easy › Forums › Bug fixed or feature request implemented › pdf-ticket is not attached when booking is confirmed
- This topic has 5 replies, 2 voices, and was last updated 2 years, 11 months ago by Franky.
-
AuthorPosts
-
Sun 2 Jan 2022 at 15:55 #63673AnonymousInactive
Hi Franky,
unfortunately, the pdf-ticket doesn’t get attached automatically (any more) to the email when a booking is confirmed using bulk action “Buchung bestägtigen” (confirm booking) (To be more precise: the pdf-Ticket isn’t created at all)
If I apply “Versende E-Mail für unbestätige Buchung erneut” (send e-mail for unconfirmed booking again) the attachment is created and attached to the email.
Under “Allgemeine Buchungs-Informationen” (general booking Information) the template for the pdf-ticket is set and the “Päferenz für Ticket-Mail” (preference for ticket mail) is set to “Bei Bestätigung” (on confirmation).
Do you have any ideas what I possibly have done wrong?
Greetings and by the way: a happy new year
HeinerSun 2 Jan 2022 at 16:21 #63674AnonymousInactiveI think my problem could relate to following code:
If $mailing_approved, pdf-Ticket is generated correctly
Eme_rsvp.php
Line 2950 ….
if ($mailing_approved) {
$template_id=$event[‘event_properties’][‘ticket_template_id’];
if ($template_id && ($event[‘event_properties’][‘ticket_mail’]==’approval’ || $event[‘event_properties’][‘ticket_mail’]==’always’))
$ticket_attachment = eme_generate_booking_pdf($booking,$event,$template_id);If “default” (including approval) pdf-ticket is only generated, when option is set to “booking” or “all”, so it won’t be generated on approval like above
Line 3175 …
default:
// this is the case when booking from frontend happened, there we decide pending or approved based on event and booking properties
// send different mails depending on approval or not
if (!$booking[‘booking_approved’] && ($event[‘registration_requires_approval’] || $booking[‘waitinglist’])) {
if ($mailing_pending) {
$template_id=$event[‘event_properties’][‘ticket_template_id’];
if ($template_id && ($event[‘event_properties’][‘ticket_mail’]==’booking’ || $event[‘event_properties’][‘ticket_mail’]==’always’))
$ticket_attachment = eme_generate_booking_pdf($booking,$event,$template_id);Sun 2 Jan 2022 at 16:46 #63675FrankyKeymasterThis should fix it:
https://plugins.trac.wordpress.org/changeset/2651855/Sun 2 Jan 2022 at 17:00 #63676AnonymousInactiveI’ll try that – I think I just changed the wrong line.
Sun 2 Jan 2022 at 17:37 #63677AnonymousInactiveMany thanks,
works like a charm now.Sun 2 Jan 2022 at 17:45 #63678FrankyKeymasterThanks for the confirmation. I optimized the code in a previous version but forgot to take into account the time of sending for the ticket. I’ll release a new version since I assume others will be impacted too.
-
AuthorPosts
- The forum ‘Bug fixed or feature request implemented’ is closed to new topics and replies.