"sold out" in timeline view
- Philipp
- Topic Author
- Offline
- Senior Member
-
Less
More
9 years 6 months ago #87434
by Philipp
"sold out" in timeline view was created by Philipp
I'm customizing my timeline view (again), and have another question due to my limited php knowledge.
I need to add text for events that have already sold out. The default is if capacity < registrants the $registrationUrl button just vanishes.
Thing is, the if branches look very sophisticated, and I don't want to break them completely (although I do not need any of the options right now). Any hints on where to put my else echo sold out?
Thanks!
I need to add text for events that have already sold out. The default is if capacity < registrants the $registrationUrl button just vanishes.
Thing is, the if branches look very sophisticated, and I don't want to break them completely (although I do not need any of the options right now). Any hints on where to put my else echo sold out?
Thanks!
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
9 years 6 months ago #87461
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic "sold out" in timeline view
It depends on where you want to echo the sold out. The if for that is really simple:
if ($event->event_capacity > 0 && $event->event_capacity <= $event->total_registrants)
{
echo 'Sold Out';
}
Hope it helps
Tuan
if ($event->event_capacity > 0 && $event->event_capacity <= $event->total_registrants)
{
echo 'Sold Out';
}
Hope it helps
Tuan
Please Log in or Create an account to join the conversation.
- Philipp
- Topic Author
- Offline
- Senior Member
-
9 years 6 months ago #87473
by Philipp
Replied by Philipp on topic "sold out" in timeline view
Yes, right, should have written that: I want it to replace the standard button(s).
Unfortunately I cannot seem to make it work. When I put your if routine right in front of all the other ifs, it breaks the php. That would be line 263 in the standard events_timeline.php.
It should probably be put in between something, not at the beginning, but I don't see how and where.
Many thanks!
Unfortunately I cannot seem to make it work. When I put your if routine right in front of all the other ifs, it breaks the php. That would be line 263 in the standard events_timeline.php.
It should probably be put in between something, not at the beginning, but I don't see how and where.
Many thanks!
Please Log in or Create an account to join the conversation.
Moderators: Tuan Pham Ngoc
Support
Documentation
Information
Copyright © 2026 Joomla Extensions by Joomdonation. All Rights Reserved.
joomdonation.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.