Main menu

Forum


× Help Forum English

Hide or mark booked out / fully booked events

  • dma
  • Topic Author
  • New Member
  • New Member
More
2 months 1 week ago #18630 by 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

Please Log in or Create an account to join the conversation.

  • dma
  • Topic Author
  • New Member
  • New Member
More
2 months 1 week ago - 2 months 1 week ago #18631 by 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!
Last edit: 2 months 1 week ago by dma.

Please Log in or Create an account to join the conversation.

  • Lyr!C
  • Lyr!C's Avatar
  • Administrator
  • Administrator
  • Lead Developer
More
2 months 1 week ago #18633 by 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 Attachment:

Please Log in or Create an account to join the conversation.

Moderators: Lyr!C
Time to create page: 0.186 seconds

 

Follow Us

Create your Joomla templates with Template Creator CK

acymailing logo new