Fixed date and time displayed for an event on registration page so it reflects only current or future dates and times.
Fixed time displayed for an event on registration page so it no longer shows a range of times, only the time for the date shown.
Added display of "(see below for other dates/times)" when there are more than the first date/time displayed on the registration page.
Fixed problem where viewing a request from a sold-out event caused the attendees to be removed and the request if there were no attendees.
* @param boolean $withRecurData Ask for all recirrences and recurrence times for event if true
* @param boolean $counts Ask for attendee counts
* @param boolean $inactiveTimes Include inactive times
+ * @param boolean $firstFutureTime Calculate firstTime based on available current/future times (not past)
*
* @return array All data related to the setup/configuration of a registration event
*/
- public function getEventConfig($id = false, $extended = false, $forEdit = false, $withRecurData = false, $counts = false, $inactiveTimes = false)
+ public function getEventConfig($id = false, $extended = false, $forEdit = false, $withRecurData = false, $counts = false, $inactiveTimes = false, $firstFutureTime = false)
{
// Save status of extended data flag
foreach ($this->regEventData['reg_time'] as $time) {
// If the time is not for non-time-specific inventory
- if (!$time['non_time_specific']['value']) {
+ if (!$time['non_time_specific']['value'] && (!$firstFutureTime || $time['start_datetime']['timestamp'] > time())) {
if (!$firstTime || $time['start_datetime']['timestamp'] < $firstTime) {
$firstTime = $time['start_datetime']['timestamp'];
}
{
// Get the event data
- $this->getEventConfig($regEventId);
+ $this->getEventConfig($regEventId, false, false, false, false, false, true);
// Make sure we have an event
if (!$this->regEventData) {
return false;
}
- // If now we don't have any time entries
- if (count($this->regEventData['reg_time']) == 0) {
- return false;
- }
-
// If it's too late to register for this event
if ($this->regEventData['last_datetime']['timestamp'] - time() < ($this->regEventData['reg_hours_before'] & 3600)) {
return false;
// Scan times
foreach ($this->regEventData['reg_time'] as $regTimeKey=>$regTime) {
- // Try to find a current rate for this time - within the start and end days before this time
+ // Try to find a current rate for this time - within the start and end days before this time (ignore non_time_specific entries)
foreach ($regClass['reg_rate'] as $regRateKey=>$regRate) {
if (!$regTime['non_time_specific']['value']) {
* Plugin Name: GLM Associate - Event Registrations Add-On
* Plugin URI: http://www.gaslightmedia.com/
* Description: Add-on to integrate registrations into Events add-on.
- * Version: 1.0.19
+ * Version: 1.0.20
* Author: Gaslight Media
* Author URI: http://www.gaslightmedia.com/
* License: GPL2
* @package glmMembersRegistrationsAddOn
* @author Chuck Scott <cscott@gaslightmedia.com>
* @license http://www.gaslightmedia.com Gaslightmedia
- * @version 1.0.19
+ * @version 1.0.20
*/
// Check that we're being called by WordPress.
* so that we're sure the other add-ons see an up to date
* version from this plugin.
*/
-define('GLM_MEMBERS_REGISTRATIONS_PLUGIN_VERSION', '1.0.19');
+define('GLM_MEMBERS_REGISTRATIONS_PLUGIN_VERSION', '1.0.20');
define('GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_VERSION', '1.0.1');
// This is the minimum version of the GLM Members DB plugin require for this plugin.
if ($requestID && $requestID > 0) {
// Try to check and get the request (cart)
- $cart = $regCartSupport->checkRegistrationRequest($requestID);
+ $cart = $regCartSupport->getRegistrationCart($requestID);
// If there's no valid cart
if (!$cart || !isset($cart['status']) || !$cart['status'] ) {
1. Activate the plugin through the 'Plugins' menu in WordPress
== Changelog ==
+= 1.0.20 =
+* Fixed date and time displayed for an event on registration page so it reflects only current or future dates and times.
+* Fixed time displayed for an event on registration page so it no longer shows a range of times, only the time for the date shown.
+* Added display of "(see below for other dates/times)" when there are more than the first date/time displayed on the registration page.
+* Fixed problem where viewing a request from a sold-out event caused the attendees to be removed and the request if there were no attendees.
+
= 1.0.19 =
* Removed "Select" from progress bar on checkout page that leaked in from development work
</script>
{/literal}
-{assign var=first value = $regEvent.reg_time|@key}
-{assign var=first_date value = $regEvent.reg_time.$first.start_datetime}
-{assign var=last value = $regEvent.reg_time|@end}
-{assign var=last_date value = $last.end_datetime}
{assign var=time_specific value = $regEvent.time_specific.value}
{* Template for the regEvent *}{literal}
{/if}
<div class="small-12 medium-6 large-5 columns glm-reg-event-profile-details-container">
<div class="row">
+
+ {* If there's a starting timestamp for this event. Why wouldn't there be? *}
{if $regEvent.first_datetime.timestamp}
+
<div class="small-12 columns glm-reg-event-profile-details glm-reg-date glm-reg-has-icon"> {$regEvent.first_datetime.timestamp|date_format:"%A, %B %e, %Y"}</div>
+ <div class="small-12 columns glm-reg-event-profile-details glm-reg-time glm-reg-has-icon"> {$regEvent.first_datetime.timestamp|date_format:"%l:%M %p"}</div>
- {if $first_date.timestamp != $last_date.timestamp && !$time_specific}
- <div class="small-12 columns glm-reg-event-profile-details glm-reg-time glm-reg-has-icon"> {$first_date.timestamp|date_format:"%l:%M %p"} - {$last_date.timestamp|date_format:"%l:%M %p"}</div>
- {else}
- <div class="small-12 columns glm-reg-event-profile-details glm-reg-time glm-reg-has-icon"> {$regEvent.first_datetime.timestamp|date_format:"%l:%M %p"}</div>
+ {* If the first and last timestamp are NOT the same, then there's other dates and times Should be selectable below. *}
+ {if $regEvent.first_date.timestamp != $regEvent.last_date.timestamp}
+ <div class="small-12 columns glm-reg-event-profile-details"> (see other dates and times below)</div>
{/if}
+
{/if}
- {if $regEvent.eventCost}
- <div class="small-12 columns glm-reg-event-profile-details glm-reg-cost glm-reg-has-icon"> {$regEvent.eventCost}</div>
- {/if}
+ {if $regEvent.eventCost}
+ <div class="small-12 columns glm-reg-event-profile-details glm-reg-cost glm-reg-has-icon"> {$regEvent.eventCost}</div>
+ {/if}
{if isset( $regEvent.locations ) && ( $regEvent.locations.name || $regEvent.locations.address )}
<div class="small-12 columns glm-reg-event-profile-details glm-reg-location glm-reg-has-icon">
</tr>
{else}
<tr>
- <th class="glm-reg-c1"> {$customField.field_name}:argh</th>
+ <th class="glm-reg-c1"> {$customField.field_name}:</th>
<td>{$customField.stored}</td>
<td class="glm-reg-c3">
{if $customField.cost > 0}