Home › Forums › Ticket Products › Event Tickets Plus › Add to Cart with 0 (zero) Tickets selected
- This topic has 7 replies, 5 voices, and was last updated 7 years, 1 month ago by Olaf.
-
AuthorPosts
-
February 25, 2017 at 9:24 am #1245878OlafParticipant
We just got started with Events and Tickets plugins (w/ WooCommerce behind), so I still might be missing something:
The default for the number of selected tickets (in the ticket order form) is apparently zero. This is basically fine, so that the customer has to make a decision here. But: with “zero” left in that field, the “Add to cart” button is already enabled, which would lead to an empty cart page, which appears to be confusing for some of our testers.
These confused tester only see the ticket description and the “add to cart” button – and then end up @nil 🙂
Can the default be set to “1”?
Thanks,
Olaf MonienFebruary 27, 2017 at 8:41 pm #1246653CliffMemberHi, Olaf.
This might be what you’re looking for:
https://gist.github.com/cliffordp/80b33455779b74ec49f6ea3033cb47bf
Please let me know how this goes for you.
March 1, 2017 at 11:09 am #1247862HildegardParticipantHi
This code does not work with me, but I have this of your support and this works.
function tribe_events_alter_tickets_default_quantity() {
wp_enqueue_script( ‘jquery’ );
?>
<style>
tr.tribe-tickets-meta-row {
display: table-row !important;
}
</style>
<script>
jQuery(document).ready( function () {
jQuery( ‘.single-tribe_events input.text’ ).val( 1 );
});
</script>
<?php
}
add_action( ‘wp_head’, ‘tribe_events_alter_tickets_default_quantity’ );
But if I have 2 different tickets and the customer chooses one go both tickets to the shopping cart. Better the button is locked at Zero.
RegardsMarch 1, 2017 at 2:40 pm #1248004CliffMemberHildegard, I’m glad you got something working for your needs. You are correct the snippet I shared does not support more than one ticket per event of the same type (RSVP and WooCommerce, for example).
Olaf, since this is your thread, please let me know how things go for you.
March 1, 2017 at 11:51 pm #1248212HildegardParticipanthello,
But if I have 2 different tickets and the customer chooses one go both tickets to the shopping cart. Better the button is locked at Zero.What we can to ?
Regards
March 2, 2017 at 9:50 am #1248487CliffMemberHildegard, please create your own separate thread and include a link to one of your events.
Olaf, please let me know how you’re getting along.
March 24, 2017 at 9:35 am #1259608Support 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 ‘Add to Cart with 0 (zero) Tickets selected’ is closed to new replies.