Following this : Add support for waiting list on sold out ticket

Home Forums Ticket Products Event Tickets Plus Following this : Add support for waiting list on sold out ticket

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #961650
    marc-andre
    Participant

    you point me to this : https://theeventscalendar.com/knowledgebase/selling-tickets-from-the-woocommerce-products-page/

    and to this : add_action( ‘init’, ‘wootix_no_hijack’ );

    function wootix_no_hijack() {
    if ( ! class_exists( ‘TribeWooTickets’ ) ) return;
    remove_filter( ‘post_type_link’, array( TribeWooTickets::get_instance(), ‘hijack_ticket_link’ ), 10, 4 );
    }

    this little bit of code remove the “normal” behavior of the ticket… and it’s great… but i like to take it a step further… i what it to go directly to the woo shop item… is it possible and how…

    now i have to go to the ticket page, and then click on the link as here : http://pastebin.com/Yy9FeAST

    and go to the product page…

    #961831
    Barry
    Member

    Hi Marc-Andre,

    There’s a limit to the amount of support we can offer for customization work like this – but if for instance you wish to take users straight to the product page from list/month view then you can do so:

    • Depending on your personal preference, you could put this in place either by setting up template overrides or by using a suitable hook
    • You could test for the presence of tickets for the event in question and then substitute the link to the single product page when appropriate

    The “tricky bit” is getting the single product URL. You can obtain all tickets for a given event with code like this:

    $tickets = TribeEventsTickets::get_all_event_tickets( $event_id )

    If there are multiple then you will need to decide on which you wish to use (unless you list the permalinks for each, of course) then simply call get_permalink() – passing in the appropriate ticket ID with each call:

    get_permalink( $single_ticket->ID );

    I hope that gives you some ideas to get you started 🙂

    #964641
    marc-andre
    Participant

    quite helping… thanks
    you can close this case

    #964833
    Barry
    Member

    Our pleasure 🙂

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Following this : Add support for waiting list on sold out ticket’ is closed to new replies.