Home › Forums › Ticket Products › Event Tickets Plus › Following this : Add support for waiting list on sold out ticket
- This topic has 3 replies, 2 voices, and was last updated 8 years, 11 months ago by Barry.
-
AuthorPosts
-
May 9, 2015 at 9:54 pm #961650marc-andreParticipant
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…
May 11, 2015 at 9:28 am #961831BarryMemberHi 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 🙂
May 22, 2015 at 7:48 pm #964641marc-andreParticipantquite helping… thanks
you can close this caseMay 25, 2015 at 9:21 am #964833BarryMemberOur pleasure 🙂
-
AuthorPosts
- The topic ‘Following this : Add support for waiting list on sold out ticket’ is closed to new replies.