Ability to Add View / Print Tickets from Account Page

Home Forums Ticket Products Event Tickets Plus Ability to Add View / Print Tickets from Account Page

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #1595041
    dglogowski
    Participant

    I am selling event tickets and would like to provide my members to easily access all their tickets in a single place; specifically from their account page. I am using WooCommerce My Account as the member account area and want to create a custom endpoint (menu item) with a list of all tickets in one place. As part of this capability, I want to offer the user the ability to download their tickets (I am looking to use the PDF Ticket extension).

    The optimal solution would provide a table with columns containing:

    – Event Title (linked to event post) with date and location (on line below event title)
    – Ticket Title
    – Ticket Qty
    – Order Status
    – Action (view ticket, edit attendee information, print tickets)

    Is there an existing extension or snippet that can achieve this?

    I am currently test solutions to this on my local development site

    Cheers,
    Dave

    • This topic was modified 5 years, 8 months ago by dglogowski.
    • This topic was modified 5 years, 8 months ago by Cliff.
    #1596187
    Cliff
    Member

    Hi, Dave. Thanks for your detailed question.

    The PDF Tickets extension (https://theeventscalendar.com/extensions/pdf-tickets/) is the solution for both viewing and saving/printing. The browser will display the PDF, and the user can save/print from there.

    It is only available per ticket. It sounds like you’re also wanting this: https://theeventscalendar.com/knowledgebase/display-a-list-of-attendees-events/

    Please let me know if you have any follow-up questions on this topic.

    #1596197
    dglogowski
    Participant

    Cliff,

    Thanks for the quick reply…Monday’s have got to suck with a large backlog of questions from over the weekend.

    While the display-a-list-of-attendees-events works, it’s not as elegant or simple as I was looking to implement. It requires the user to click through 3 screens to get to the View My Tickets page and then there is not an option to see the PDF ticket. Am I missing something here. Attached is screenshot of the screen once I click the View My Tickets on the event page.

    Basically, I was looking to replicate something similar to WooCommerce’s order endpoint. A table of the events with an action button to directly view the ticket (via the pdf extension).

    #1596452
    Cliff
    Member

    It’s a good idea to add a PDF Ticket link to each event they’ve attended — via that shortcode — but that isn’t really possible as there isn’t a hook available here: /wp-content/plugins/event-tickets/src/views/shortcodes/my-attendance-list.php

    You could choose to add that yourself, by following our Themer’s Guide (our “how-to” walk-through video may prove helpful)

    I thought it was going to be easier than it turned out to be, but here’s a template override file for you: https://cl.ly/271Q3K072a1u

    https://gist.github.com/cliffordp/68e3fde2c05efc61b9df9688a3fb5d53

    Please let me know how this goes for you.

    #1596609
    dglogowski
    Participant

    Cliff,

    Thanks. A tremendously helpful response!!!

    Let me look through the code, give it a try and get back with you.

    Additional question: On the standard “View My Tickets” page, the user is able to update their attendee information. The knowledge base article discusses how to enable it (articles states it is disabled by default). How can I disable it?

    Why — I ask for their meal selection, but I can’t have them make changes to the selection after I order the meals from the vendor. Or changes to their badge name after I generate the badges. (CSV export of attendees and merge in document for printing) A feature here would be allow the admin to set a cut-off date for the user to edit. This could be in the ticket fieldset meta box and then checked compared when executing the “View My Ticket” code. The default of blank/empty date means not cut-off. Just a thought.

    #1596651
    Cliff
    Member

    You bet. Going over the top for you today!

    Here’s another snippet to allow the attendee information to be viewable but not editable:

    https://gist.github.com/cliffordp/5bf5a283b2b3ffaf64c119d86613ced0

    Please reference https://theeventscalendar.com/knowledgebase/implementing-custom-code-snippets/ for how to implement custom code snippets.

    Give these snippets a snot and let me know how they go for you.

    Also, please link me to where you saw mention of allowing/disallowing editing, as I’m unfamiliar with that reference.

    Thank you.

    #1596760
    dglogowski
    Participant

    Cliff,

    Against my better judgement, stayed up to get this close to what I am looking for — see screenshot. You are awesome! Aside from creating table vice lists, the only code I modified was the if-statment’s operator:

    if ( $current_user == absint( $attendee[‘user_id’] ) ) {

    Also changed the PDF instance to ‘get_pdf_link’ in order to embed in button.

    I did have an issue with placing this file in the child-theme directory (as per path in your snippet). Since I am working on my localhost dev site, I just went ahead and edit the plugin file, but backup copies abound. Something to look at another day.

    Thanks for the additional code snippet; I review that tomorrow night. I found the reference about editing tickets in the knowledge base – Tickets: Managing Your Orders and Attendees — its near the bottom of the article. (screenshot also included; and here is link: https://theeventscalendar.com/knowledgebase/managing-your-orders-and-attendees/)

    Now that this is proven, I’ll work the CSS after looking at the disable edit tickets and the next proof of concept is complete.

    I can’t thank you enough for the help!

    Cheers,
    Dave

    #1597605
    Cliff
    Member

    Thanks for the kind words. I’ve updated the KB article to be clearer and to add the snippet I came up with for you (FYI, I updated it to account for more things on an events’ /tickets page, so give it another look).

    Regarding your code tweak, $current_user is an integer, which is why I wrapped the user_id in absint(), since it is a numeric string — which is why I was then able to use === instead of ==
    (Obviously, you can stick with your preference.)

    For the template override, see the top of the template’s comments; it tells you exactly where to put it.

    Your table view screenshot of the [tribe-user-event-confirmations] template looks nice! You’re welcome to share your code for others once you’ve got it ready.

    If you’re okay with it, maybe we could even enhance our template to be more like yours. You could just give me your template snippet and the okay here, or you could actually submit a pull request to https://github.com/moderntribe/event-tickets/blob/master/src/views/shortcodes/my-attendance-list.php

    #1614316
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Ability to Add View / Print Tickets from Account Page’ is closed to new replies.