Home › Forums › Ticket Products › Event Tickets Plus › QR Code Check in Info
- This topic has 9 replies, 3 voices, and was last updated 9 years, 6 months ago by
Brad.
-
AuthorPosts
-
September 24, 2016 at 1:22 pm #1168391
Brad
ParticipantWe 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
September 26, 2016 at 11:59 am #1168856Nico
MemberHi 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,
NicoSeptember 26, 2016 at 12:27 pm #1168868Brad
ParticipantYes,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.
September 27, 2016 at 7:43 am #1169197Nico
MemberThank 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,
NicoSeptember 28, 2016 at 6:41 pm #1170166Brad
ParticipantIf 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?
September 28, 2016 at 7:00 pm #1170170Brad
ParticipantI 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?
September 29, 2016 at 6:33 am #1170320Nico
MemberThanks 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,
NicoSeptember 29, 2016 at 5:25 pm #1170781Brad
ParticipantI have used code snippets to add this code to the site. Works perfectly, thanks for the assistance!
September 30, 2016 at 6:04 am #1170959Nico
MemberYou 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 -
This topic was modified 9 years, 7 months ago by
-
AuthorPosts
- The topic ‘QR Code Check in Info’ is closed to new replies.
