Main menu

Forum


× Help Forum English

Hide or mark booked out / fully booked events

  • dma
  • Autore della discussione
  • New Member
  • New Member
Di più
2 Mesi 1 Settimana fa #18630 da dma
Hello,
I was wondering if there is a possibility to either mark (via css class or text display for example) or hide fully booked / booked out events from the events list.
I came across this post from a while ago forum.joomlic.com/icagenda-help-en/3478-...dy-booked-out-events however it's missing an answer on the topic.
I would also be able to include some php in our custom template, but I'm missing the correct variables to create the query.
Any hint into the right direction would be greatly appreciated!
Thanks in advance!

PS: sorry if double post - I just submitted this topic but it seems like it didn't post

Si prega Accedi o Crea un account a partecipare alla conversazione.

  • dma
  • Autore della discussione
  • New Member
  • New Member
Di più
2 Mesi 1 Settimana fa - 2 Mesi 1 Settimana fa #18631 da dma
So, I went digging in the code and found this snippet which was used to display the number of seats available & booked in the single event view. And I edited it to our linking and placed within our customtheme_events.php file
...
<!-- Event -->
<?php // List of Events Template ?>
    <?php // Show event ?>
    <?php if ($EVENT_NEXT) : ?>

<?php // try to display how many seats are already booked ?>

<?php // code below taken from icevent_vars
$maxNbTickets    = $item->params->get('maxReg', '1000000');
$statutReg    = $item->params->get('statutReg', '');
// Set Event information on tickets available/bookable
if ($maxNbTickets != '1000000' && $statutReg == '1')
{
    $SEATS_AVAILABLE = ($maxNbTickets - $item->registered);
    if ($SEATS_AVAILABLE === 0)
    {
        $SEATS_AVAILABLE    = JText::_('COM_ICAGENDA_REGISTRATION_DATE_NO_TICKETS_LEFT');
    }
    $MAX_NB_OF_SEATS    = $maxNbTickets;
}
// display nr of seats taken vs nr initially available
echo $SEATS_AVAILABLE . '/' . $maxNbTickets . ' Plätze verfügbar <br>';
echo $item->registered;
?>
<?php // end custom code ?>
        <?php // Display Date ?>
            <div class="ic-box">
...


What happens is, that the max nr is displayed correctly, but the nr of actually booked seats ($item->registered) seems to always be empty here, even if some seats are already booked. Resulting in 1/1 seats available, 7/7 seats available etc. even if some seat is booked.

EDIT: The way we set up the structure is: One event which has recurring single events. I think this probably has an effect on our issue, right?

Could you please help us fix this last bit? Thanks a lot!
Ultima Modifica 2 Mesi 1 Settimana fa da dma.

Si prega Accedi o Crea un account a partecipare alla conversazione.

  • Lyr!C
  • Avatar di Lyr!C
  • Administrator
  • Administrator
  • Lead Developer
Di più
2 Mesi 1 Settimana fa #18633 da Lyr!C
Hello,

I've answered here: forum.joomlic.com/icagenda-help-en/4793-...-in-event-list#18632

Core code is not yet full ready for this possibility (but planned for next 4.0 version)

Regards,
Cyril

Latest version : iCagenda 3.9.5
We recommend every user to keep iCagenda updated.
Don't forget to have your Joomla!™ up-to-date!

Do you like iCagenda?
I would appreciate if you could take 5 minutes to post a review on JED (Joomla Extensions Directory) .

File allegato:

Si prega Accedi o Crea un account a partecipare alla conversazione.

Moderatori: Lyr!C
Tempo creazione pagina: 0.197 secondi

 

Follow Us

Create your Joomla templates with Template Creator CK

acymailing logo new