- Posts: 339
- Thank you received: 5
show remaining spaces in calendar view
- OTWD
-
Topic Author
- Offline
- Platinum Member
-
Less
More
8 years 4 months ago #106240
by OTWD
Success consists of going from failure to failure without loss of enthusiasm.
show remaining spaces in calendar view was created by OTWD
Hi,
I would like to show available places in the calendar monthly view to encourage people to book.
I dont believe there is a setting in EB that achieves this however was wondering if you could direct me to the correct file(s) to modify in order to echo this value.
Thanks
I would like to show available places in the calendar monthly view to encourage people to book.
I dont believe there is a setting in EB that achieves this however was wondering if you could direct me to the correct file(s) to modify in order to echo this value.
Thanks
Success consists of going from failure to failure without loss of enthusiasm.
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
8 years 4 months ago #106241
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic show remaining spaces in calendar view
components/com_eventbooking/view/common/calendar.php
$event->event_capacity - $event->total_registrants should return the value you want to display
Tuan
$event->event_capacity - $event->total_registrants should return the value you want to display
Tuan
The following user(s) said Thank You: OTWD
Please Log in or Create an account to join the conversation.
- OTWD
-
Topic Author
- Offline
- Platinum Member
-
Less
More
- Posts: 339
- Thank you received: 5
8 years 4 months ago #106244
by OTWD
Success consists of going from failure to failure without loss of enthusiasm.
Replied by OTWD on topic show remaining spaces in calendar view
Fantastic thank you Tuan will report back here with my conclusions
Success consists of going from failure to failure without loss of enthusiasm.
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
8 years 4 months ago #106246
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic show remaining spaces in calendar view
OK. Maybe you could share the modified file here in case someone needs it
Tuan
Tuan
Please Log in or Create an account to join the conversation.
- OTWD
-
Topic Author
- Offline
- Platinum Member
-
Less
More
- Posts: 339
- Thank you received: 5
8 years 4 months ago - 8 years 4 months ago #106429
by OTWD
Success consists of going from failure to failure without loss of enthusiasm.
Replied by OTWD on topic show remaining spaces in calendar view
Here is the mod
public_html/templates/myTemplate/html/com_eventbooking/common/calendar.php
Line starting 145
public_html/templates/myTemplate/html/com_eventbooking/common/calendar.php
Line starting 145
Code:
<div class="date day_cell">"
<!--<img border="0" align="top" title="<?php echo $event->title; ?>" src="<?php echo $thumbSource; ?>" />-->
<!-- huw add text to calendar -->
<span style="color:red;font-size:14px;"><?php echo "SPACES LEFT: ";?></span><span style="font-size:14px;"><?php echo $event->event_capacity - $event->total_registrants; ?></span><br/>
Success consists of going from failure to failure without loss of enthusiasm.
Last edit: 8 years 4 months ago by OTWD.
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
8 years 4 months ago #106452
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic show remaining spaces in calendar view
Thanks for sharing the code. Please note that this code is still wrong for event which has unlimited capacity. So maybe it is better to add a if command to only show spaces left if the event has limited capacity
Regards,
Tuan
Regards,
Tuan
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.