QR Code Check in Info

Home Forums Ticket Products Event Tickets Plus QR Code Check in Info

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #1168391
    Brad
    Participant

    We used this plugin at a recent event and for the most part it worked great. We had a few issues where scanning the barcode showed they were already checked in, but when looking in the attendees list, it showed they weren’t. We also had a few issues with the barcode scanner we were using, not capturing anything after the ? in the URL. Using android tablets and testing, we found that this code scanner worked best. QR Code Reader “Q” -FREE-. So far in testing, you can set it to open in a external browser, we use chrome, and also have it open the link after scanning.

    My question is, when scanning to check in, it shows at the top of the screen, ticket “XX” has been checked in. We use different seating and ticket types, Seating, standing, VIP, etc. We could always scroll down and search, but is there a way to have the text display the ticket type after verifying checkin? Instead of the person having to search or grab the paper of phone used to checkin from the customer?

    • This topic was modified 9 years, 7 months ago by Brad. Reason: verbiage
    #1168856
    Nico
    Member

    Hi Brad,

    Thanks for getting in touch with us! Interesting question here πŸ™‚

    First of all thanks for the detailed explanation of the issue and for the recommendation of the QR scan app!

    Regarding the issue you mention, taking a look to the code it seems possible to show a custom notice. But before I give this customization a try I would like to confirm if by ‘Ticket type’ you are referring to the ticket name field (https://cloudup.com/cdc4tZhuehz).

    Please let me know about it,
    Best,
    Nico

    #1168868
    Brad
    Participant

    Yes,exactly. Once they scan the QR code,and they are redirected to the checkin page where it displays ticket XXX is checked in, I would like it to display “ticket XXX checked in – ticket name”. It would be quicker verification than having to scroll down to search for the ticket to see what type of seat they have.

    #1169197
    Nico
    Member

    Thank for confirming Brad πŸ™‚

    Just paste the snippet below in your theme’s (or child theme’s) functions.php file:

    /* Tribe, use custom QR checked in notice */
    if ( class_exists('Tribe__Tickets_Plus__Main') ) {

    // remove default notice
    remove_filter( 'admin_notices', array( Tribe__Tickets_Plus__Main::instance()->qr(), 'admin_notice' ), 10 );

    // add custom post QR check in notice
    function tribe_custom_qr_checked_in_notice ( ) {
    if ( empty( $_GET['qr_checked_in'] ) ) {
    return;
    }

    //Use Human Readable ID Where Available for QR Check in Message
    $ticket_id = absint( $_GET['qr_checked_in'] );
    $checked_status = get_post_meta( $ticket_id, '_tribe_qr_status', true );
    $ticket_unique_id = get_post_meta( $ticket_id, '_unique_id', true );
    $ticket_id = $ticket_unique_id === '' ? $ticket_id : $ticket_unique_id;

    $ticket_type = '';

    // asumming it's a woo ticket get the product id
    $product_id = get_post_meta( absint( $_GET['qr_checked_in'] ), '_tribe_wooticket_product', true );

    if ( $product_id ) {
    $ticket_type = ' (' . get_the_title( $product_id ) . ')';
    }

    //if status is qr then display already checked in warning
    if ( $checked_status ) {
    echo '

    ';
    printf( esc_html__( 'The ticket with ID %s has already been checked in.', 'event-tickets-plus' ), esc_html( $ticket_id . $ticket_type ) );
    echo '

    ';
    } else {
    echo '

    ';
    printf( esc_html__( 'The ticket with ID %s was checked in.', 'event-tickets-plus' ), esc_html( $ticket_id . $ticket_type ) );
    echo '

    ';
    //update the checked in status when using the qr code here
    update_post_meta( absint( $_GET['qr_checked_in'] ), '_tribe_qr_status', 1 );
    }
    }

    add_filter( 'admin_notices', 'tribe_custom_qr_checked_in_notice' );
    }

    Give a try and let me know if it works as expected! Also, please note the code assumes the tickets are WooCommerce Tickets (from your system info I see this is the provider you use in your site).

    Best,
    Nico

    #1170166
    Brad
    Participant

    If I add it to my functions.php, I will lose this when I update correct? How would I add it so I don’t lose this feature when I update, or would I have to add this code every time?

    #1170170
    Brad
    Participant

    I added the code and it works wonderfully! Just what I need. I just need to know if I would have to modify this each time I update my theme?

    #1170320
    Nico
    Member

    Thanks for confirming Brad πŸ™‚

    To safely store customizations (template override, coded added to the functions.php file, etc) you’ll need to create a Child Theme. It’s super simple β†’ WordPress Codex – Child Themes.

    Another way around this is to use a plugin to store code tweaks, for example β†’ Code Snippets plugin. Or you can also develop a custom plugin to store these β†’ WordPress Codex – Writing a Plugin.

    Cheers,
    Nico

    #1170781
    Brad
    Participant

    I have used code snippets to add this code to the site. Works perfectly, thanks for the assistance!

    #1170959
    Nico
    Member

    You are welcome Brad! Glad to be of service πŸ™‚

    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.

    Have a great weekend,
    Nico

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘QR Code Check in Info’ is closed to new replies.