Home › Forums › Ticket Products › Event Tickets Plus › Changing Default Value with EDD
- This topic has 3 replies, 2 voices, and was last updated 6 years, 6 months ago by Andrew Peters.
-
AuthorPosts
-
October 5, 2017 at 9:43 pm #1360140Andrew PetersParticipant
Hey there, I am using Event Tickets Plus with Easy Digital Downloads.
How can I change the default value of tickets to purchase to 1 and how can I limit it to just one per checkout?
October 9, 2017 at 2:03 pm #1361273AndrasKeymasterHi Andrew,
Thanks for using our plugins and welcome to the forums! I think I can help you with your questions.
To change the default value to one, the best course of action would be creating a template override. You can find more details on this topic in our Themer’s Guide – https://theeventscalendar.com/knowledgebase/themers-guide/
Basically you will need to create an override for this file:
wp-content\plugins\event-tickets-plus\src\views\eddtickets\tickets.php
and make some changes to line 66, which looks like this:
echo '<input type="number" class="edd-input" min="0" ' . $max . ' name="quantity_' . esc_attr( $ticket->ID ) . '" value="0" ' . disabled( $must_login, true, false ) . '/>';
and change the value to 1.
how can I limit it to just one per checkout
The cart and the checkout is already handled by EDD, so you would need to look around in their extension library if there is something for this, or in their support forums.
Let me know if the above trick helps.
Cheers,
AndrasOctober 31, 2017 at 9:36 am #1372258Support DroidKeymasterHey 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 ‘Changing Default Value with EDD’ is closed to new replies.