Event title on checkout page

Home Forums Ticket Products Event Tickets Plus Event title on checkout page

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #109625
    rpphotography
    Participant

    Hi,

    When adding tickets to the cart it displays their title. Is it possible to display the event title that each ticket is related to?

    #110007
    Barry
    Member

    Definitely possible. One avenue would be to customize the cart template (supplied by EDD) and add some logic there, the other would be to avoid that and do this purely using actions and filters – it’s not so much a matter of the correct approach, but of the best approach for you.

    From there you’d ideally grab the post ID for the EDD product and work backwards from there to determine if it is associated with an event and what that event is. The relevant relationship is stored as post meta data:

    • The source event has a meta key named _tribe_eddticket_for_event
    • The value of that entry, if the entry exists, is the ticket (download product) post ID
    • So by searching for a meta value equal to the relevant product ID is, and retrieving the post ID it is associated with, you can then load any and all details relating to the source event – including the title

    I hope that helps or at least gets you started in the right direction 🙂

    #110834
    rpphotography
    Participant

    Worked perfectly, thanks! 🙂

    #138266
    Barry
    Member

    Closing this thread as it’s been quite a while – of course if we can help with anything else please do create a new thread. Thanks!

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Event title on checkout page’ is closed to new replies.