View Attendees List On-Line (new or adapted code)

Home Forums Ticket Products Event Tickets Plus View Attendees List On-Line (new or adapted code)

Viewing 8 posts - 16 through 23 (of 23 total)
  • Author
    Posts
  • #941462
    Jeff
    Participant

    Sorry for over-commenting, just for the record, the one I’m primarily interested in here is Non-Member. I also wanted (going back to a prior note) line_total and subtotal values.

    (I also see a potential complication that I won’t want to think about too hard at the moment, but may have to, since the original attendee list function produces lists of attendees by order, rather than by individual ticket. In a real list of attendees, like a booking/reservation system, tickets or spots would be broken down into constituent parts, especially when the same order had two different ticket types.)

    -CK

    #941467
    Jeff
    Participant

    First variable – yes – success! I count that as huge progress and really the entirety of my original request. Second one, still a blank, but we’re very close, and the solution will provide the model for getting the sub-array values. Will look at it and try to figure it out, but please don’t hesitate to provide the solution if it occurs to you.

    -CK

    #941481
    Jeff
    Participant

    ah, simple: it’s _qty, not qty:

    
    <?php
    //code from attendees.php, 
    //additional code (for extracting ticket data) from Gustavo Bordoni https://gist.github.com/bordoni/6e4543c562fe0182dbd6
    
    $event = get_post( $event_id );
    $tickets = TribeEventsTickets::get_event_tickets( $event_id );
    $count = 0;
    	foreach ($customerList as $orderID => $totalAttendees) {
    		$count = $count + 1;
    		$order = new WC_Order($orderID);
    		$orderTickets = $order->get_items();
    ?>
    	<tr class="attendees" >
    		<td class="att_tblcol_first" ><?php echo $count ; ?>.</td>
    		<td class="att_participant" ><?php echo "{$order->billing_first_name} {$order->billing_last_name}" ?><br/><small><?php echo $order->billing_company; ?></small></br></td>
    		<td class="att_signature" > </td>
    	<!--here is where we HAVE figured out how to get ticket data -->
    		<td class="att_ticket-type">
    	<?php
    		foreach ( $orderTickets as $key => $orderTicket ) {
    		echo '<p>' . $orderTicket['name'] . '(' . $orderTicket['item_meta']['_qty']['0'] . ')</p>';
    		} 
    	?>
    </td>
    <!-- the following works, but cost tells me what the ticket actually cost -
    will next use above model to extract actual ticket prices...
    -->
    <td class="att_ticket-price" align="center"><?php echo tribe_get_cost( null, true ) ?>*</td>
    <td class="att_paid tblcol_last" > </td>
    </tr>
    <?php	
    	}

    Note: Code as written already will provide separate entries, in separate lines, for different ticket types in table cell reserved for given order. Excellent!

    #941482
    Jeff
    Participant

    shoot – don’t know why my paste this time got screwed up, try again:

    <?php
    //code from attendees.php, 
    //additional code (for extracting ticket data) from 
    //Gustavo Bordoni https://gist.github.com/bordoni/6e4543c562fe0182dbd6
    
    $event = get_post( $event_id );
    $tickets = TribeEventsTickets::get_event_tickets( $event_id );
    $count = 0;
    	foreach ($customerList as $orderID => $totalAttendees) {
    		$count = $count + 1;
    		$order = new WC_Order($orderID);
    		$orderTickets = $order->get_items();
    ?>
    	<tr class="attendees" >
    		<td class="att_tblcol_first" ><?php echo $count ; ?>.</td>
    		<td class="att_participant" ><?php echo "{$order->billing_first_name} {$order->billing_last_name}" ?><br/><small><?php echo $order->billing_company; ?></small></br></td>
    		<td class="att_signature" > </td>
    	<!--here is where we HAVE figured out how to get ticket data -->
    		<td class="att_ticket-type">
    	<?php
    		foreach ( $orderTickets as $key => $orderTicket ) {
    		echo '<p>' . $orderTicket['name'] . '(' . $orderTicket['item_meta']['_qty']['0'] . ')</p>';
    		} 
    	?>
    </td>
    <!-- the following works, but cost tells me what the ticket actually cost -
    might be better to choose from all available variables...
    -->
    <td class="att_ticket-price" align="center"><?php echo tribe_get_cost( null, true ) ?>*</td>
    <td class="att_paid tblcol_last" > </td>
    </tr>
    <?php	
    	} ?>
    #941483
    Jeff
    Participant

    aargh

    #941540
    Gustavo Bordoni
    Keymaster

    Got it, so now everything is working as expected?

    My Best Regards,

    #941543
    Jeff
    Participant

    Yep, all working well now. This really helped get me over a hump in my array skills.

    I don’t know why the above code pastes came out with raw html characters, so I hesitate to paste the larger snippet that now gets sales data from the array variables instead of from tribe_get_cost(). I’m not sure that this thread is appropriate for sharing further results and the next level of development of this add-on (amounting to a Booking/Reservation application), but if anyone over there wants to see the results, you should now be able to contact me via Github or via Jeff, whose account I’ve been using for this very useful conversation.

    Grazie/Thanks again!

    -CK

    #941849
    Gustavo Bordoni
    Keymaster

    Hi CK,

    I’m closing this and marking the correct answer.

    My Best Regards,

Viewing 8 posts - 16 through 23 (of 23 total)
  • The topic ‘View Attendees List On-Line (new or adapted code)’ is closed to new replies.