Prepopulate Attendee Information on purchased ticket…

Home Forums Ticket Products Event Tickets Plus Prepopulate Attendee Information on purchased ticket…

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1291521
    Doyle
    Participant

    Hi,

    Would Nico be able to assist me applying this concept to the Events Tickets Plus? I would like to retrieve the current logged in user information to populate the First and Last name of the attendee automatically.

    Here is the link from a previous snippet for RSVP’s.

    Populate RSVP form if user logged in

    #1292673
    Victor
    Member

    Hi Doyle!

    Thanks for reaching out to us! I’d be happy to help you with this 🙂

    Nico is already out today, so I took a look at his gist to see how it works. With tickets to sell, this would have to be a totally different approach from that of RSVPs, and would involve some deeper customization.

    In this case, attendee information would be repeated for every ticket and not just once per purchase. Do you still want to populate every attendee with the same First and Last Name? could you please tell me how would you want to address this situation? Perhaps you should only populate the first ticket? Let me know about it.

    Just to set expectations right, we are fairly limited in the amount of support we can give for customizations like these. That said, we always like helping out and at least point you in the right direction. So let us know more about this and I’ll be happy to help as much I can.

    Best!
    Victor

    #1292702
    Doyle
    Participant

    Hi Victor,

    Yes, for sure the first ticket I would like to have the first and last name
    auto-populated but still editable in case they want to change it. If they
    put multiples in, ideally it would auto-populate the last name only or not
    populate anything but the first one. I appreciate any help you can provide
    to get me going in the right direction!

    #1293569
    Victor
    Member

    Hi Doyle!

    Thanks for coming back and clearing that out.

    You should be able to customize the attendee fields by using the ‘event_tickets_plus_meta_fields_by_ticket’ filter like this:

    add_filter('event_tickets_plus_meta_fields_by_ticket','auto_populate_ticket_fields');
    function auto_populate_ticket_fields($fields, $ticket_id) {
    //Do something with $fields
    return $fields;
    }

    That filter gets called inside the get_meta_fields_by_ticket() function which is used in the meta.php template file located at /wp-content/plugins/event-tickets-plus/src/views/

    I know this is only as a starting point for you to customize the output of the get_meta_fields_by_ticket() function.

    I hope that helps and let me know if you have questions about it.

    Best!
    Victor

    #1308787
    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 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Prepopulate Attendee Information on purchased ticket…’ is closed to new replies.