Any way to stay on calendar, vs go to cart?

Home Forums Ticket Products Event Tickets Plus Any way to stay on calendar, vs go to cart?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1169579
    barback
    Participant

    This question was previously answered — for Woocommerce.

    Now I’d like to do the same thing (have users stay on the calendar page which lists many events for a festival) and let them add to their cart without being whisked away to the cart each time.

    The solution for wootickets was to comment out the form action

    <form <?php /*action=”<?php echo esc_url( $woocommerce->cart->get_cart_url() ) ?>”*/ ?> class=”cart” method=”post” enctype=’multipart/form-data’>

    But the eddtickets form includes other actions and when I comment the whole thing out, nothing gets added to the cart!

    Can someone help with exactly how to modify this line:

    <form action=”<?php echo esc_url( add_query_arg( ‘eddtickets_process’, 1, edd_get_checkout_uri() ) ); ?>” *class=”cart” method=”post” enctype=’multipart/form-data’>

    thanks!

    #1170139
    Nico
    Member

    Hi Barback,

    Glad to help you out once again 🙂

    I’ve been playing around with this and I was able to find a working solution:

    /* Tribe, temporarily override checkout uri to avoid ending in the checkout page */
    function tribe_temp_override_checkout_uri ( $uri ) {

    /* only change the uri for form process */
    if ( ! isset( $_GET['eddtickets_process'] ) || empty( $_POST['product_id'] ) ) {
    return $uri;
    }

    /* return custom uri */
    return tribe_get_events_link();
    }
    add_filter ( 'edd_get_checkout_uri', 'tribe_temp_override_checkout_uri' );

    Paste the code in your theme’s (or child theme’s) functions.php file and give it a try. I didn’t extensively test the snippet so be sure you do so before using it in the live site.

    Please let me know if it works for your site,
    Best,
    Nico

    #1179902
    Support Droid
    Keymaster

    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

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Any way to stay on calendar, vs go to cart?’ is closed to new replies.