Get the rmaining capacity in mod_eb_events

  • Patrick
  • Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
5 years 1 month ago #129159 by Patrick
Hello

I use override mod_eb_events/horizontal.php

There I want to get remaining capacity of each event that is listed.
My aproach is:
Code:
<?php if ($item->event_capacity > 0 && (($item->event_capacity - $item->total_registrants > 0))) { echo "Green"; } else { echo "Red"; } ?>

But this is not working.

How can I get if registering for events still is possible here?

Thanks.

Patrick

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

More
5 years 1 month ago #129174 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Get the rmaining capacity in mod_eb_events
Hi Patrick

Try to change $item to $event in your code

Tuan
The following user(s) said Thank You: Patrick

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

  • Patrick
  • Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
5 years 1 month ago #129176 by Patrick
Replied by Patrick on topic Get the rmaining capacity in mod_eb_events
Hello Tuan

Works perfect, thanks a lot!

Patrick

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

More
5 years 1 month ago #129178 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Get the rmaining capacity in mod_eb_events
Great. Happy to hear that it worked

Tuan

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