Show # of tickets remaining

This topic contains 2 replies, has 2 voices, and was last updated by  Anthony Didsbury 4 days, 10 hours ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #34416

    Could we have an option to add a shortcode to show how many tickets for each specific event are remaining or an option within the settings to turn such a feature on or off?

    It can get rather irritating if someone wants to book 4 tickets and there are only 3 remaining.

    I know there are options to do this within the code such as :

    //In your single-event.php template:
    $remaining = eo_get_remaining_tickets_count( get_the_ID() );
    if( $remaining > 1 ){
     printf( 'Hurry, only %d tickets remaining', $remaining );
     }elseif( $remaining == 1 ){
     echo 'Only one ticket remaining!';
    }else{
     echo 'Sorry, there are not tickets available';
    }
    

    but when I try and implement it, I’m getting nothing showing in the actual events page

    Anthony

    Anthony Didsbury
    #34558

    Hi Anthony,

    Is this a recurring event, and if so, are you selling tickets for individual occurrences or the series?

    Stephen Harris
    #34565

    Hi Stephen, no its for individual events.

    Anthony Didsbury
Viewing 3 posts - 1 through 3 (of 3 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.