Buying 'ticket' with Product Add On

Home Forums Ticket Products Event Tickets Plus Buying 'ticket' with Product Add On

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1332020
    Matt Gray
    Participant

    Hi,
    I need on some of my tickets (which are training days), the ability for people to first upload a form to prove that they’re suitable for the course using https://woocommerce.com/products/product-add-ons/ as well as filling in some additional fields before adding it to their basket, however I can’t seem to get the extras to display…
    Is there either a way to get this to display on the Events Calendar event template, or instead, show the class as an actual WooCommerce product in the normal WooCommerce product template (where the extras work)?
    Cheers,
    Matt

    #1332641
    Cliff
    Member

    Hi, Matt.

    I believe you’re requesting the same thing as one of our existing feature requests: https://tribe.uservoice.com/forums/195723-feature-ideas/suggestions/15072414-could-we-get-event-tickets-to-work-with-wooextensi

    Please reference the solution provided there and also add your vote.

    This allows us to gauge interest in this particular feature request, which helps us prioritize our development efforts.

    Please let me know if you have any follow-up questions on this topic.

    #1333340
    Matt Gray
    Participant

    Hi Cliff,

    Thanks for that, and that’s the process that I’ve followed to do so… http://aquaphysical.com/shop/instructor-training/floatfit-instructor-training-hamburg-germany-3rd-september/

    However, a couple of things I can’t work out along the way…

    1). What is the file structure for a product override there that will be the template for all products/events in a certain category, e.g. ‘instructor-training’.

    2). Then also, how do I bring the class meta data (i.e. organiser, map and anything that is in this sidebar: http://aquaphysical.com/class/floatfit-instructor-training-hamburg-germany-3rd-september/) onto the WooCommerce product page (on the template discussed above).

    3). On the list page here: http://aquaphysical.com/classes/category/instructor-training/ – What do I need to add into the ‘single-event.php’ file to allow me to add a link directly to the WooCommerce product, instead of first going to view the class and then clicking through to the ticket.

    On the class page itself I use the below code, but I can’t get it to work as well on the list page:

    <?php
    $count = 0;
    foreach ( $tickets as $ticket ) {
    	global $product;
    	$count++;
    	if ( class_exists( 'WC_Product_Simple' ) ) $product = new WC_Product_Simple( $ticket->ID );
    	else $product = new WC_Product( $ticket->ID );
    	$price = $product->get_price_html();
    	$link = $product->get_permalink();
    }?>
    
    						<div class="fusion-button-wrapper fusion-span"><a class="fusion-button button-flat fusion-button-square button-large button-default" target="_self" href="<?php echo $link; ?>"><span class="fusion-button-text">Register<?php if ( tribe_get_cost() ) : ?>: <?php echo $price; ?><?php endif; ?></span></a>
    						
    						</div>
    <?php
    if ( 0 === $count )
    	echo 'There are no tickets available for this event';
    ?>

    Thanks for your help!
    Matt

    #1333784
    Cliff
    Member

    Matt, I appreciate your detailed question and the desire to customize it for your use. However, we cannot provide such in-depth customization help, per our Scope of Support / Terms

    Thank you very much for your understanding.

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

    ===

    That being said, maybe I can help in some ways here:

    1. It sounds like you’re asking how to override WooCommerce template files. In that case, please reference https://docs.woocommerce.com/document/template-structure/
    2. That sidebar is a custom template for The Events Calendar, which is likely coming from your theme. Our Themer’s Guide details the files in our plugins that are able to be overridden. The one you’re likely looking for is /wp-content/plugins/the-events-calendar/src/views/modules/meta.php and the ones in the /wp-content/plugins/the-events-calendar/src/views/modules/meta/ directory
    3. You could override /wp-content/plugins/the-events-calendar/src/views/list/single-event.php or use one of the action files in that template file, which is what I’d recommend if all you’re trying to do is add a button/link.
    #1333942
    Matt Gray
    Participant

    Hi Cliff,

    Thanks for your help, and understand about the level of support available.

    I’ve managed to separate the templates (thanks), and also bring in the ‘template’ for the meta onto the WooCommerce product page… However, instead of bringing in the details of the Event related to the Product, it’s just bringing in today’s day and date…

    $event_id = get_the_ID();
    <?php tribe_get_template_part( 'modules/meta' ); ?>

    How do I relate the “bring in all the meta” module to the associated event?

    And number 3, that’s just not working… I know where to add all the code, just not how to generate the link for the WooCommerce Product instead of the link for the Event page.

    Thanks for bearing with!
    Cheers,
    Matt

    #1334207
    Cliff
    Member

    I’d guess you have to pass the Event ID instead of the Product ID / current post ID…

    Unless you plan to have every single event have a WooCommerce ticket, you’d probably be better off not actually using tribe_get_template_part() to load the modules on the WooCommerce Product page because then the edits you make (via template overrides–such as replacing current ID with Event ID) would affect all event templates.

    ===

    https://theeventscalendar.com/knowledgebase/selling-tickets-from-the-woocommerce-products-page/ links to https://gist.github.com/theeventscalendar/3b7e3cac79b5c7b62d0e, which might be what you’re missing… however, if you’re selling multiple tickets per event, that’d be multiple WooCommerce Products… so it may not quite work in the Event List format you’re asking about.

    #1344094
    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 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Buying 'ticket' with Product Add On’ is closed to new replies.