Home › Forums › Ticket Products › Event Tickets Plus › QR code snippet update
- This topic has 11 replies, 3 voices, and was last updated 7 years, 2 months ago by Math.
-
AuthorPosts
-
January 31, 2017 at 7:10 am #1226781MathParticipant
Hi
This a follow up on this thread i created and closed,
https://theeventscalendar.com/support/forums/topic/ticket-id-in-qr-code/
I’m wondering if there is anything that can be done to tweek this great snippet by Josh.
I really need to able to export only the ticket ID so i can be able to import the CSV file to my QR code scanner. Currently this code only goes as far as reducing the attendee details to just 3 fields. This gives me a lot of manual work as i have to delete the other 2 fields to remain with ticket ID. You can imagine how much work and time it is edit a list with thousands of attendees.
The reason is that the developers of the QR code have customised their code so it can pick the ticket ID only and not the other details.The snippet below is what Josh hustled for me, which much appreciated, if only it could just leave the ticket ID.
function tec_add_ticket_id_column( $columns ) {
$columns = array();
$columns[‘ticket_id’] = ‘Ticket ID’;return $columns;
}February 1, 2017 at 1:15 pm #1227796NicoMemberHi there Math,
Thanks for getting in touch! I can help you here and see if it’s possible to have just the ticket ID column in the CSV export ๐
Before I do so, please let me know which type of tickets you are using in the site. This way I can test the solution on my end.
Also, you mention getting 3 columns in the export. Can you describe which are those?
Thanks,
NicoFebruary 2, 2017 at 12:22 am #1228049MathParticipantHi Nico
1) It looks like after the upgrade to 4.4 the the snippet stopped working so i now have all the details instead of the three. Ticket ID,”Order ID”,”Order Status”,”Ticket #”,”Customer Name”,”Customer Email Address”
2) I don’t understand the question about tickets how many tickets types are there?
February 2, 2017 at 3:18 am #1228092MathParticipantHi
I’m using RSVP and woocommerce. I Hope this the answer you’re looking for.
February 6, 2017 at 2:13 pm #1230194NicoMemberThanks for following up Math!
Indeed that was the information I wanted to have! Give me some time to dive into this, we are prioritizing new threads a bit (due to an increase in our forums activity) over help with custom dev. But I hope to get this tomorrow/wednesday if possible!
Thanks for the patience while I look into updating the snippet,
Best,
NicoFebruary 8, 2017 at 1:36 pm #1231648NicoMemberHey Math,
Thanks for the patience while I worked on this!
Adding the following line at the end of the actual snippet makes things right:
add_filter( 'tribe_events_tickets_attendees_csv_export_columns', 'tec_add_ticket_id_column' );
Please let me know if this works for you,
Best,
NicoFebruary 11, 2017 at 10:49 pm #1233485MathParticipantHi Nico,
Thanks for your help. it worked perfectly.
February 11, 2017 at 11:14 pm #1233487MathParticipantUpon further investigation, i realised that this works for the organiser as well. I’ll like the snippet to be only for admin. I input the ticket ID on my scanner app so tickets can be scanned offline (the app only picks up the ticket id). Since the ticket ID is the unique ticket identifier i wouldn’t want organisers to have access to it meaning on the orginiser dashboard they should export/email the original ticket details without the ticket id.
Sorry the back and forth
February 13, 2017 at 8:03 am #1233831NicoMemberHey Math,
No problem we can add a conditional for this. Just checking if the user is in the admin side should work:
https://gist.github.com/niconerd/914d8ca5603b648f1db0fc790b3b4910
Give it a try and let me know,
Best,
NicoFebruary 16, 2017 at 4:01 am #1238397MathParticipantThank you so much Nico.
It’s working perfectly.
February 16, 2017 at 7:02 am #1238534NicoMemberStoked to hear Math ๐
I recommend setting up a staging site to test plugin updates and make sure your customizations are still working. Most of the time they should work, but once in a while some might need an update.
Iโll go ahead and close out this thread, but if you need help with anything else please donโt hesitate to create a new one and we will be happy to assist you.
Best,
Nico -
AuthorPosts
- The topic ‘QR code snippet update’ is closed to new replies.