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 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #998025
    barback
    Participant

    I’ve modified the events calendar list view to show tickets there — so folks don’t have to click through to detail view to buy tickets.

    We’re offering a discount to anyone spending $120 in one session (shows are $20 each for this festival).

    It would be nice if they could Add to Cart, but stay on the page (with a view cart button available.)

    This is possible for WooCommerce product on a WooCommerce page, but not for tickets?

    #998099
    Nico
    Member

    Hi @barback,

    Thanks for reaching out to us, interesting question!

    Doing some research on our forums, I’ve found a post mentioning a possible workaround for this: https://theeventscalendar.com/support/forums/topic/ajax-add-to-cart-still-required/#dl_post-322544 … Can you take look into it?

    Also how are you getting the tickets form in there? Maybe we can try and simulate how WooCommerce is doing so in the products page. Can you point me to the products page in your site?

    Please let me know if the solution I pointed out might work for your case,
    Best,
    Nico

    #998200
    barback
    Participant

    Tickets page is http://puppetsinthegreenmountains.com/events/category/2015-festival/

    In order to get all shows listed with ticket puchasing options “up front”, I made an override for views/list/single-event.php and added this bit:

    
    <?php do_action( 'tribe_events_single_event_after_the_meta' ) ?>

    So the end of that file now looks like this:

    <!-- Event Content -->
    <?php do_action( 'tribe_events_before_the_content' ) ?>
    <div class="tribe-events-list-event-description tribe-events-content description entry-summary">
    	<?php the_excerpt() ?>
    	<a href="<?php echo esc_url( tribe_get_event_link() ); ?>" class="tribe-events-read-more" rel="bookmark"><?php _e( 'Details & Directions', 'tribe-events-calendar' ) ?> &raquo;</a>
    	<?php do_action( 'tribe_events_single_event_after_the_meta' ) ?>
    </div><!-- .tribe-events-list-event-description -->
    
    <?php do_action( 'tribe_events_after_the_content' ) ?>

    The other approach (using woo short code instead) might work, but we’re in the midst of the short sales season for the festival and I won’t likely be tweaking it at this point. I am noting the possible solution for the next go round in 2 years. Who knows, by then there will likely be a different way to do it!

    #998519
    Nico
    Member

    Hey Barback,

    Thanks for following up!

    Hopefully I found a simple way of avoiding the redirect. Just create a template override of the ‘wootickets/tickets.php’ template and edit the form action parameter. You can comment it out, and it will come back to the same page after adding the ticket:


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

    Or you can change that URL to the products page url and pass a variable to show the user a notice indicating that the ticket was successfully added to the cart, or whatever you see fit best for the site.

    Please let me know if this solutions works for you,
    Best,
    Nico

    #1002870
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

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