Display when sales for ticket sales end/expire

Home Forums Ticket Products Event Tickets Plus Display when sales for ticket sales end/expire

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1591920
    freddysxg
    Participant

    Hi,
    We have early-bird and general tuition ticket sales.

    Is there a way to display when the ticket sale ends? So for example, for the early-bird ticket, it would be great if it said “This ticket expires on ABC”.

    Otherwise, we will have to update all the tickets descriptions, so really hoping for a more dynamic/time-saving solution!
    – Freddys

    #1593355
    Victor
    Member

    Hi Freddys!

    Thanks for getting in touch with us!

    Absolutely, that’s totally possible! I would suggest overriding the tickets.php template to make that happen. You can learn more about overriding calendar templates in our Themer’s Guide, but it basically boils down to this:

    • Make a copy of the tickets.php template. It is located at wp-content/plugins/event-tickets-plus/src/views/wootickets/tickets.php
    • Make a new folder in your theme called tribe-events
    • Make a new folder in that one called wootickets
    • Drop your copied tickets.php file in that last folder

    Now that the template is in your theme, you can modify it to suit your needs. In this case, modify line 172 to look like the following:

    echo '<td class="tickets_description">' . ( $ticket->show_description() ? $ticket->description : '' ) . ' This ticket expires on: ' . $ticket->end_date . '</td>';

    This will add the message “This ticket expires on: ” message to the ticket description.

    Will this work for you? Please let me know. 🙂

    Best,
    Victor

    #1594165
    freddysxg
    Participant

    It worked perfectly!

    Would you be able to direct me on how to make it so they can only purchase
    ONE of each ticket? And also have the default ticket # be 1 as well?

    Thank you!
    FXG


    Best,

    Freddys X. Garcia, DC, MS, DACNB, FACFN
    Director, Department of Product Development and Marketing: Carrick
    Institute of Graduate Studies
    Assistant Professor of Clinical Neurology, Carrick Institute of Graduate
    Studies

    Schedule a Call with Me – http://www.scheduleyou.in/mJu3AI
    http://www.scheduleyou.in/mJu3AI

    #1594319
    Victor
    Member

    Hi Freddys,

    Glad to know it worked out for you 🙂

    On the same tickets.php template override, you can modify the code around line 127 and set the input_value to 1 like the following:

    $input = woocommerce_quantity_input( array(
    'input_name' => 'quantity_' . $ticket->ID,
    'input_value' => 1,
    'min_value' => 0,
    'max_value' => $max_quantity,
    ), null, false );

    this will set the input value to 1 instead of 0.

    If you only want to allow a one ticket to be purchase per order, I’d recommend you edit the WooCommerce ticket product and under the Inventory tab, check the Sold individually option.

    Does it help?

    Best,
    Victor

    #1610806
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Display when sales for ticket sales end/expire’ is closed to new replies.