QR code snippet update

Home Forums Ticket Products Event Tickets Plus QR code snippet update

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #1226781
    Math
    Participant

    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;
    }

    #1227796
    Nico
    Member

    Hi 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,
    Nico

    #1228049
    Math
    Participant

    Hi 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?

    #1228092
    Math
    Participant

    Hi

    I’m using RSVP and woocommerce. I Hope this the answer you’re looking for.

    #1230194
    Nico
    Member

    Thanks 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,
    Nico

    #1231648
    Nico
    Member

    Hey 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,
    Nico

    #1233485
    Math
    Participant

    Hi Nico,

    Thanks for your help. it worked perfectly.

    #1233487
    Math
    Participant

    Upon 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

    #1233831
    Nico
    Member

    Hey 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,
    Nico

    #1238397
    Math
    Participant

    Thank you so much Nico.

    It’s working perfectly.

    #1238534
    Nico
    Member

    Stoked 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

Viewing 11 posts - 1 through 11 (of 11 total)
  • The topic ‘QR code snippet update’ is closed to new replies.