Sold Out Events

  • nycps
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
13 years 5 months ago #12521 by nycps
Sold Out Events was created by nycps
When an event is "sold out", participants can no longer register for an event. But the event is still listed in the Calendar. I don't want the event to disappear from the calender but i would like the calendar to show that the event is sold out. Is there a way to do this without doing it manually?

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

More
13 years 5 months ago #12561 by iberinternet
Replied by iberinternet on topic Re: Sold Out Events
I would like the same feature.

I only need to have access to the "total_registrants" information in calendar/tmpl/default.php

including something like this:

<?php


if (($val->event_capacity > 0) && ($val->event_capacity <= $total_registrants)) {
$msg = JText::_('EB_NO_LONGER_ACCEPT_REGISTRATION') ;
} else {
$msg = JText::_('EB_LOGIN_TO_REGISTER') ;
}

?>

This is just an example. What I mean is having the $total_registrants in this file, I could change the style for this event (change color to red if its full, etc).

My problem is to have $total_registrants in calendar instead of in event (event/tmpl/default.php)

I'm trying to get this information from event.php, view.html.php (event) or default.php (event), but till now no success.

Could you help please?

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

  • Tuan Pham Ngoc
  • Away
  • Administrator
  • Administrator
More
13 years 5 months ago #12594 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Sold Out Events
Please see my response on support ticket for instruction. If someone looks for the same solution, please get the file below, unzip it, upload ti components/com_eventbooking/models folder. After that, you can use $val->total_registrants to get total registrants of that event.

Tuan

Attachment calendar-20111202.zip not found

Attachments:

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

More
13 years 5 months ago #12629 by iberinternet
Replied by iberinternet on topic Re: Sold Out Events
Thanks but it doesn't work. I'm using joomle 1.5. No event is shown in calendar view.

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

More
13 years 5 months ago #12630 by iberinternet
Replied by iberinternet on topic Re: Sold Out Events
I've just used the attached file in a joomla 1.6 and it doesn't work (no event showing in the calendar view)!!!

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

  • Tuan Pham Ngoc
  • Away
  • Administrator
  • Administrator
More
13 years 5 months ago #12639 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Sold Out Events
Sorry. I didn't test it carefully enough. Please get the updated file here !

Tuan

Attachment calendar-20111204.zip not found

Attachments:

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

More
13 years 5 months ago #12683 by iberinternet
Replied by iberinternet on topic Re: Sold Out Events
This file doesn't work either.
The only difference I can see between 2 files is that you have added "a." to the condition `published` = 1

I'm testing it in a joomla 1.5 with event-booking config hidepastevents=0

For the rest of the forum we are talking about SOLD OUT EVENTS:

The script is one the best I've found (for joomla), very good job. All the scripts can always be improved, but there is something basic for us in order to offer this script to our clients = Joomdonation sell more scripts. In the calendar view the variable "total_registrants" or SUM(number_registrants) has to be present. This is done from /components/com_event-booking/models/calendar.php

In calendar.php there is a query between lines 90-125 which has to get this information.
Independently of the ifs and elses, lets say we have joomla 1.5 and hidepastevents=0, the basic query according the last calendar.php is:

$query = " SELECT a.*, IFNULL(SUM(b.number_registrants), 0) FROM #__eb_events AS a "
." LEFT JOIN #__eb_registrants AS b "
. ' ON (a.id = b.event_id AND (b.published = 1 OR (b.payment_method="os_offline" AND b.published != 2))) '
." WHERE (a.`published` = 1) AND (`event_date` BETWEEN '$startdate' AND '$enddate') AND a.access <= $aid "
." ORDER BY event_date ASC, ordering ASC"
;

We are using LEFT JOIN to get the information from two tables.
Once we have total_registrants, it will be very easy to show it like text, colors, icons, etc to show the clients which event is full and this way they don't have to enter one by one in all the events to see which one they can reserve!!!

Somebody can help please??!!

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

More
13 years 5 months ago #12719 by iberinternet
Replied by iberinternet on topic Re: Sold Out Events
No reply to this message?

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

  • nycps
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
13 years 4 months ago #12906 by nycps
Replied by nycps on topic Re: Sold Out Events
before i install this. has anyone else tested it yet???

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

More
13 years 4 months ago #12986 by iberinternet
Replied by iberinternet on topic Re: Sold Out Events
I've tested it in Joomla 1.5 and 1.6 in two different servers and it doesn't work. Still waiting a solution from Joom Donation since 2 weeks ago!!!

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

Moderators: Tuan Pham Ngoc