adding event to cart

Home Forums Ticket Products Event Tickets Plus adding event to cart

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1210340
    Sebastien
    Participant

    Clicking on “add to cart” if 0 tickets are selected display an error message “your cart is currently empty.”

    Is it possible that every time the “add to cart” button is clicked this automatically add 1 ticket?
    Or maybe to have the default ticket amount to be 1?

    Right now the only way to buy an event ticket is to manually enter a number in the ticket box.

    See an example at http://www.thelaughterconsultants.com/shop/event/2017-level1-glendale-ca/

    Thank you.

    #1210444
    Randall
    Participant

    I had this same issue when using Woocommerce with event tickets plus. This is happening because the event tickets plugin is creating the quantity field with a min value of 0 instead of 1. IMO they should fix this on the plugin itself, but you can override the min value with the following code in your theme’s functions.php:

    
    function evcal_fix_min_qty_args( $args, $product ) {
        if ( $args['min_value'] == 0 ) {
            $args['min_value'] = 1;
        }
        return $args;
    }
    add_filter( 'woocommerce_quantity_input_args', 'evcal_fix_min_qty_args', 10, 2 );
    
    #1210479
    Sebastien
    Participant

    This works. Thank you for your help!

    #1210555
    Nico
    Member

    Hi there Sebastien,

    Thanks for getting in touch with us! Seems like Randall kindly provided an answer for your question, so I’ll go ahead and close out this thread, but if you need help with anything else please don’t hesitate to create a new one and we will be happy to assist you.


    @Randall
    , thanks so much for chiming in to help out here! We really appreciate you doing so 🙂

    Best,
    Nico

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘adding event to cart’ is closed to new replies.