Help Desk

Checkout quantity field is set to 1 instead of zero

  • Posts: 36 Topics: 13
    | Permalink

    Hello we are offering 3 types of tickets for an upcoming event using Event Tickets Plus and we would like the quantity field to be set to zero by default but right now all three tickets are set to 1 by default which cause all three tickets to be placed into the cart by the user. Can we get these fields to be set to zero? Thx

    Posts: 36 Topics: 13
    | Permalink

    Started another thread.

    Posts: 36 Topics: 13
    | Permalink

    We are still having problems with this. We have an event with multiple tickets and we would like each ticket to show a zero in the input selection field to avoid customers adding all tickets to their cart when add to cart is picked on. But at the same time for events with only a single ticket we would like the default to be set to 1 (one) though right now the default is set to zero for all. Can we keep it at zero when there are multiple tickets for an event and when there is only one ticket type have it default to 1?

    Along the same lines when there are multip[le tickets and all selection input fields are set to zero is there a way to make is mandatory that the customer chose a ticket before they can add to cart? Right now with all zeros if they hit the add to cart button nothing gets added to the cart. Thx

    Posts: 11242
    | Permalink

    Hi. By default all tickets display zero, as you’re wanting.

    Do you have some custom code in place to set it to 1 instead of the default zero?

    Posts: 36 Topics: 13
    | Permalink

    No I had no custom code for this in place. I had to copy over there ticket.php file and change the bellow to get things to be set to zero. I would still like to be able to have all our events with only a single ticket to be set to 1 is there a way for me to do that? Thx

    woocommerce_quantity_input( array(
    ‘input_name’ => ‘quantity_’ . $ticket->ID,
    ‘input_value’ => 0,
    ‘min_value’ => 0,
    ‘max_value’ => $must_login ? 0 : $max_quantity, //

    Posts: 11242
    | Permalink

    Maybe the default of 1 is coming from your theme or another plugin. Do all of your WooCommerce products default to a quantity of 1?

    To answer your question, you likely could but we wouldn’t be able to provide this level of customization to you, per our Scope of Support / Terms.

    If you need some coding help, you may want to ask your developer or reference our documentation and list of known customizers.

    Posts: 65
    | Permalink

    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

    | Permalink