// For each event time except non-time-specific entry
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
- foreach ($regClass['reg_rate'] as $regRateKey=>$regRate) {
+ // If event time is for non-time-specific event - Calculate from the earlies and latest event times
+ if ($regTime['non_time_specific']['value']) {
- // Calculate earliest and latest days for this rate calculated from the start of this event time
- $earliestTime = strtotime(date('m/d/Y', $regTime['start_datetime']['timestamp']).' -'.$regRate['start_days'].' days');
- $latestTime = strtotime(date('m/d/Y', $regTime['start_datetime']['timestamp']).' -'.($regRate['end_days']-1).' days');
- // If it's time to register with this time/rate - Add it to the class data
- if (time() > $earliestTime && time() < $latestTime) {
+ // Try to find a current rate for this time - within the start and end days before this time
+ foreach ($regClass['reg_rate'] as $regRateKey=>$regRate) {
- // Preserve rate ID and don't let it trash the time ID
- $regRate['rate_id'] = $regRate['id'];
- unset($regRate['id']);
+ // Calculate earliest and latest days for this rate calculated from the start of the first date/time for this event
+ $earliestTime = strtotime(date('m/d/Y', $this->regEventData['first_datetime']['timestamp']).' -'.$regRate['start_days'].' days');
+ $latestTime = strtotime(date('m/d/Y', $this->regEventData['first_datetime']['timestamp']).' -'.($regRate['end_days']).' days');
- $this->regEventData['reg_class'][$regClassKey]['times'][$regTime['event_time']] = array_merge($regTime, $regRate);
- $this->regEventData['reg_class'][$regClassKey]['hasTimes'] = true;
- }
+ // If it's time to register with this time/rate - Add it to the class data
+ if (time() >= $earliestTime && time() <= $latestTime && false) {
- }
+ // Preserve rate ID and don't let it trash the time ID
+ $regRate['rate_id'] = $regRate['id'];
+ unset($regRate['id'], $regRate['reg_event']);
- }
+ $this->regEventData['reg_class'][$regClassKey]['times'][$regTime['event_time']] = array_merge($regTime, $regRate);
+ $this->regEventData['reg_class'][$regClassKey]['hasTimes'] = true;
+ }
+ }
+
+ // If time specific event - calculate based on the time entries
+ } else {
- // If event time is for non-time-specific event
- if ($regTime['non_time_specific']) {
+ // Try to find a current rate for this time - within the start and end days before this time
+ foreach ($regClass['reg_rate'] as $regRateKey=>$regRate) {
- // Try to find a current rate for this time - within the start and end days before this time
- foreach ($regClass['reg_rate'] as $regRateKey=>$regRate) {
+ // Calculate earliest and latest days for this rate calculated from the start of this event time
+ $earliestTime = strtotime(date('m/d/Y', $regTime['start_datetime']['timestamp']).' -'.$regRate['start_days'].' days');
+ $latestTime = strtotime(date('m/d/Y', $regTime['start_datetime']['timestamp']).' -'.($regRate['end_days']-1).' days');
- // Calculate earliest and latest days for this rate calculated from the start of the first date/time for this event
- // ** We may want to make it optional to use the last day of the event ???
- $earliestTime = strtotime(date('m/d/Y', $this->regEventData['firstTime']['start_time']['timestamp']).' -'.$regRate['start_days'].' days');
- $latestTime = strtotime(date('m/d/Y', $this->regEventData['firstTime']['start_time']['timestamp']).' -'.($regRate['end_days']-1).' days');
+ // If it's time to register with this time/rate - Add it to the class data
+ if (time() > $earliestTime && time() < $latestTime) {
- // If it's time to register with this time/rate - Add it to the class data
- if (time() > $earliestTime && time() < $latestTime) {
+ // Preserve rate ID and don't let it trash the time ID
+ $regRate['rate_id'] = $regRate['id'];
+ unset($regRate['id']);
- // Preserve rate ID and don't let it trash the time ID
- $regRate['rate_id'] = $regRate['id'];
- unset($regRate['id'], $regRate['reg_event']);
+ $this->regEventData['reg_class'][$regClassKey]['times'][$regTime['event_time']] = array_merge($regTime, $regRate);
+ $this->regEventData['reg_class'][$regClassKey]['hasTimes'] = true;
+ }
- $this->regEventData['reg_class'][$regClassKey]['times'][$regTime['event_time']] = array_merge($regTime, $regRate);
- $this->regEventData['reg_class'][$regClassKey]['hasTimes'] = true;
}
}
} // Have rates for this class
- // Drop the rate supplied rate data that's now merged with time and saved with the class.
-// unset($this->regEventData['reg_class'][$regClassKey]['reg_rate']);
-
} // for each class
// Get rid of all of the recurrence data - No longer needed
<!-- Selected Time: <span id="add_reg-select-time-display"></span> -->
<input type="hidden" id="add_reg-select-time">
{/if}{literal}
+
+
+
+{/literal}
+ {if apply_filters('glm-members-customfields-active', false)}
+ID = {$regEvent.id}
+ {assign var="fid" value="glm_reg_customfields_reg_attendee_`$event.id`"} {* assemble the uid with the current event ID *}
+<br>FID = {$fid}
+ {if apply_filters('glm-members-customfields-have-fields', false, $fid)}
+
+ {apply_filters('glm-members-customfields-form-display', '', $fid, $cartId, 'checkoutForm', false)}
+
+ {/if}
+ {/if}
+{literal}
+
+
+
</div>
</div>
<div class="glm-row">
Models: { Front: {}, Admin: {} },
Collections: { Front: {}, Admin: {} },
Views: { Front: {}, Admin: {} },
- //Times: {$regTimesJSON},
isValidEmail: function( email ){
var regex = {literal}/^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/;{/literal}
return regex.test(email);