Home › Forums › Ticket Products › Event Tickets Plus › Display when sales for ticket sales end/expire
- This topic has 3 replies, 2 voices, and was last updated 7 years, 8 months ago by
freddysxg.
-
AuthorPosts
-
August 7, 2018 at 8:03 am #1591920
freddysxg
ParticipantHi,
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!
– FreddysAugust 8, 2018 at 2:32 pm #1593355Victor
MemberHi 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,
VictorAugust 9, 2018 at 12:38 pm #1594165freddysxg
ParticipantIt 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
StudiesSchedule a Call with Me – http://www.scheduleyou.in/mJu3AI
http://www.scheduleyou.in/mJu3AIAugust 9, 2018 at 3:48 pm #1594319Victor
MemberHi 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,
VictorAugust 31, 2018 at 9:35 am #1610806Support Droid
KeymasterHey 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 -
AuthorPosts
- The topic ‘Display when sales for ticket sales end/expire’ is closed to new replies.
