Support

Home Forums Event Espresso Premium Table Tamplate Variable Help needed

Table Tamplate Variable Help needed

Posted: February 26, 2015 at 8:25 am


Michiel van der Schalk

February 26, 2015 at 8:25 am

Hi Guys,

I have been working and tweaking on the Event Espresso table template.
Have a look at: http://kreativevents.nl/aankomende-evenementen/ .

As you can see it is all working properly. BUT, there is one thing which I hope you guys can help me with. For the top event you see a lower price relatively to the rest. First it was 55 or something but when my client changed a ticket, it caught the second ticket in line which is 15 euro per item. I now want to highest ticket amount to show up on the table template.

Is this possible? Or always let the variable catch the first ticket made in the single event.

MY current code in the template is:


// grab array of EE_Ticket objects for event
$tickets = espresso_event_tickets_available( $post->ID, FALSE, FALSE );
// grab first ticket from array
$ticket = array_shift( $tickets );
$ticket_price = $ticket instanceof EE_Ticket ? $ticket->pretty_price() : '';
$ticket_price_data_value = $ticket instanceof EE_Ticket ? $ticket->price() : '';
// grab primary datetime for event
$first_datetime = espresso_event_date_obj( $post->ID );
$tickets_left = $first_datetime instanceof EE_Datetime ? $first_datetime->tickets_remaining() : 0;
$tickets_left = $tickets_left === INF ? __('unlimited','event_espresso') : $tickets_left;

?>
<tr class="espresso-table-row <?php echo $category_slugs; ?>">
<td class="venue_title event-<?php echo $post->ID; ?>"><?php espresso_venue_name( NULL, FALSE ); ?></td>
<td class="start_date event-<?php echo $post->ID; ?>" data-value="<?php echo strtotime( $startdat ); ?>"><?php echo date_i18n( $date_format . ' ' . $time_format, strtotime( $startdat ) ); ?></td>
<td class="event_title event-<?php echo $post->ID; ?>"><?php echo $post->post_title; ?></td>
<td class="event_title event-<?php echo $post->ID; ?>"><?php echo $ticket_price_data_value; ?> incl btw</td>
<td class="td-group reg-col" nowrap="nowrap"><?php echo $live_button; ?></td>
</tr>
<?php

Hope you guys can help me out.

Best Regards,
Michiel van der Schalk


Dean

February 27, 2015 at 1:15 am

Hi,

It is showing as 55 currently, did you resolve this?

The support post ‘Table Tamplate Variable Help needed’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso