Add link to book tickets from Event list

Home Forums Ticket Products Event Tickets Plus Add link to book tickets from Event list

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #105843
    Marcus J Wilson
    Participant

    Hi –
    Within the Events Calendar events list, we need to be able to display a message “Tickets Available” next to events for which WooTickets currently has tickets for sale.
    I’ve looked through the documentation, but couldn’t find a function that would do this check. Can you point me in the best direction?
    Thanks
    Marcus

    #106021
    Barry
    Member

    Hi Marcus,

    So you’d need to do a little customization work and reading through The Themer’s Guide is a great idea if you have not already done so, for a high level view of some of the basics.

    To the specific issue at hand, though not something Modern Tribe officially supports, this library of helpers and this related recipe (for showing sold out notices – but you could of course adapt it to your own situation) should show the basic strategy for doing something like you are asking about. You are more than welcome to simply rip out the code you need and use it within your own solution, you don’t actually need to use that library.

    Hope that helps!

    #106034
    Marcus J Wilson
    Participant

    Great, Barry – thanks.
    So, if we used the conditional if (!woot_has_soldout()) against the Event ID within the loop, would this be sufficient logic to assume that (a) the event is an event for which tickets exist in Woo, and (b) there are still tickets left for purchase? If so, that would suffice for our requirements.
    Thanks
    Marcus

    #106484
    Barry
    Member

    Hi! I’d suggest using woot_has_tickets() in combination with that to avoid false positives, ie:

    if ( woot_has_tickets() && woot_has_soldout() ) { /* Do stuff */ }

    Definitely experiment, play and adapt to suit your needs 🙂

    #112851
    Barry
    Member

    I’ll go ahead and close this one – but if we can assist with anything else please don’t hesitate to create new threads as needed. Thanks!

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Add link to book tickets from Event list’ is closed to new replies.