"sold out" in timeline view

  • Philipp
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
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!

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

More
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

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

  • Philipp
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
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!

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

Moderators: Tuan Pham Ngoc