Hi @lukemv
You can improve the display with some custom coding by modifying this template: wp-content/plugins/event-tickets/src/views/v2/tickets/item/extra/available/quantity.php
To do so copy it to [your-theme]/tribe/tickets/v2/tickets/item/extra/available/quantity.php and apply the modifications you need
My code right now looks like this, i made it so that instead of showing the number of tickets left, it shows “High”, “Medium” or “Low” availability until it reaches the threshold, then it switches to # of tickets left (this is just plain, it requires some more coding in css for styling)
$capacita = tribe_tickets_get_capacity( $ticket );
$threshold_media = 0.8*$capacita;
$threshold_bassa = 0.5*$capacita;
if (
( 0 !== $threshold && $threshold < $available_count )
|| $is_unlimited
) {
if ($available_count > $threshold_media) {
echo wp_kses_post(
sprintf(
// Translators: 1: opening span. 2: the number of remaining tickets to buy. 3: Closing span.
_x(
'Disponibilità: <span class="disponibilealta">Alta</span>',
'Tickets available',
'event-tickets'
),
)
);
return;
}
if ( $available_count > $threshold_bassa ) {
echo wp_kses_post(
sprintf(
// Translators: 1: opening span. 2: the number of remaining tickets to buy. 3: Closing span.
_x(
'Disponibilità: <span class="disponibilemedia">Media</span>',
'Tickets available',
'event-tickets'
),
)
);
return;
}
if ( $available_count < $threshold_bassa || $available_count == $threshold_bassa ) {
echo wp_kses_post(
sprintf(
// Translators: 1: opening span. 2: the number of remaining tickets to buy. 3: Closing span.
_x(
'Disponibilità: <span class="disponibilebassa">Bassa</span>',
'Tickets available',
'event-tickets'
),
)
);
}
return;
}
if ($available_count == 0) {
echo wp_kses_post(
sprintf(
// Translators: 1: opening span. 2: the number of remaining tickets to buy. 3: Closing span.
_x(
'%1$s %2$s %3$s disponibili',
'Tickets available',
'event-tickets'
),
'<span class="tribe-tickets__tickets-item-extra-available-quantity">',
$available_count,
'</span>'
)
);
return;}
echo wp_kses_post(
sprintf(
// Translators: 1: opening span. 2: the number of remaining tickets to buy. 3: Closing span.
_x(
'<span class="testodisponibilita">Disponibilità: </span><span class="personalizzadisponibili">%1$s %2$s %3$s disponibili</span>',
'Tickets available',
'event-tickets'
),
'<span class="tribe-tickets__tickets-item-extra-available-quantity personalizzanumerodisponibili">',
$available_count,
'</span>'
)
);
hope it helped ??