Home › Forums › Ticket Products › Event Tickets Plus › How to generate tickets again after the check in (function)?
- This topic has 16 replies, 3 voices, and was last updated 5 years, 11 months ago by Cliff.
-
AuthorPosts
-
February 26, 2018 at 12:07 pm #1464105IlkkaParticipant
Hi,
We have a situation that we would like to generate the tickets again after the check in is made. This is because we have customised the tickets that they will get a checked in label. This will lead to a situation that we would like to resend the newly generated tickets to the customer. For example: You have checked in here is your new tickets.
So best option would be to know if there is a function to generate the tickets again. I am talking also about the PDF ticket.
Or is there a hook, action or function to resend it as fresh tickets. Like they never existed before…
thanks
February 27, 2018 at 9:31 pm #1465551CliffMemberHi. Are you saying that a new email with the PDF ticket is attached, but the PDF ticket does not have the “Checked In” label on it because the ticket.pdf file already existed but it was the old one without the “Checked In” label?
February 27, 2018 at 10:31 pm #1465568IlkkaParticipantHi,
Thanks for your answer. I am mainly looking for a function that i could resend the tickets. Because we have a solution for generating the tickets again after they have been checked in and received our custom label. So our pdf ticket has the checked in label. We just do not know how to send the tickets for the customer.
So if we really simplify this. What is the function to send the tickets to the customer, or action or hook? How can we trigger the action of sending the tickets to the customer.
Thanks
February 27, 2018 at 10:44 pm #1465574IlkkaParticipantHi,
And totally another thing. We previously had another discussion of styling the pdf. I have 100% perfect now. I wanted to let you know that if there is a space in the styling (inline) it will cause many problems to the styling of the pdf.
For example:
CORRECT<
h6 style=”margin:0 0 10px 0″>
THIS WILL cause almost all styling to break in the pdf.
<
h6 style=”margin:0 0 10px 0″>
Notice the break after first ”
Out of the topic, but wanted you to know.
thanks.
February 27, 2018 at 10:54 pm #1465578IlkkaParticipantHi,
I noticed that it will not display html in this board correctly, maybe blocked. Here is an image for you.
Thanks.
February 28, 2018 at 8:35 pm #1466710CliffMember1)
If using WooCommerce tickets, you can resend a ticket email by going to the order and choosing that order action. Here’s a quick video (no audio): https://cl.ly/0x0K3j2F1U2m
2)
Thanks for the heads up here. Where are you adding such CSS?
You could report this issue to https://github.com/mpdf/mpdf/issues if it’s reproducible.
February 28, 2018 at 8:45 pm #1466716IlkkaParticipantHi,
Thanks for your answer. Yes i know that this actions exists in the orders in woocommerce and it has proven to be very useful also. But we are looking the exact same function, but we need to rigger this automatically. So what is the function to trigger this action (of sending the tickets to the customer email)?
As we have loads of tickets send daily to the customer we can not go through all the events and look for the order and make it manually, we need to have it automatically. I know you have this function as it is working fine, but the problem is we do not know it. 🙂
Thanks.
February 28, 2018 at 9:24 pm #1466747CliffMemberThis all happens by extending WooCommerce’s email class and then this class gets added via the woocommerce_email_classes filter.
For more details, you can search /wp-content/plugins/event-tickets-plus/src/Tribe/Commerce/WooCommerce/Main.php for “add_email_class_to_woocommerce” and also review /wp-content/plugins/event-tickets-plus/src/Tribe/Commerce/WooCommerce/Email.php
I’m unsure how/where you could add all this as a button to loop through all attendees, though.
February 28, 2018 at 9:24 pm #1466748IlkkaParticipantHi,
I try to make it as clear as possible:
How to call this from a hook or from our own plugin.
Thanks.
March 1, 2018 at 12:36 pm #1467656CliffMemberAlthough untested, one or both of these might work:
- Tribe__Extension::instance( ‘Tribe__Extension__PDF_Tickets’ )->do_upload_pdf( /*…args…*/ );
- Tribe__Tickets_Plus__Commerce__WooCommerce__Main::get_instance()->send_tickets_email( /*…args…*/ );
That being said, if you successfully send a new email, I believe it would send the existing PDF file and not generate a new one with your added customized styling/watermark image.
Therefore, I’ve logged a feature request for the PDF Tickets extension to be able to force-overwriting the existing PDF.
March 1, 2018 at 7:34 pm #1467882IlkkaParticipantHi,
I will try it. And let you know.
Thanks.
March 2, 2018 at 10:48 am #1468520CliffMemberThanks for checking in. I’ll wait to hear from you.
Please note that threads get Closed automatically after a couple weeks of inactivity. If it does get Closed, please open a new thread, adding your current problem description and also linking back to this thread.
Thank you!
March 3, 2018 at 10:45 am #1469175IlkkaParticipantHi,
Thanks for your answer. It was showing us the right way.
We are doing some stuff before, but this will do the trick for us.
Tribe__Extension::instance( ‘Tribe__Extension__PDF_Tickets’ )->do_upload_pdf( $attendee_id );
$order_ref = get_post_meta($attendee_id,‘_tribe_wooticket_order’,true);
Tribe__Tickets_Plus__Commerce__WooCommerce__Main::get_instance()->send_tickets_email( $order_ref );Thanks.
March 3, 2018 at 10:46 am #1469176IlkkaParticipantSo, this case is solved. Great work.
ilkka
March 8, 2018 at 10:47 am #1473716CliffMemberGlad to hear and thanks for letting us know.
-
AuthorPosts
- The topic ‘How to generate tickets again after the check in (function)?’ is closed to new replies.