From: Chuck Scott {$regSettings.fieldFail.reg_payment_methods} {$regSettings.fieldFail.reg_cc_accepts} Authorize.net {$regSettings.fieldFail.reg_merchant_solutions_merchant_email} PayPal Other General Options Billing Information Fields {$regSettings.fieldFail.reg_bill_info_requested} {$termSettings.fieldFail.reg_term_registrations_name} {$termSettings.fieldFail.reg_term_attendee_plur_cap} {$termSettings.fieldFail.reg_term_attended} {$termSettings.fieldFail.reg_term_attending} {$termSettings.fieldFail.reg_term_contact_information} {$termSettings.fieldFail.reg_term_event_plur_cap} {$termSettings.fieldFail.reg_term_rate} {$termSettings.fieldFail.reg_term_rate_cap} {$termSettings.fieldFail.reg_term_rate_plur} {$termSettings.fieldFail.reg_term_rate_plur_cap} {$termSettings.fieldFail.reg_term_register_cap} {$termSettings.fieldFail.reg_term_registered_cap} {$termSettings.fieldFail.reg_term_registered_user_plur_cap} {$termSettings.fieldFail.reg_term_registers} {$termSettings.fieldFail.reg_term_registers} {$termSettings.fieldFail.reg_term_registration_plur_cap} NOTE: Please try to keep text for the buttons below very short and verify how they look when you're done! NOTE: Please try to keep text for the buttons below very short and verify how they look when you're done! {$termSettings.fieldFail.reg_term_button_checkout_page_submit}$eventData: ' . print_r( $eventData, true ) . '
';
-
- // Add to the registration event array
- $result_data['intro'] = $eventData['intro'];
- $result_data['eventDescr'] = $eventData['descr'];
- $result_data['image'] = $eventData['image'];
- $result_data['contact_name'] = $eventData['contact_name'];
- $result_data['contact_email'] = $eventData['contact_email'];
- $result_data['contact_phone'] = $eventData['contact_phone'];
- $result_data['url'] = $eventData['url'];
- $result_data['eventCost'] = $eventData['cost'];
- $result_data['hide_address'] = $eventData['hide_address'];
- $result_data['use_member_location'] = $eventData['use_member_location'];
-
- // Check for times data and use that.
- if ( isset( $eventData['times'] ) && $eventData['times'] ) {
- $result_data['times'] = $eventData['times'];
- }
- if ( isset( $eventData['starting_date'] ) && $eventData['starting_date'] ) {
- $result_data['starting_date'] = $eventData['starting_date'];
- }
- if ( isset( $eventData['ending_date'] ) && $eventData['ending_date'] ) {
- $result_data['ending_date'] = $eventData['ending_date'];
- }
- if ( isset( $eventData['locations'] ) && $eventData['locations'] ) {
- $result_data['locations'] = $eventData['locations'];
- }
- if ( isset( $eventData['other_ref_dest'] ) && $eventData['other_ref_dest'] ) {
- $result_data['other_ref_dest'] = $eventData['other_ref_dest'];
- }
- if ( isset( $eventData['member'] ) && $eventData['member'] ) {
- $result_data['member'] = $eventData['member'];
- }
- if ( isset( $eventData['recurrences'] ) && $eventData['recurrences'] ) {
- $result_data['recurrences'] = $eventData['recurrences'];
- }
- if ( isset( $eventData['all_day'] ) && $eventData['all_day'] ) {
- $result_data['all_day'] = $eventData['all_day'];
+ // If this is not a stand-alone registrations event, get the event data
+ if ($result_data['event'] != 0) {
+
+ // Use hook to Events to get current data for this event
+ $eventData = apply_filters('glm-member-db-events-get-event', $result_data['event']);
+
+ // echo '$eventData: ' . print_r( $eventData, true ) . '
';
+
+ // Add to the registration event array
+ $result_data['intro'] = $eventData['intro'];
+ $result_data['eventDescr'] = $eventData['descr'];
+ $result_data['image'] = $eventData['image'];
+ $result_data['contact_name'] = $eventData['contact_name'];
+ $result_data['contact_email'] = $eventData['contact_email'];
+ $result_data['contact_phone'] = $eventData['contact_phone'];
+ $result_data['url'] = $eventData['url'];
+ $result_data['eventCost'] = $eventData['cost'];
+ $result_data['hide_address'] = $eventData['hide_address'];
+ $result_data['use_member_location'] = $eventData['use_member_location'];
+
+ // Check for times data and use that.
+ if ( isset( $eventData['times'] ) && $eventData['times'] ) {
+ $result_data['times'] = $eventData['times'];
+ }
+ if ( isset( $eventData['starting_date'] ) && $eventData['starting_date'] ) {
+ $result_data['starting_date'] = $eventData['starting_date'];
+ }
+ if ( isset( $eventData['ending_date'] ) && $eventData['ending_date'] ) {
+ $result_data['ending_date'] = $eventData['ending_date'];
+ }
+ if ( isset( $eventData['locations'] ) && $eventData['locations'] ) {
+ $result_data['locations'] = $eventData['locations'];
+ }
+ if ( isset( $eventData['other_ref_dest'] ) && $eventData['other_ref_dest'] ) {
+ $result_data['other_ref_dest'] = $eventData['other_ref_dest'];
+ }
+ if ( isset( $eventData['member'] ) && $eventData['member'] ) {
+ $result_data['member'] = $eventData['member'];
+ }
+ if ( isset( $eventData['recurrences'] ) && $eventData['recurrences'] ) {
+ $result_data['recurrences'] = $eventData['recurrences'];
+ }
+ if ( isset( $eventData['all_day'] ) && $eventData['all_day'] ) {
+ $result_data['all_day'] = $eventData['all_day'];
+ }
+
+ // Stand-Alone event, so assemble certain data as if it came from an event listing
+ } else {
+
+ // Check first if the current request included the location data
+ if (isset($result_data['cost'])) {
+ $result_data['eventCost'] = $result_data['cost'];
+ $result_data['locations'] = array(
+ 'name' => $result_data['location_name'],
+ 'address' => $result_data['address'],
+ 'city' => $result_data['city'],
+ 'state' => $result_data['state'],
+ 'zip' => $result_data['zip'],
+ 'country' => $result_data['country'],
+ 'lat' => $result_data['lat'],
+ 'lon' => $result_data['lon'],
+ 'region' => $result_data['region'],
+ 'phone' => $result_data['phone'],
+ 'url' => $result_data['url'],
+ 'email' => $result_data['email'],
+ 'contact_name' => $result_data['contact_fname'].' '.$result_data['contact_lname'],
+ 'contact_phone' => $result_data['contact_phone'],
+ 'contact_email' => $result_data['contact_email']
+ );
+ }
}
}
-
}
// If we're asked to get registrant counts
@@ -541,12 +756,12 @@ class GlmDataRegistrationsRegEvent extends GlmDataAbstract
$savedFields = $this->fields;
$this->fields = array(
- 'id' => $savedFields['id'],
- 'event_name' => $savedFields['event_name'],
- 'notify_email' => $savedFields['notify_email'],
- 'descr' => $savedFields['descr'],
- 'first_datetime' => $savedFields['first_datetime'],
- 'last_datetime' => $savedFields['last_datetime']
+ 'id' => $savedFields['id'],
+ 'event_name' => $savedFields['event_name'],
+ 'notify_email' => $savedFields['notify_email'],
+ 'descr' => $savedFields['descr'],
+ 'first_datetime' => $savedFields['first_datetime'],
+ 'last_datetime' => $savedFields['last_datetime']
);
$r = $this->getEntry($eventId);
@@ -861,34 +1076,37 @@ class GlmDataRegistrationsRegEvent extends GlmDataAbstract
if ($haveTimeEntry) {
$firstDateTime = array('datetime' => date('m/d/Y h:i A', $firstTime), 'timestamp' => $firstTime, 'mysql_datetime' => date('Y-m-d H:i:s', $firstTime));
$lastDateTime = array('datetime' => date('m/d/Y h:i A', $lastTime), 'timestamp' => $lastTime, 'mysql_datetime' => date('Y-m-d H:i:s', $lastTime));
+
+ // Check if we need to update first and/or last event times in database - if so, do that
+ if ($this->regEventData['first_datetime']['timestamp'] != $firstTime ||
+ $this->regEventData['last_datetime']['timestamp'] != $lastTime ) {
+
+ // Update the regEventData first and last times
+ $this->regEventData['first_datetime'] = $firstDateTime;
+ $this->regEventData['last_datetime'] = $lastDateTime;
+
+ // Update the database
+ $this->wpdb->update(
+ GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX.'reg_event',
+ array(
+ 'first_datetime' => $firstDateTime['mysql_datetime'],
+ 'last_datetime' => $lastDateTime['mysql_datetime'],
+ ),
+ array( 'id' => $this->regEventData['id'] ),
+ array(
+ '%s',
+ '%s'
+ )
+ );
+ }
+
+
+
} else {
$firstDateTime = 'NULL';
$lastDateTime = 'NULL';
}
- // Check if we need to update first and/or last event times in database - if so, do that
- if ($this->regEventData['first_datetime']['timestamp'] != $firstTime ||
- $this->regEventData['last_datetime']['timestamp'] != $lastTime
- ) {
-
- // Update the regEventData first and last times
- $this->regEventData['first_datetime'] = $firstDateTime;
- $this->regEventData['last_datetime'] = $lastDateTime;
-
- // Update the database
- $this->wpdb->update(
- GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX.'reg_event',
- array(
- 'first_datetime' => $firstDateTime['mysql_datetime'],
- 'last_datetime' => $lastDateTime['mysql_datetime'],
- ),
- array( 'id' => $this->regEventData['id'] ),
- array(
- '%s',
- '%s'
- )
- );
- }
// If this is a non-time-specific event
if (!$this->regEventData['time_specific']) {
diff --git a/classes/data/dataRegRequestRegistrant.php b/classes/data/dataRegRequestRegistrant.php
index 7f0c1f0..5ff98b5 100755
--- a/classes/data/dataRegRequestRegistrant.php
+++ b/classes/data/dataRegRequestRegistrant.php
@@ -388,7 +388,6 @@ class GlmDataRegistrationsRequestRegistrant extends GlmDataAbstract
return false;
}
$registrants = $listResult['list'];
-
$registrantCount = $this->getStats(str_replace('T.', '', $whereEvent));
// Make sure we received registrants
@@ -460,6 +459,7 @@ class GlmDataRegistrationsRequestRegistrant extends GlmDataAbstract
// Try to get any per
}
+
$listResult['list'] = $registrants;
$listResult['totalCount'] = $registrantCount;
diff --git a/classes/data/dataSettingsTerms.php b/classes/data/dataSettingsTerms.php
index b9223d1..7ef91d6 100644
--- a/classes/data/dataSettingsTerms.php
+++ b/classes/data/dataSettingsTerms.php
@@ -444,6 +444,38 @@ class GlmDataRegistrationsSettingsTerms extends GlmDataAbstract
'use' => 'a'
),
+ // Term for rate
+ 'reg_term_rate' => array (
+ 'field' => 'reg_term_rate',
+ 'type' => 'text',
+ 'required' => true,
+ 'use' => 'a'
+ ),
+
+ // Term for Rate (cap)
+ 'reg_term_rate_cap' => array (
+ 'field' => 'reg_term_rate_cap',
+ 'type' => 'text',
+ 'required' => true,
+ 'use' => 'a'
+ ),
+
+ // Term for rates (plur)
+ 'reg_term_rate_plur' => array (
+ 'field' => 'reg_term_rate_plur',
+ 'type' => 'text',
+ 'required' => true,
+ 'use' => 'a'
+ ),
+
+ // Term for Rates (plur, cap)
+ 'reg_term_rate_plur_cap' => array (
+ 'field' => 'reg_term_rate_plur_cap',
+ 'type' => 'text',
+ 'required' => true,
+ 'use' => 'a'
+ ),
+
// Term for payment code
'reg_term_payment_code' => array (
'field' => 'reg_term_payment_code',
diff --git a/classes/regCartSupport.php b/classes/regCartSupport.php
index 6bbeb67..985fa7a 100755
--- a/classes/regCartSupport.php
+++ b/classes/regCartSupport.php
@@ -1441,6 +1441,7 @@ class GlmRegCartSupport
'SubmittedByOrganization' => $account['org'],
'BillingFirstname' => $this->cart['request']['bill_fname'],
'BillingLastname' => $this->cart['request']['bill_lname'],
+ 'BillingOrg' => $this->cart['request']['bill_org'],
'BillingAddrLine1' => $this->cart['request']['bill_addr1'],
'BillingAddrLine2' => $this->cart['request']['bill_addr2'],
'BillingCity' => $this->cart['request']['bill_city'],
diff --git a/config/plugin.ini b/config/plugin.ini
index 23e5d86..5f7ac20 100755
--- a/config/plugin.ini
+++ b/config/plugin.ini
@@ -7,7 +7,7 @@
[common]
-cart_id_check_secret = 'GlMREGcartSecret4ID'
+cart_id_check_secret = 'GlMREGcartSecret4ID'
;
; Show Rate type (how it rates will be displayed in lists) - Use as List
@@ -184,15 +184,15 @@ billing_field[10] = 'Country'
billing_field[11] = 'Phone'
billing_field[12] = 'FAX'
-billing_field_numb['First Name'] = 1
-billing_field_numb['Last Name'] = 2
+billing_field_numb['FirstName'] = 1
+billing_field_numb['LastName'] = 2
billing_field_numb['Organization'] = 3
-billing_field_numb['Title/Department'] = 4
-billing_field_numb['Address Line 1'] = 5
-billing_field_numb['Address Line 2'] = 6
+billing_field_numb['TitleDepartment'] = 4
+billing_field_numb['AddressLine1'] = 5
+billing_field_numb['AddressLine2'] = 6
billing_field_numb['City'] = 7
billing_field_numb['State'] = 8
-billing_field_numb['ZIP/Postal Code'] = 9
+billing_field_numb['ZIPPostalCode'] = 9
billing_field_numb['Country'] = 10
billing_field_numb['Phone'] = 11
billing_field_numb['FAX'] = 12
@@ -202,9 +202,9 @@ billing_field_numb['FAX'] = 12
;
submission_status[0] = 'In Cart'
submission_status[10] = 'Complete'
-; submission_status[20] = 'Unpaid'
+; submission_status[20] = 'Unpaid'
submission_status[30] = 'Card Pending'
-; submission_status[40] = 'Card Declined'
+; submission_status[40] = 'Card Declined'
submission_status[50] = 'Payment Pending'
submission_status[60] = 'Pay On Arrival'
submission_status[70] = 'Administrative Hold'
diff --git a/css/admin.css b/css/admin.css
index 7eba174..60d3178 100755
--- a/css/admin.css
+++ b/css/admin.css
@@ -48,9 +48,9 @@
}
.reg-level-container {
margin-bottom: 1em;
- background-color: white;
- padding: .25rem;
- border: 1px solid black;
+ background-color: white;
+ padding: .25rem;
+ border: 1px solid black;
cursor: pointer;
}
.reg-level-display-container {
@@ -67,8 +67,8 @@
}
.reg-level-edit-container {
display: none;
- border: 1px solid black;
- padding: 1em;
+ border: 1px solid black;
+ padding: 1em;
background-color: #f8ffff;
margin: 1em;
}
@@ -85,9 +85,9 @@
margin-bottom: .5em;
}
.reg-rate-edit-container {
- display: none;
- border: 1px solid black;
- padding: 1em;
+ display: none;
+ border: 1px solid black;
+ padding: 1em;
background-color: #f8ffff;
margin: 1em;
}
@@ -143,6 +143,19 @@
font-size: 0.875rem;
}
+/* Admin Event Dashboard page */
+.reg-non-time-specific-max-form {
+ border: 1px solid #bbb;
+ padding: 5px;
+ margin: 1em 0 1em 0;
+}
+
+/* Admin Event Edit page */
+.reg-event-edit-section {
+ text-align: left;
+ font-size: 1.2em;
+ padding: 1em 0 1em 0;
+}
/* Event Registration Edit Page */
.glm-reg-label{
@@ -251,15 +264,15 @@ label.registrant-label {
padding: 2rem 0 1rem 0;
}
.glm-reg-message-title {
- padding: 1rem 0 1rem 0;
+ padding: 1rem 0 1rem 0;
}
.glm-reg-message-prompt {
text-align: right !important;
- padding-top: 3rem;
+ padding-top: 3rem;
}
.glm-reg-message-prompt-email-text {
text-align: right !important;
- padding-top: 3rem;
+ padding-top: 3rem;
}
.glm-reg-message-body {
}
@@ -349,7 +362,7 @@ span.glm-error {
.glm-reg-cart-item, .glm-reg-cart-registrant{
/* padding: 0;*/
}
-
+
}
/*{{{ Media Queries */
@@ -375,7 +388,7 @@ span.glm-error {
}
@media (max-width: 1024px) {
-
+
}
@media(min-width: 1024px){
.glm-reg-cart-summary-custom-fields{
@@ -385,4 +398,5 @@ span.glm-error {
.glm-reg-cart-custom-charge{
margin-top: -5px;
}
-}
\ No newline at end of file
+}
+
diff --git a/data/event_setup.php b/data/event_setup.php
deleted file mode 100644
index f291701..0000000
--- a/data/event_setup.php
+++ /dev/null
@@ -1,431 +0,0 @@
- array
- (
- 'id' => 1000,
- 'event' => 1,
- 'event_name' => 'GLM Sample Event',
- 'event_code' => 'glm-sample-event',
- 'notify_email' => '',
- 'admin_active' => true,
- 'active' => false,
- 'attendees' => true,
- 'attendee_max' => 50,
- 'attendee_max_per_reg' => 5,
- 'reg_hold_minutes' => 30,
- 'cart_hold_days' => 2,
- 'registration_account_options' => 7, // Guest, Saved accounts, Member Contact registrations
- 'payment_methods' => 18, // Credit Card and comp code
- 'restricted_payment_methods' => 13, // No charge, cash, check
- 'terms' => 'Sample terms and conditions',
- 'reg_file' => '',
- 'reg_file_title' => ''
- ),
-
- // reg_time - One record for each date/time this event has people registered - Primarily tracks attendee counts and charge totals
- 'reg_time' => array
- (
- 1 => array
- (
- 'id' => 1100,
- 'reg_event' => 1000,
- 'event_time' => false,
- 'start_datetime' => null,
- 'end_datetime' => null,
- 'all_day' => true,
- 'attendees' => true,
- 'attendee_max' => false,
- 'attendee_count' => 0,
- 'attendee_pending' => 0,
- 'attendees_available' => 50,
- 'total_base_charge' => 0,
- 'total_per_attendee' => 0,
- 'total_other' => 0,
- 'total_taxes' => 0,
- 'total_charge' => 0,
- 'total_discounts' => 0,
- 'total_payments' => 0
- )
- // Additional times registration may take place
- ),
-
- // reg_class - Type of registration for this event (one or more)
- 'reg_class' => array
- (
- 1 => array
- (
- 'id' => 1200,
- 'reg_event' => 1000,
- 'name' => 'Standard',
- 'descr' => 'Standard registration for this event. Provides all standard attendee privileges.',
- 'reg_rate_name' => 'Early Bird',
- 'reg_rate_base_price' => 100.00,
- 'reg_rate_per_reg' => 10.00,
- // 'reg_rate' => array
- // (
- // 1 => array
- // (
- // 'id' => 1300,
- // 'reg_event' => 1000,
- // 'reg_class' => 1200,
- // 'name' => 'Early Bird',
- // 'start_days' => 60,
- // 'end_days' => 31,
- // 'base_rate' => 100.00,
- // 'per_registrant' => 10.00,
- // 'registrant_credits' => 1
- // ),
- // 2 => array
- // (
- // 'id' => 1301,
- // 'reg_event' => 1000,
- // 'reg_class' => 1200,
- // 'name' => 'Standard Registration',
- // 'start_days' => 30,
- // 'end_days' => 11,
- // 'base_rate' => 120.00,
- // 'per_registrant' => 12.00,
- // 'registrant_credits' => 1
- // ),
- // 3 => array
- // (
- // 'id' => 1302,
- // 'reg_event' => 1000,
- // 'reg_class' => 1200,
- // 'name' => 'Last Chance',
- // 'start_days' => 10,
- // 'end_days' => 2, // no registration after 2 days before event
- // 'base_rate' => 160.00,
- // 'per_registrant' => 16.00,
- // 'registrant_credits' => 1
- // ),
- // )
- ),
-
- 2 => array(
- 'id' => 1201,
- 'reg_event' => 1000,
- 'name' => 'Deluxe',
- 'descr' => 'Deluxe registration for this event. Provides all attendee privileges.',
- 'reg_rate_name' => 'Early Bird',
- 'reg_rate_base_price' => 100.00,
- 'reg_rate_per_reg' => 10.00,
- // 'reg_rate' => array
- // (
- // 1 => array
- // (
- // 'id' => 1300,
- // 'reg_event' => 1000,
- // 'reg_class' => 1200,
- // 'name' => 'Early Bird',
- // 'start_days' => 60,
- // 'end_days' => 31,
- // 'base_rate' => 100.00,
- // 'per_registrant' => 10.00,
- // 'registrant_credits' => 1
- // ),
- // 2 => array
- // (
- // 'id' => 1301,
- // 'reg_event' => 1000,
- // 'reg_class' => 1200,
- // 'name' => 'Standard Registration',
- // 'start_days' => 30,
- // 'end_days' => 11,
- // 'base_rate' => 120.00,
- // 'per_registrant' => 12.00,
- // 'registrant_credits' => 1
- // ),
- // 3 => array
- // (
- // 'id' => 1302,
- // 'reg_event' => 1000,
- // 'reg_class' => 1200,
- // 'name' => 'Last Chance',
- // 'start_days' => 10,
- // 'end_days' => 2, // no registration after 2 days before event
- // 'base_rate' => 160.00,
- // 'per_registrant' => 16.00,
- // 'registrant_credits' => 1
- // ),
- // )
- ),
-
- // reg_rates - Date range / rate for a reg class (one or more)
-
- )
-
-);
-
-
-//echo "".print_r($regEventSample,1)."
";
-
-/* Sample actual data for reference for a complete event (this one doesn't include classes and times yet)
-
-Array
-(
- [id] => 61
- [event] => 2
- [event_name] => Active Time
- [event_code] => active-time
- [notify_email] => cscott@gaslightmedia.com
- [admin_active] => Array
- (
- [list] =>
- [value] => 0
- [name] => No
- )
-
- [active] => Array
- (
- [list] =>
- [value] => 1
- [name] => Yes
- )
-
- [time_specific] => Array
- (
- [list] =>
- [value] => 0
- [name] => No
- )
-
- [attendees] => Array
- (
- [list] =>
- [value] => 0
- [name] => No
- )
-
- [attendee_max] => 0
- [attendee_max_per_reg] => 0
- [reg_hold_minutes] => 60
- [cart_hold_days] => 10
- [registration_account_options] => Array
- (
- [bitmap] => Array
- (
- [1] => Array
- (
- [name] => Guest Registration
- [nameEsc] => Guest Registration
- [value] => 1
- [default] => 1
- )
-
- [2] => Array
- (
- [name] => Saved Registration Accounts
- [nameEsc] => Saved Registration Accounts
- [value] => 2
- [default] => 1
- )
-
- [3] => Array
- (
- [name] => Member Contact Registrations
- [nameEsc] => Member Contact Registrations
- [value] => 3
- [default] => 1
- )
-
- )
-
- [value] => 14
- [names] => Array
- (
- [1] => Guest Registration
- [2] => Saved Registration Accounts
- [3] => Member Contact Registrations
- )
-
- )
-
- [payment_methods] => Array
- (
- [bitmap] => Array
- (
- [1] => Array
- (
- [name] => No Charge
- [nameEsc] => No Charge
- [value] => 1
- [default] =>
- )
-
- [2] => Array
- (
- [name] => Comp Code
- [nameEsc] => Comp Code
- [value] => 2
- [default] => 1
- )
-
- [3] => Array
- (
- [name] => Cash
- [nameEsc] => Cash
- [value] => 3
- [default] =>
- )
-
- [4] => Array
- (
- [name] => Check
- [nameEsc] => Check
- [value] => 4
- [default] =>
- )
-
- [5] => Array
- (
- [name] => Credit Card
- [nameEsc] => Credit Card
- [value] => 5
- [default] => 1
- )
-
- [6] => Array
- (
- [name] => Call from Merchant
- [nameEsc] => Call from Merchant
- [value] => 6
- [default] =>
- )
-
- [99] => Array
- (
- [name] => Undefined
- [nameEsc] => Undefined
- [value] => 99
- [default] =>
- )
-
- )
-
- [value] => 36
- [names] => Array
- (
- [2] => Comp Code
- [5] => Credit Card
- )
-
- )
-
- [restricted_payment_methods] => Array
- (
- [bitmap] => Array
- (
- [1] => Array
- (
- [name] => No Charge
- [nameEsc] => No Charge
- [value] => 1
- [default] => 1
- )
-
- [2] => Array
- (
- [name] => Comp Code
- [nameEsc] => Comp Code
- [value] => 2
- [default] =>
- )
-
- [3] => Array
- (
- [name] => Cash
- [nameEsc] => Cash
- [value] => 3
- [default] => 1
- )
-
- [4] => Array
- (
- [name] => Check
- [nameEsc] => Check
- [value] => 4
- [default] => 1
- )
-
- [5] => Array
- (
- [name] => Credit Card
- [nameEsc] => Credit Card
- [value] => 5
- [default] =>
- )
-
- [6] => Array
- (
- [name] => Call from Merchant
- [nameEsc] => Call from Merchant
- [value] => 6
- [default] =>
- )
-
- [99] => Array
- (
- [name] => Undefined
- [nameEsc] => Undefined
- [value] => 99
- [default] =>
- )
-
- )
-
- [value] => 26
- [names] => Array
- (
- [1] => No Charge
- [3] => Cash
- [4] => Check
- )
-
- )
-
- [descr] => This is a description of registrations for this event. This is not the same as the event description that is stored in the Events add-on. This one is specific to registrations for this event.
- [terms] => asdasdasdasd
- [reg_file] =>
- [reg_file_title] => asdasdasd
- [form_revision] => 0
- [notes] => asdasdaaddadadad
- [reg_time] =>
- [reg_class] => Array
- (
- [22] => Array
- (
- [id] => 22
- [reg_event] => 61
- [name] => Admiral Class
- [descr] => This is our Admiral Class registration level.
- [reg_rate] => Array
- (
- [17] => Array
- (
- [id] => 17
- [reg_event] => 61
- [reg_class] => 22
- [name] => Rate Name
- [start_days] => 100
- [end_days] => 50
- [base_rate] => $20.00
- [per_registrant] => $10.00
- [registrant_credits] => 1
- )
-
- )
-
- )
-
- )
-
-)
-
-*/
diff --git a/data/events.php b/data/events.php
deleted file mode 100644
index 8405fa7..0000000
--- a/data/events.php
+++ /dev/null
@@ -1,50 +0,0 @@
- array(
- 'id' => 1,
- 'title' => 'PHP Payment Gateways',
- 'short_desc' => 'Setting up your developer account and testing payment gateways',
- 'levels' => array(
- 3 => array(
- 'id' => 3,
- 'title' => 'General Admittance',
- 'registrants' => array(
- 1 => array(
- 'id' => 1,
- 'fname' => 'Dan',
- 'lname' => 'Smith',
- 'email' => 'dan@smith.com',
- ),
- 3 => array(
- 'id' => 3,
- 'fname' => 'Tony',
- 'lname' => 'Johnson',
- 'email' => 'tj@website.com',
- ),
- ),
- ),
- ),
- ),
- 2 => array(
- 'id' => 2,
- 'title' => 'Mailchimp Newsletters',
- 'short_desc' => 'Learning how to setup test and use mailchimp to the fullest.',
- 'levels' => array(
- 4 => array(
- 'id' => 4,
- 'title' => 'General Admittance',
- 'registrants' => array(
- 2 => array(
- 'id' => 2,
- 'fname' => 'John',
- 'lname' => 'Handler',
- 'email' => 'johny@handler.com',
- ),
- ),
- ),
- ),
- )
-);
-
diff --git a/defines.php b/defines.php
index b521cd8..8d34438 100644
--- a/defines.php
+++ b/defines.php
@@ -57,7 +57,6 @@ define('GLM_MEMBERS_REGISTRATIONS_PLUGIN_BASE_URL', WP_PLUGIN_URL.'/'.GLM_MEMBER
define('GLM_MEMBERS_REGISTRATIONS_PLUGIN_CURRENT_URL', $urlParts['scheme'].'://'.$urlParts['host'].$pageUri[0]);
define('GLM_MEMBERS_REGISTRATIONS_PLUGIN_ASSETS_URL', GLM_MEMBERS_REGISTRATIONS_PLUGIN_URL.'assets');
-
// Directories
define('GLM_MEMBERS_REGISTRATIONS_PLUGIN_PATH', dirname(__FILE__));
define('GLM_MEMBERS_REGISTRATIONS_PLUGIN_SETUP_PATH', GLM_MEMBERS_REGISTRATIONS_PLUGIN_PATH.'/setup');
diff --git a/index.php b/index.php
index 39edc03..791b2e9 100755
--- a/index.php
+++ b/index.php
@@ -42,7 +42,7 @@ if (!defined('ABSPATH')) {
* version from this plugin.
*/
define('GLM_MEMBERS_REGISTRATIONS_PLUGIN_VERSION', '1.1.0');
-define('GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_VERSION', '1.0.2');
+define('GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_VERSION', '1.0.3');
// This is the minimum version of the GLM Members DB plugin require for this plugin.
define('GLM_MEMBERS_REGISTRATIONS_PLUGIN_MIN_MEMBERS_REQUIRED_VERSION', '2.10.27');
diff --git a/js/frontRegApp.js b/js/frontRegApp.js
index 9f3e9f6..a0acab8 100644
--- a/js/frontRegApp.js
+++ b/js/frontRegApp.js
@@ -6,9 +6,11 @@ app.Models.Front.Account = Backbone.Model.extend({
// Default registrant values
defaults: {
id: 0,
- name: 'AppAccount',
+ name: 'AppAccount',
fname: '',
lname: '',
+ org: '',
+ title: '',
email: '',
validated: false,
},
@@ -239,6 +241,8 @@ app.Models.Front.RegRequestRegistrant = Backbone.Model.extend({
email: '',
fname: '',
lname: '',
+ org: '',
+ title: '',
addr1: '',
addr2: '',
city: '',
@@ -780,6 +784,8 @@ app.Views.Front.RegRequestRegistrant = Backbone.View.extend({
var fname = this.$('.reg_fname').val().trim();
var lname = this.$('.reg_lname').val().trim();
var email = this.$('.reg_email').val().trim();
+ var org = this.$('.reg_org').val().trim();
+ var title = this.$('.reg_title').val().trim();
var addr1 = this.$('.reg_addr1').val().trim();
var addr2 = this.$('.reg_addr2').val().trim();
var city = this.$('.reg_city').val().trim();
@@ -817,6 +823,8 @@ app.Views.Front.RegRequestRegistrant = Backbone.View.extend({
fname: fname,
lname: lname,
email: email,
+ org: org,
+ title: title,
addr1: addr1,
addr2: addr2,
city: city,
@@ -989,6 +997,8 @@ app.Views.Front.RegTime = Backbone.View.extend({
var fname = this.$('.add_reg_fname').val().trim();
var lname = this.$('.add_reg_lname').val().trim();
var email = this.$('.add_reg_email').val().trim();
+ var org = this.$('.add_reg_org').val().trim();
+ var title = this.$('.add_reg_title').val().trim();
var addr1 = this.$('.add_reg_addr1').val().trim();
var addr2 = this.$('.add_reg_addr2').val().trim();
var city = this.$('.add_reg_city').val().trim();
@@ -1050,6 +1060,8 @@ app.Views.Front.RegTime = Backbone.View.extend({
email: email,
fname: fname,
lname: lname,
+ org: org,
+ title: title,
addr1: addr1,
addr2: addr2,
city: city,
@@ -1178,6 +1190,8 @@ app.Views.Front.RegistrantForm = Backbone.View.extend({
this.$('.add_reg_email').val(account.email);
this.$('.add_reg_fname').val(account.fname);
this.$('.add_reg_lname').val(account.lname);
+ this.$('.add_reg_org').val(account.org);
+ this.$('.add_reg_title').val(account.title);
this.$('.add_reg_addr1').val(account.addr1);
this.$('.add_reg_addr2').val(account.addr2);
this.$('.add_reg_city').val(account.city);
@@ -1201,6 +1215,8 @@ app.Views.Front.RegistrantForm = Backbone.View.extend({
lockForm: function(){
this.$('.add_reg_fname').prop('disabled', true);
this.$('.add_reg_lname').prop('disabled', true);
+ this.$('.add_reg_org').prop('disabled', true);
+ this.$('.add_reg_title').prop('disabled', true);
this.$('.add_reg_addr1').prop('disabled', true);
this.$('.add_reg_addr2').prop('disabled', true);
this.$('.add_reg_city').prop('disabled', true);
@@ -1213,6 +1229,8 @@ app.Views.Front.RegistrantForm = Backbone.View.extend({
unLockForm: function(){
this.$('.add_reg_fname').prop('disabled', false);
this.$('.add_reg_lname').prop('disabled', false);
+ this.$('.add_reg_org').prop('disabled', false);
+ this.$('.add_reg_title').prop('disabled', false);
this.$('.add_reg_addr1').prop('disabled', false);
this.$('.add_reg_addr2').prop('disabled', false);
this.$('.add_reg_city').prop('disabled', false);
diff --git a/js/models/front/account.js b/js/models/front/account.js
index f7f71ad..6260360 100644
--- a/js/models/front/account.js
+++ b/js/models/front/account.js
@@ -6,9 +6,11 @@ app.Models.Front.Account = Backbone.Model.extend({
// Default registrant values
defaults: {
id: 0,
- name: 'AppAccount',
+ name: 'AppAccount',
fname: '',
lname: '',
+ org: '',
+ title: '',
email: '',
validated: false,
},
diff --git a/js/models/front/regRequestRegistrant.js b/js/models/front/regRequestRegistrant.js
index 1dcca8c..24a88a3 100644
--- a/js/models/front/regRequestRegistrant.js
+++ b/js/models/front/regRequestRegistrant.js
@@ -19,6 +19,8 @@ app.Models.Front.RegRequestRegistrant = Backbone.Model.extend({
email: '',
fname: '',
lname: '',
+ org: '',
+ title: '',
addr1: '',
addr2: '',
city: '',
diff --git a/js/views/front/regRequestRegistrant.js b/js/views/front/regRequestRegistrant.js
index cd60c05..c4e5059 100644
--- a/js/views/front/regRequestRegistrant.js
+++ b/js/views/front/regRequestRegistrant.js
@@ -34,6 +34,8 @@ app.Views.Front.RegRequestRegistrant = Backbone.View.extend({
var fname = this.$('.reg_fname').val().trim();
var lname = this.$('.reg_lname').val().trim();
var email = this.$('.reg_email').val().trim();
+ var org = this.$('.reg_org').val().trim();
+ var title = this.$('.reg_title').val().trim();
var addr1 = this.$('.reg_addr1').val().trim();
var addr2 = this.$('.reg_addr2').val().trim();
var city = this.$('.reg_city').val().trim();
@@ -71,6 +73,8 @@ app.Views.Front.RegRequestRegistrant = Backbone.View.extend({
fname: fname,
lname: lname,
email: email,
+ org: org,
+ title: title,
addr1: addr1,
addr2: addr2,
city: city,
diff --git a/js/views/front/regTime.js b/js/views/front/regTime.js
index 4929651..9f2ab09 100644
--- a/js/views/front/regTime.js
+++ b/js/views/front/regTime.js
@@ -84,6 +84,8 @@ app.Views.Front.RegTime = Backbone.View.extend({
var fname = this.$('.add_reg_fname').val().trim();
var lname = this.$('.add_reg_lname').val().trim();
var email = this.$('.add_reg_email').val().trim();
+ var org = this.$('.add_reg_org').val().trim();
+ var title = this.$('.add_reg_title').val().trim();
var addr1 = this.$('.add_reg_addr1').val().trim();
var addr2 = this.$('.add_reg_addr2').val().trim();
var city = this.$('.add_reg_city').val().trim();
@@ -145,6 +147,8 @@ app.Views.Front.RegTime = Backbone.View.extend({
email: email,
fname: fname,
lname: lname,
+ org: org,
+ title: title,
addr1: addr1,
addr2: addr2,
city: city,
diff --git a/js/views/front/registrantForm.js b/js/views/front/registrantForm.js
index a02cddc..16f21f6 100644
--- a/js/views/front/registrantForm.js
+++ b/js/views/front/registrantForm.js
@@ -75,6 +75,8 @@ app.Views.Front.RegistrantForm = Backbone.View.extend({
this.$('.add_reg_email').val(account.email);
this.$('.add_reg_fname').val(account.fname);
this.$('.add_reg_lname').val(account.lname);
+ this.$('.add_reg_org').val(account.org);
+ this.$('.add_reg_title').val(account.title);
this.$('.add_reg_addr1').val(account.addr1);
this.$('.add_reg_addr2').val(account.addr2);
this.$('.add_reg_city').val(account.city);
@@ -98,6 +100,8 @@ app.Views.Front.RegistrantForm = Backbone.View.extend({
lockForm: function(){
this.$('.add_reg_fname').prop('disabled', true);
this.$('.add_reg_lname').prop('disabled', true);
+ this.$('.add_reg_org').prop('disabled', true);
+ this.$('.add_reg_title').prop('disabled', true);
this.$('.add_reg_addr1').prop('disabled', true);
this.$('.add_reg_addr2').prop('disabled', true);
this.$('.add_reg_city').prop('disabled', true);
@@ -110,6 +114,8 @@ app.Views.Front.RegistrantForm = Backbone.View.extend({
unLockForm: function(){
this.$('.add_reg_fname').prop('disabled', false);
this.$('.add_reg_lname').prop('disabled', false);
+ this.$('.add_reg_org').prop('disabled', false);
+ this.$('.add_reg_title').prop('disabled', false);
this.$('.add_reg_addr1').prop('disabled', false);
this.$('.add_reg_addr2').prop('disabled', false);
this.$('.add_reg_city').prop('disabled', false);
diff --git a/models/admin/ajax/regFront/registrant.php b/models/admin/ajax/regFront/registrant.php
index 57388f2..f1cbe27 100644
--- a/models/admin/ajax/regFront/registrant.php
+++ b/models/admin/ajax/regFront/registrant.php
@@ -372,6 +372,8 @@ class GlmMembersAdmin_registrations_ajax_registrant extends GlmDataRegistrations
array(
'fname' => $modelData['fname'],
'lname' => $modelData['lname'],
+ 'org' => $modelData['org'],
+ 'title' => $modelData['title'],
'email' => $modelData['email'],
'addr1' => $modelData['addr1'],
'addr2' => $modelData['addr2'],
@@ -412,6 +414,8 @@ class GlmMembersAdmin_registrations_ajax_registrant extends GlmDataRegistrations
$accountData = array(
'fname' => $modelData['fname'],
'lname' => $modelData['lname'],
+ 'org' => $modelData['org'],
+ 'title' => $modelData['title'],
'email' => $modelData['email'],
'addr1' => $modelData['addr1'],
'addr2' => $modelData['addr2'],
@@ -423,6 +427,8 @@ class GlmMembersAdmin_registrations_ajax_registrant extends GlmDataRegistrations
$accountDataFormat = array(
'%s', // fname
'%s', // lname
+ '%s', // org
+ '%s', // title
'%s', // email
'%s', // addr1
'%s', // addr2
diff --git a/models/admin/ajax/registrantsListExport.php b/models/admin/ajax/registrantsListExport.php
index c0c7752..dfb3466 100644
--- a/models/admin/ajax/registrantsListExport.php
+++ b/models/admin/ajax/registrantsListExport.php
@@ -111,22 +111,24 @@ class GlmMembersAdmin_ajax_registrantsListExport extends GlmDataRegistrationsReq
// Check selected fields
$select = array(
- 'exportId' => $this->checkFlag('exportId'),
- 'exportRegistrant' => $this->checkFlag('exportRegistrant'),
- 'exportAddr1' => $this->checkFlag('exportAddr1'),
- 'exportAddr2' => $this->checkFlag('exportAddr2'),
- 'exportCity' => $this->checkFlag('exportCity'),
- 'exportState' => $this->checkFlag('exportState'),
- 'exportZip' => $this->checkFlag('exportZip'),
- 'exportEmail' => $this->checkFlag('exportEmail'),
- 'exportPhone' => $this->checkFlag('exportPhone'),
- 'exportCounty' => $this->checkFlag('exportCounty'),
- 'exportLevel' => $this->checkFlag('exportLevel'),
- 'exportTime' => $this->checkFlag('exportTime'),
- 'exportRate' => $this->checkFlag('exportRate'),
- 'exportStatus' => $this->checkFlag('exportStatus'),
- 'exportRegisteredBy' => $this->checkFlag('exportRegisteredBy'),
- 'exportCustom' => $this->checkFlag('exportCustom')
+ 'exportId' => $this->checkFlag('exportId'),
+ 'exportRegistrant' => $this->checkFlag('exportRegistrant'),
+ 'exportOrg' => $this->checkFlag('exportOrg'),
+ 'exportTitle' => $this->checkFlag('exportTitle'),
+ 'exportAddr1' => $this->checkFlag('exportAddr1'),
+ 'exportAddr2' => $this->checkFlag('exportAddr2'),
+ 'exportCity' => $this->checkFlag('exportCity'),
+ 'exportState' => $this->checkFlag('exportState'),
+ 'exportZip' => $this->checkFlag('exportZip'),
+ 'exportEmail' => $this->checkFlag('exportEmail'),
+ 'exportPhone' => $this->checkFlag('exportPhone'),
+ 'exportCounty' => $this->checkFlag('exportCounty'),
+ 'exportLevel' => $this->checkFlag('exportLevel'),
+ 'exportTime' => $this->checkFlag('exportTime'),
+ 'exportRate' => $this->checkFlag('exportRate'),
+ 'exportStatus' => $this->checkFlag('exportStatus'),
+ 'exportRegisteredBy' => $this->checkFlag('exportRegisteredBy'),
+ 'exportCustom' => $this->checkFlag('exportCustom')
);
// Get registration event ID if supplied
@@ -201,12 +203,12 @@ class GlmMembersAdmin_ajax_registrantsListExport extends GlmDataRegistrationsReq
$where = implode(' AND ', $whereParts);
// $list = $this->getList($where, "lname");
- $listResult = $this->getFullRegistrantsData($regEventID, $where,
- false, false, $orderBy);
+ $listResult = $this->getFullRegistrantsData($regEventID, $where);
$list = $listResult['list'];
$customFieldsPluginActive = apply_filters(
'glm-members-customfields-plugin-active', false);
$customFieldHeaders = false;
+
// Go through the $listResult to pull out the custom fields if
// available and if plugin is on
if ($customFieldsPluginActive && $listResult['list']) {
@@ -248,13 +250,21 @@ class GlmMembersAdmin_ajax_registrantsListExport extends GlmDataRegistrationsReq
$orderField = 'request_status';
break;
+ case 'org':
+ $orderField = 'org';
+ break;
+
+ case 'title':
+ $orderField = 'title';
+ break;
+
case 'city':
$orderField = 'account';
$orderField2 = 'city';
break;
case 'state':
- $orderField = 'acount';
+ $orderField = 'account';
$orderField2 = 'state';
break;
diff --git a/models/admin/registrations/accounts.php b/models/admin/registrations/accounts.php
index 591febd..f74fdec 100755
--- a/models/admin/registrations/accounts.php
+++ b/models/admin/registrations/accounts.php
@@ -370,6 +370,17 @@ class GlmMembersAdmin_registrations_accounts extends GlmDataRegistrationsAccount
update_option('glmMembersDatabaseRegistrationsAccountID', $accountID);
}
+ // If there's no input data array generated, make a blank one
+ if ($inputData === null) {
+ $inputData = array(
+ 'textSearch' => '',
+ 'withRequests' => false,
+ 'withAttendees' => false,
+ 'withNoData' => false,
+ 'inactive' => false
+ );
+ }
+
// Compile template data
$templateData = array(
'inputData' => $inputData,
diff --git a/models/admin/registrations/events_addEdit.php b/models/admin/registrations/events_addEdit.php
index cd4adda..2c3f420 100644
--- a/models/admin/registrations/events_addEdit.php
+++ b/models/admin/registrations/events_addEdit.php
@@ -18,6 +18,7 @@ $regEvent = false;
$haveRegEvent = false;
$regEventUpdated = false;
$regEventUpdateError = false;
+$standAloneRegEvent = false;
// If we're adding a new reg event
if ($option == 'add') {
@@ -25,75 +26,184 @@ if ($option == 'add') {
$eventData = false;
$eventID = ($_REQUEST['event']-0);
- // Verify that event is not already listed
- $regEvent = $this->getEntry($eventID, 'event');
- if (!$regEvent) {
+ // If we have an event ID, then verify that event is not already listed
+ if ($eventID > 0) {
+ $regEvent = $this->getEntry($eventID, 'event');
+
+ if ($regEvent) {
+ $messages[] = "Trying to add an event that is already listed in Registrations.";
+ $problem = true;
+ }
+ }
+
+ if (!$problem) {
// Get data on this event from events add-on
if ($eventID > 0) {
$eventData = apply_filters('glm-member-db-events-get-event', $eventID);
- }
- // Did we get event data?
- if ($eventData) {
+ if ($eventData) {
+
+ $eventName = $eventData['name'];
+ $eventSlug = $eventData['name_slug'];
+ $adminEmail = $eventData['admin_email'];
+ $timeSpecific = false;
+
+ // Add event to registrations
+ $sql = "
+ INSERT INTO ".$this->table."
+ (
+ event,
+ event_name,
+ event_code,
+ notify_email,
+ admin_active,
+ active,
+ attendees,
+ attendee_max,
+ attendee_max_per_reg,
+ reg_hold_minutes,
+ cart_hold_days,
+ reg_hours_before,
+ registration_account_options,
+ payment_methods,
+ restricted_payment_methods,
+ terms
+ )
+ VALUES
+ (
+ $eventID,
+ '$eventName',
+ '$nameSlug',
+ '$adminEmail',
+ true,
+ false,
+ true,
+ 0,
+ 0,
+ 60,
+ 10,
+ 24,
+ 14,
+ 94,
+ 26,
+ ''
+ )
+ ;";
+ $this->wpdb->query($sql);
+ $regEventID = $this->wpdb->insert_id;
+
+ // Check if added
+ if ($regEventID) {
+ $regEventUpdated = true;
+ } else {
+ $messages[] = "Sorry, we were unable to create registrations for this event.";
+ $problem = true;
+ }
+
+ } else {
+ $messages[] = "Unable to retrieve information on specified event.";
+ $problem = true;
+ }
+
+ } else {
+
+ $standAloneRegEvent = true;
// Add event to registrations
$sql = "
- INSERT INTO ".$this->table."
- (
- event,
- event_name,
- event_code,
- notify_email,
- admin_active,
- active,
- time_specific,
- attendees,
- attendee_max,
- attendee_max_per_reg,
- reg_hold_minutes,
- cart_hold_days,
- reg_hours_before,
- registration_account_options,
- payment_methods,
- restricted_payment_methods,
- terms
- )
- VALUES
- (
- ".$eventData['id'].",
- '".$eventData['name']."',
- '".$eventData['name_slug']."',
- '".$eventData['admin_email']."',
- true,
- false,
- true,
- true,
- 0,
- 0,
- 60,
- 10,
- 24,
- 14,
- 94,
- 26,
- ''
- )
- ;";
+ INSERT INTO ".$this->table."
+ (
+ event,
+ notify_email,
+ admin_active,
+ active,
+ attendees,
+ attendee_max,
+ attendee_max_per_reg,
+ reg_hold_minutes,
+ cart_hold_days,
+ reg_hours_before,
+ registration_account_options,
+ payment_methods,
+ restricted_payment_methods,
+ terms,
+ image,
+ cost,
+ hide_address,
+ use_member_location,
+ member,
+ location_name,
+ address,
+ city,
+ state,
+ zip,
+ country,
+ lat,
+ lon,
+ region,
+ phone,
+ url,
+ email,
+ contact_addon_id,
+ contact_fname,
+ contact_lname,
+ contact_phone,
+ contact_email
+ )
+ VALUES
+ (
+ 0,
+ '',
+ true,
+ false,
+ true,
+ 0,
+ 0,
+ 60,
+ 10,
+ 24,
+ 14,
+ 94,
+ 26,
+ '',
+ '',
+ '',
+ false,
+ false,
+ 0,
+ '',
+ '',
+ 0,
+ '',
+ '',
+ '',
+ ".$this->config['settings']['maps_default_lat'].",
+ ".$this->config['settings']['maps_default_lon'].",
+ 0,
+ '',
+ '',
+ '',
+ 0,
+ '',
+ '',
+ '',
+ ''
+ )
+ ;";
$this->wpdb->query($sql);
$regEventID = $this->wpdb->insert_id;
- if ($regEventID) {
+ // Check if added
+ if ($regEventID) {
$regEventUpdated = true;
-
+ } else {
+ $messages[] = "Unable to create new stand-alone registration event.";
+ $problem = true;
}
}
-
- } else {
- $messages[] = "Trying to add an event that is already listed in Registrations.";
- $problem = true;
}
}
@@ -108,7 +218,7 @@ if (!$problem) {
}
}
-//echo "".print_r($regEvent,1)."
";
+// echo "".print_r($regEvent,1)."
";
$templateData = array(
'regEvent' => $regEvent,
diff --git a/models/admin/registrations/events_eventDashboard.php b/models/admin/registrations/events_eventDashboard.php
index a981643..f2f99ae 100755
--- a/models/admin/registrations/events_eventDashboard.php
+++ b/models/admin/registrations/events_eventDashboard.php
@@ -13,13 +13,28 @@
* @link http://dev.gaslightmedia.com/
*/
-$regEvent = false;
-$haveRegEvent = false;
-$haveRegEventTimes = false;
-$defaultCalendarDate = false;
-$regEventFirstTime = false;
-$regEventLastTime = false;
-
+$regEvent = false;
+$haveRegEvent = false;
+$haveTimeSpecificEvent = false;
+$haveNonTimeAvailability = false;
+$haveRegEventTimes = false;
+$haveActiveRegEventTimes = false;
+$haveFutureTimes = false;
+$haveActiveFutureTimes = false;
+$haveActiveFutureAvailability = false;
+$haveRegClasses = false;
+$haveRegRates = false;
+$haveRegRatesForAllLevels = true;
+$haveCurrentRegRates = false;
+$haveAvailability = false;
+$defaultCalendarDate = false;
+$calDefaultDateChosen = false;
+$regEventFirstTime = false;
+$regEventLastTime = false;
+$regEventNotSetup = false;
+$regEventStandAlone = false;
+$haveMessages = false;
+$messages = array();
// Check if there's a request to add event times from the event
$getTimesFromEvent = false;
@@ -49,20 +64,142 @@ $regEvent = $this->getEventConfig($regEventID, true, false, true, false, true);
if ($regEvent !== false) {
$haveRegEvent = true;
- $haveRegEventTimes = false;
- $defaultCalendarDate = false;
+
+ // Check if it's a stand-alone event
+ if ($regEvent['event'] == 0) {
+ $regEventStandAlone = true;
+ }
+
+ $haveTimeSpecificEvent = $regEvent['time_specific']['value'];
+
+ // If time_specific or event_code are not set, warn user to go back and fix those.
+ if ($regEvent['time_specific']['value'] == null || $regEvent['event_code'] == '' || $regEvent['event_name'] == '') {
+ $messages[] = 'This '.$this->config['terms']['reg_term_event'].' has incomplete settings, please select "Edit '.$this->config['terms']['reg_term_registration_plur_cap'].' Settings" above!';
+ $regEventNotSetup = true;
+ }
// Check that we have reg event times
- if ($regEvent['first_datetime'] != 'NULL') {
+ if ($regEvent['first_datetime']['timestamp'] > 0) {
+
$haveRegEventTimes = true;
+
$regEventFirstTime = $regEvent['first_datetime'];
$regEventLastTime = $regEvent['last_datetime'];
+
+ foreach ($regEvent['reg_time'] as $time) {
+ if ($time['active']['value'] && $time['start_datetime']['timestamp'] > 0) {
+ $haveActiveRegEventTimes = true;
+
+ // Check for the first calendar date now or in the future
+ if (!$defaultCalendarDate && $time['start_datetime']['timestamp'] >= strtotime('today')) {
+ $defaultCalendarDate = date('m/d/Y h:i A', $time['start_datetime']['timestamp']);
+ $calDefaultDateChosen = 'nextActive';
+ }
+ }
+ }
+
} else {
- // We don't so set to current time so at least the current month is displayed in the calendar
- $defaultCalendarDate = date('m/d/Y h:i A');
$messages[] = 'There are no dates on the calendar for this '.$this->config['terms']['reg_term_event'].'.';
}
+ // If We don't have a default date yet
+ if (!$defaultCalendarDate) {
+ // If there's a FirstTime entry, use that - otherwise use today
+ if ($regEventFirstTime) {
+ $defaultCalendarDate = date('m/d/Y h:i A', $regEventFirstTime['timestamp']);
+ $calDefaultDateChosen = 'firstListed';
+ } else {
+ $defaultCalendarDate = date('m/d/Y h:i A');
+ $calDefaultDateChosen = 'today';
+ }
+ }
+
+ /*
+ * This section does a variety of checks to try to determine why a registration event may not be available
+ * to users for registration on the front-end.
+ */
+
+ // Check if we have any reg classes
+ if ($regEvent['reg_class'] && count($regEvent['reg_class']) > 0) {
+ $haveRegClasses = true;
+
+ // Scan all times for availbility in active time entries
+ foreach ($regEvent['reg_time'] as $time) {
+
+ // If this entry has availability
+ if ($time['attendees_available'] > 0) {
+
+ // If this is a time_spcific event and this is a real time entry
+ if ($regEvent['time_specific']['value'] && $time['start_datetime']['timestamp'] > 0) {
+ $haveAvailability = true;
+ }
+
+ // If this is NOT a time_specific event and this is a pseudo time entry for this type of event
+ if (!$regEvent['time_specific']['value'] && $time['start_datetime']['timestamp'] == 0) {
+ $haveAvailability = true;
+ }
+ }
+ }
+
+ // Check if we have any rates
+ foreach ($regEvent['reg_class'] as $class) {
+ if ($class['reg_rate'] && count($class['reg_rate']) > 0) {
+ $haveRegRates = true;
+
+ // For each rate with each time
+ foreach ($class['reg_rate'] as $rate) {
+ foreach ($regEvent['reg_time'] as $time) {
+
+ // If the time is not a pseudo time entry for nont-time specific event
+ if ($time['start_datetime']['timestamp'] > 0) {
+
+ // Calculate differernce between today and start date for this time
+ $timeDate = new DateTime(date('m/d/Y', $time['start_datetime']['timestamp']));
+ $today = new DateTime(date('m/d/Y', time()));
+ $diff = $today->diff($timeDate);
+ $diffDays = ($diff->format('%a days') - 0);
+ if ($diff->invert) {
+ $diffDays *= -1;
+ }
+
+ // Check if this is a current or future date
+ if ($diffDays >= 0) {
+ $haveFutureTimes = true;
+
+ // Check if this future time is active
+ if ($time['active']['value']) {
+ $haveActiveFutureTimes = true;
+
+ // If this is a time specific time entry and there's availability
+ if ($haveTimeSpecificEvent && $time['attendees_available'] > 0) {
+ $haveActiveFutureAvailability = true;
+ }
+
+ }
+
+ }
+
+ // Check if the number of days match the rate date range for this rate
+ if ($diffDays <= $rate['start_days'] && $diffDays >= $rate['end_days']) {
+ $haveCurrentRegRates = true;
+ }
+
+ // Otherwise this is a pseudo entry for a non-time-specific event (or should be)
+ } else {
+
+ // If this is a non-time-specific event, is there availability
+ if (!$haveTimeSpecificEvent && $time['attendees_available'] > 0) {
+ $haveNonTimeAvailability = true;
+ }
+
+ }
+ }
+ }
+ } else {
+ $haveRegRatesForAllLevels = false;
+ }
+ }
+ }
// if there's a user notice, add it to messages
if (isset($regEvent['message']) && $regEvent['message']) {
@@ -70,18 +207,84 @@ if ($regEvent !== false) {
}
}
-// echo "".print_r($regEvent,1)."
";
+/*
+ * This section tries to intelegently compile reasons a registration event may not be available for users
+ * to register on the front-end. It also tries not to display redundant messages that should be obvious.
+ * For example, if there's no date/time entries, there's no reason to say that there's no availability.
+ */
+$reasons = array();
+if (trim($regEvent['event_code']) == '') {
+ $reasons[] = ' * You do not have an '.$this->config['terms']['reg_term_event'].' '.$this->config['terms']['reg_term_registration'].' code set. (Edit '.$this->config['terms']['reg_term_registration_plur_cap'].' Settings)';
+}
+if (!$haveRegEventTimes) {
+ $reasons[] = ' * You have not added any dates/times to this '.$this->config['terms']['reg_term_event'].'. (Dates and Availability Calendar below)';
+ if (!$haveAvailability) {
+ $reasons[] = ' * There is no availability for any listed '.$this->config['terms']['reg_term_registration_plur'].' dates. (Dates and Availability Calendar below)';
+ }
+}
+if ($haveRegEventTimes && !$haveActiveRegEventTimes) {
+ $reasons[] = ' * You have no dates/times for this '.$this->config['terms']['reg_term_event'].' that are set to "Active". (Dates and Availability Calendar below)';
+}
+if (!$regEvent['reg_class'] || count($regEvent['reg_class']) == 0) {
+ $reasons[] = ' * You do not have any '.$this->config['terms']['reg_term_registration'].' '.$this->config['terms']['reg_term_level_plur'].'. ('.$this->config['terms']['reg_term_registration_cap'].' '.$this->config['terms']['reg_term_level_plur_cap'].' & Charges)';
+ if ($haveRegRatesForAllLevels) {
+ $reasons[] = ' * You do not have '.$this->config['terms']['reg_term_rate_plur'].' for all '.$this->config['terms']['reg_term_level_plur'].'. ('.$this->config['terms']['reg_term_registration_cap'].' '.$this->config['terms']['reg_term_level_plur_cap'].' & Charges)';
+ }
+}
+if (!$haveFutureTimes) {
+ $reasons[] = ' * You do not have any future dates/times for this '.$this->config['terms']['reg_term_event'].'. (Dates and Availability Calendar below)';
+} else {
+ if (!$haveActiveFutureTimes) {
+ $reasons[] = ' * You do not have any active future dates/times for this '.$this->config['terms']['reg_term_event'].'. (Dates and Availability Calendar below)';
+ } else {
+ if ($haveTimeSpecificEvent && !$haveActiveFutureAvailability) {
+ $reasons[] = ' * You do not have any active future dates/times with availability for this '.$this->config['terms']['reg_term_event'].'. (Dates and Availability Calendar below)';
+ }
+ if (!$haveCurrentRegRates) {
+ $reasons[] = ' * You do not have any '.$this->config['terms']['reg_term_rate_plur'].' applicable to today. ('.$this->config['terms']['reg_term_registration_cap'].' '.$this->config['terms']['reg_term_level_plur_cap'].' & Charges)';
+ }
+ }
+}
+if (!$regEvent['active']['value']) {
+ $reasons[] = ' * "'.$this->config['terms']['reg_term_registration_plur_cap'].' Active" not checked. (Edit '.$this->config['terms']['reg_term_registration_plur_cap'].' Settings)';
+}
+if ($regEvent['not_included_in_lists']['value']) {
+ $reasons[] = ' * "Not Displayed in Lists" is checked. (Edit '.$this->config['terms']['reg_term_registration_plur_cap'].' Settings)';
+}
+if (!$haveTimeSpecificEvent && !$haveNonTimeAvailability) {
+ $reasons[] = ' * You have no availability for this '.$this->config['terms']['reg_term_event'].'. (Dates and Availability below)';
+}
-$templateData = array(
- 'regEvent' => $regEvent,
- 'haveRegEvent' => $haveRegEvent,
- 'haveRegEventTimes' => $haveRegEventTimes,
- 'defaultCalendarDate' => $defaultCalendarDate,
- 'regEventFirstTime' => $regEventFirstTime,
- 'regEventFirstTime' => $regEventFirstTime,
- 'regEventLastTime' => $regEventLastTime,
+if (count($reasons)) {
+ $messages = array_merge(array('--- Reasons this '.$this->config['terms']['reg_term_event'].' may not show in front-end list. - Click "'.$this->config['terms']['reg_term_event_cap'].' Dashboard" above to re-test. ---'), $reasons);
+}
+// echo "".print_r($regEvent,1)."
";
+
+$templateData = array(
+ 'regEvent' => $regEvent,
+ 'haveRegEvent' => $haveRegEvent,
+ 'haveTimeSpecificEvent' => $haveTimeSpecificEvent,
+ 'haveNonTimeAvailability' => $haveNonTimeAvailability,
+ 'haveRegEventTimes' => $haveRegEventTimes,
+ 'haveActiveRegEventTimes' => $haveActiveRegEventTimes,
+ 'haveFutureTimes' => $haveFutureTimes,
+ 'haveActiveFutureTimes' => $haveActiveFutureTimes,
+ 'haveActiveFutureAvailability' => $haveActiveFutureAvailability,
+ 'haveRegClasses' => $haveRegClasses,
+ 'haveRegRates' => $haveRegRates,
+ 'haveCurrentRegRates' => $haveCurrentRegRates,
+ 'haveAvailability' => $haveAvailability,
+ 'defaultCalendarDate' => $defaultCalendarDate,
+ 'calDefaultDateChosen' => $calDefaultDateChosen,
+ 'regEventFirstTime' => $regEventFirstTime,
+ 'regEventFirstTime' => $regEventFirstTime,
+ 'regEventLastTime' => $regEventLastTime,
+ 'regEventNotSetup' => $regEventNotSetup,
+ 'regEventStandAlone' => $regEventStandAlone,
+ 'haveMessages' => (count($messages) > 0),
+ 'messages' => $messages
);
diff --git a/models/admin/registrations/events_globalCodes.php b/models/admin/registrations/events_globalCodes.php
index 9f6d4ec..6a47485 100644
--- a/models/admin/registrations/events_globalCodes.php
+++ b/models/admin/registrations/events_globalCodes.php
@@ -70,6 +70,7 @@ if ($payCodes) {
}
$templateData = array(
+ 'regEventId' => '',
'havePayCodes' => $havePayCodes,
'payCodes' => $payCodes,
'newPayCode' => $newPayCode,
diff --git a/models/admin/registrations/events_notificationsUpdate.php b/models/admin/registrations/events_notificationsUpdate.php
index e3f8833..9426d0a 100644
--- a/models/admin/registrations/events_notificationsUpdate.php
+++ b/models/admin/registrations/events_notificationsUpdate.php
@@ -15,7 +15,6 @@
$regNotifyUpdated = false;
-
// New and updated notifications
if ( isset( $_REQUEST['name'] ) && is_array( $_REQUEST['name'] ) ) {
@@ -26,15 +25,17 @@ if ( isset( $_REQUEST['name'] ) && is_array( $_REQUEST['name'] ) ) {
// Make sure key is positive integer
$id = ( $key - 0 );
// Check the before or after for setting the sign for notification_days
- $notification_days = filter_var( $_REQUEST['notification_days'][$id], FILTER_VALIDATE_INT );
- $notification_when = filter_var( $_REQUEST['when'][$id], FILTER_SANITIZE_STRING );
- if ( $notification_when === 'before' ) {
- $notification_days = '-' . $notification_days;
+ $nDays = filter_var( $_REQUEST['notification_days'][$id], FILTER_VALIDATE_INT );
+ $nWhen = filter_var( $_REQUEST['when'][$id], FILTER_SANITIZE_STRING );
+ if ( $nWhen === 'before' ) {
+ $nDays = '-' . $nDays;
}
+ $nName = filter_var( $_REQUEST['name'][$id], FILTER_SANITIZE_STRING );
+ $nMessage = filter_var( $_REQUEST['message'][$id], FILTER_SANITIZE_STRING );
$reg_notification_data = array(
- 'name' => $_REQUEST['name'][$id],
- 'notification_days' => $notification_days,
- 'message' => $_REQUEST['message'][$id]
+ 'name' => $nName,
+ 'notification_days' => $nDays,
+ 'message' => $nMessage
);
// echo '$reg_notification_data: ' . print_r( $reg_notification_data, true ) . '
';
if ( $id > 0 ) {
diff --git a/models/admin/registrations/events_paymentCodes.php b/models/admin/registrations/events_paymentCodes.php
index 42c8005..d254774 100644
--- a/models/admin/registrations/events_paymentCodes.php
+++ b/models/admin/registrations/events_paymentCodes.php
@@ -13,35 +13,44 @@
* @link http://dev.gaslightmedia.com/
*/
-$regEvent = false;
-$havePayCodes = false;
-$payCodes = false;
-$newPayCode = false;
-$refPaycodeType = false;
-
+$regEventId = false;
+$regEvent = false;
+$havePayCodes = false;
+$payCodes = false;
+$newPayCode = false;
+$refPaycodeType = false;
// Get event ID
-$eventId = filter_input(INPUT_GET, 'regEventID', FILTER_SANITIZE_NUMBER_INT);
+$regEventId = filter_input(INPUT_GET, 'regEventID', FILTER_SANITIZE_NUMBER_INT);
require_once GLM_MEMBERS_REGISTRATIONS_PLUGIN_CLASS_PATH.'/data/dataPaymentCode.php';
$PayCode = new GlmDataRegistrationsPaymentCode($this->wpdb, $this->config);
-if (isset($_REQUEST['option2']) && $_REQUEST['option2'] != '') {
- switch($_REQUEST['option2']) {
+// Create data for a new pay code entry form
+$newPayCode = $PayCode->newEntry();
+
+// Specify the pay code type number that should be used.
+$refPaycodeType = $this->config['pay_code_ref_type_numb']['Event'];
+
+// We need a reg event code to do anything here.
+if ($regEventId) {
- case 'new':
- $res = $PayCode->insertEntry();
- if (!$res['status']) {
- foreach ($res['fieldFail'] as $ff) {
- if (trim($ff) != '') {
- $messages[] = $ff;
+ if (isset($_REQUEST['option2']) && $_REQUEST['option2'] != '') {
+
+ switch($_REQUEST['option2']) {
+
+ case 'new':
+ $res = $PayCode->insertEntry();
+ if (!$res['status']) {
+ foreach ($res['fieldFail'] as $ff) {
+ if (trim($ff) != '') {
+ $messages[] = $ff;
+ }
}
}
- }
- break;
+ break;
- case 'update':
- if ($eventId) {
+ case 'update':
$payCodeId = ($_REQUEST['payCodeId'] - 0);
$res = $PayCode->updateEntry($payCodeId);
if (!$res['status']) {
@@ -51,44 +60,35 @@ if (isset($_REQUEST['option2']) && $_REQUEST['option2'] != '') {
}
}
}
- }
- break;
+ break;
- case 'delete':
- if ($eventId) {
+ case 'delete':
$payCodeId = ($_REQUEST['payCodeId'] - 0);
if ( $payCodeId > 0 ) {
$PayCode->deleteEntry( $payCodeId, true );
}
- }
- break;
- }
-}
+ break;
+ }
-$newPayCode = $PayCode->newEntry();
-
-// Specify the pay code type number that should be used.
-$refPaycodeType = $this->config['pay_code_ref_type_numb']['Event'];
+ }
-// If we have an event ID then get any pacodes for that event
-$payCodes = false;
-if ($eventId) {
- $payCodes = $PayCode->getList("T.ref_type = $refPaycodeType AND T.ref_dest = $eventId");
-}
+ // Get any pacodes for this event
+ $payCodes = $PayCode->getList("T.ref_type = $refPaycodeType AND T.ref_dest = $regEventId");
+ if ($payCodes) {
+ $havePayCodes = true;
+ }
-if ($payCodes) {
- $havePayCodes = true;
}
-$regEvent = $this->getEntry($regEventID);
+$regEvent = $this->getEntry($regEventId);
$templateData = array(
- 'regEvent' => $regEvent,
- 'havePayCodes' => $havePayCodes,
- 'payCodes' => $payCodes,
- 'newPayCode' => $newPayCode,
- 'eventPaycodeType' => $refPaycodeType
+ 'regEventId' => $regEventId,
+ 'regEvent' => $regEvent,
+ 'havePayCodes' => $havePayCodes,
+ 'payCodes' => $payCodes,
+ 'newPayCode' => $newPayCode,
+ 'eventPaycodeType' => $refPaycodeType
);
-
$view = 'eventPaymentCodes';
diff --git a/models/admin/registrations/events_registrants.php b/models/admin/registrations/events_registrants.php
index 1a1d4d1..f2edc97 100644
--- a/models/admin/registrations/events_registrants.php
+++ b/models/admin/registrations/events_registrants.php
@@ -202,22 +202,20 @@ if ($listResult['returned'] == $limit) {
}
$registrants = $listResult['list'];
-// Calc Cart ID check
-foreach ($registrants as $key=>$val) {
- $registrants[$key]['cartCheck'] = md5($val['reg_request'].$this->config['cart_id_check_secret']);
-}
-
-$success = true;
-$haveRegistrants = false;
if ($registrants !== false) {
-
- $success = true;
-
// If we have any entries
if (count($registrants) > 0) {
$haveRegistrants = true;
}
}
+
+// Calc Cart ID check
+if ($haveRegistrants) {
+ foreach ($registrants as $key=>$val) {
+ $registrants[$key]['cartCheck'] = md5($val['reg_request'].$this->config['cart_id_check_secret']);
+ }
+}
+
// echo "".print_r($registrants,1)."
";
$templateData = array(
diff --git a/models/admin/registrations/events_update.php b/models/admin/registrations/events_update.php
index 9e915ea..1e9ebc8 100644
--- a/models/admin/registrations/events_update.php
+++ b/models/admin/registrations/events_update.php
@@ -17,25 +17,51 @@ $regEvent = false;
$regEventUpdated = false;
$regEventUpdateError = false;
-
-// Get the current reg event type to check for change
-$timeSpecific = $this->wpdb->get_var("
- SELECT time_specific
+// Get the event ID - 0 if stand-alone
+$eventID = $this->wpdb->get_var("
+ SELECT event
FROM ".GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX . "reg_event
WHERE id = $regEventID
");
+// If this is not a stand-alone reg event then remove certain fields.
+if ($eventID) {
+ unset(
+ $this->fields['image'],
+ $this->fields['cost'],
+ $this->fields['hide_address'],
+ $this->fields['use_member_location'],
+ $this->fields['location_name'],
+ $this->fields['address'],
+ $this->fields['city'],
+ $this->fields['state'],
+ $this->fields['zip'],
+ $this->fields['country'],
+ $this->fields['lat'],
+ $this->fields['lat'],
+ $this->fields['lon'],
+ $this->fields['phone'],
+ $this->fields['url'],
+ $this->fields['email'],
+ $this->fields['contact_fname'],
+ $this->fields['contact_lname'],
+ $this->fields['contact_phone'],
+ $this->fields['contact_email']
+ );
+}
+
// Try to update the reg event
$regEvent = $this->updateEntry($regEventID);
-// If there's some type of failure, flag that for the view file
+// If update was successful
if ($regEvent['status']) {
+
$regEventUpdated = true;
- // Now check to see if the type has been changed from Time specific to Non-Time specific
- if ($timeSpecific && !$regEvent['fieldData']['time_specific']['value']) {
+ // If this is a non-time specific registrations event
+ if (!$regEvent['fieldData']['time_specific']['value']) {
- // Changing to non-time=specific, so check if we need to create a time entry for that
+ // Check if there's a time entry for this non-time specific event - should be only one.
$timeEntry = $this->wpdb->get_row("
SELECT id
FROM ".GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX . "reg_time
@@ -95,16 +121,16 @@ if ($regEvent['status']) {
}
}
-
} else {
$regEventUpdateError = true;
}
+// echo "".print_r($regEvent,1)."
";
+
$templateData = array(
'regEvent' => $regEvent,
'regEventUpdated' => $regEventUpdated,
'regEventUpdateError' => $regEventUpdateError
);
-
$view = 'eventEdit';
diff --git a/models/front/registrations/checkout.php b/models/front/registrations/checkout.php
index d2a7f6e..dd13273 100755
--- a/models/front/registrations/checkout.php
+++ b/models/front/registrations/checkout.php
@@ -404,8 +404,19 @@ class GlmMembersFront_registrations_checkout extends GlmRegCartSupport
}
}
+ // Convert config for billing fields to useable format for view file
+ $selected = array();
+ foreach ($management['reg_bill_info_requested']['bitmap'] as $key=>$bit) {
+ if ($bit['default']) {
+ $selected[] = $key;
+ }
+ }
+ require_once GLM_MEMBERS_PLUGIN_CLASS_PATH.'/glmPluginSupport.php';
+ $billingFields = glmMembersConfigArraySetup( $this->config['billing_field'], $this->config['billing_field_numb'], $selected, true);
+
// Compile template data
$templateData = array(
+ 'billingFields' => $billingFields,
'page' => 'checkout',
'regAccountId' => $this->cart['request']['account'],
'regAccount' => $regAccount,
diff --git a/models/front/registrations/checkoutProcess.php b/models/front/registrations/checkoutProcess.php
index 2734b61..1eac595 100755
--- a/models/front/registrations/checkoutProcess.php
+++ b/models/front/registrations/checkoutProcess.php
@@ -245,6 +245,7 @@ class GlmMembersFront_registrations_checkoutProcess extends GlmRegCartSupport
// Since there's no account yet, we'll use the billing data for the base account data
$_REQUEST['fname'] = $_REQUEST['bill_fname'];
$_REQUEST['lname'] = $_REQUEST['bill_lname'];
+ $_REQUEST['org'] = $_REQUEST['bill_org'];
$_REQUEST['addr1'] = $_REQUEST['bill_addr1'];
$_REQUEST['addr2'] = $_REQUEST['bill_addr2'];
$_REQUEST['city'] = $_REQUEST['bill_city'];
@@ -266,6 +267,7 @@ class GlmMembersFront_registrations_checkoutProcess extends GlmRegCartSupport
array(
'fname' => $regAccount['fieldData']['bill_fname'],
'lname' => $regAccount['fieldData']['bill_lname'],
+ 'org' => $regAccount['fieldData']['bill_org'],
'addr1' => $regAccount['fieldData']['bill_addr1'],
'addr2' => $regAccount['fieldData']['bill_addr2'],
'city' => $regAccount['fieldData']['bill_city'],
@@ -276,6 +278,7 @@ class GlmMembersFront_registrations_checkoutProcess extends GlmRegCartSupport
),
array( 'id' => $accountId ),
array(
+ '%s',
'%s',
'%s',
'%s',
@@ -388,6 +391,7 @@ class GlmMembersFront_registrations_checkoutProcess extends GlmRegCartSupport
'id' => false,
'fname' => $regAccount['fieldData']['bill_fname'],
'lname' => $regAccount['fieldData']['bill_lname'],
+ 'org' => $regAccount['fieldData']['bill_org'],
'addr1' => $regAccount['fieldData']['bill_addr1'],
'addr2' => $regAccount['fieldData']['bill_addr2'],
'city' => $regAccount['fieldData']['bill_city'],
diff --git a/models/front/registrations/list.php b/models/front/registrations/list.php
index 3730b56..b3983de 100755
--- a/models/front/registrations/list.php
+++ b/models/front/registrations/list.php
@@ -73,9 +73,34 @@
$nextStart = '';
$alphaSelected = false;
$haveRegEvents = false;
+ $eventCode = false;
$regEventsCount = false;
$messages = false;
+ // Check for specified event
+ if (isset($_REQUEST['event'])) {
+ $eventCode = filter_input(INPUT_GET, 'event', FILTER_SANITIZE_STRING);
+ } elseif (isset($actionData['request']['event']) && $actionData['request']['event'] != '') {
+ $eventCode = trim($actionData['request']['event']);
+ }
+
+ // If the event is specified
+ if ($eventCode && trim($eventCode) != '') {
+
+ // Redirect to "register" model
+ return array(
+ 'status' => false,
+ 'menuItemRedirect' => 'registrations',
+ 'modelRedirect' => 'registration',
+ 'view' => false,
+ 'data' => array(
+ 'eventCode' => $eventCode
+ )
+ );
+
+ }
+
+
if (isset($actionData['messages'])) {
$messages = $actionData['messages'];
}
@@ -94,8 +119,6 @@
}
-
-
// Get misc texts
require_once GLM_MEMBERS_REGISTRATIONS_PLUGIN_CLASS_PATH.'/data/dataMisc.php';
$Misc = new GlmDataRegistrationsMisc($this->wpdb, $this->config);
@@ -125,8 +148,8 @@
default:
- // Build Where clause to select only active future reg events
- $where .= "T.active AND T.last_datetime > now()";
+ // Build Where clause to select only active future reg events that are not bloked from lists
+ $where .= "T.active AND T.last_datetime > now() && !T.not_included_in_lists";
// Get a current list of reg events
$listResult = $this->getSimpleRegEventsList($where.$alphaWhere, 'event_name', true, 'id', $start, $limit, true);
@@ -166,8 +189,7 @@
break;
}
- // including test data for now
- include GLM_MEMBERS_REGISTRATIONS_PLUGIN_PATH . '/data/events.php';
+ // echo "".print_r($list,1)."
";
// Compile template data
$templateData = array(
@@ -191,8 +213,6 @@
'reg_bulletin' => $misc['reg_bulletin']
);
- // echo "".print_r($templateData,1)."
";
-
// Return status, any suggested view, and any data to controller
return array(
'status' => true,
diff --git a/models/front/registrations/register.php b/models/front/registrations/register.php
index 4be44a3..72d3fa5 100755
--- a/models/front/registrations/register.php
+++ b/models/front/registrations/register.php
@@ -47,6 +47,8 @@
$reg = array(
'fname' => '',
'lname' => '',
+ 'org' => '',
+ 'title' => '',
'addr1' => '',
'addr2' => '',
'city' => '',
@@ -63,6 +65,8 @@
$password = (isset($_REQUEST['password'])) ? filter_var( $_REQUEST['password'], FILTER_SANITIZE_STRING ): '';
$fname = (isset($_REQUEST['fname'])) ? filter_var( $_REQUEST['fname'], FILTER_SANITIZE_STRING ): '';
$lname = (isset($_REQUEST['lname'])) ? filter_var( $_REQUEST['lname'], FILTER_SANITIZE_STRING ): '';
+ $org = (isset($_REQUEST['org'])) ? filter_var( $_REQUEST['org'], FILTER_SANITIZE_STRING ): '';
+ $title = (isset($_REQUEST['title'])) ? filter_var( $_REQUEST['title'], FILTER_SANITIZE_STRING ): '';
$addr1 = (isset($_REQUEST['addr1'])) ? filter_var( $_REQUEST['addr1'], FILTER_SANITIZE_STRING ): '';
$addr2 = (isset($_REQUEST['addr2'])) ? filter_var( $_REQUEST['addr2'], FILTER_SANITIZE_STRING ): '';
$city = (isset($_REQUEST['city'])) ? filter_var( $_REQUEST['city'], FILTER_SANITIZE_STRING ): '';
@@ -78,6 +82,8 @@
'password' => password_hash($password, PASSWORD_DEFAULT),
'fname' => $fname,
'lname' => $lname,
+ 'org' => $org,
+ 'title' => $title,
'addr1' => $addr1,
'addr2' => $addr2,
'city' => $city,
diff --git a/models/front/registrations/registration.php b/models/front/registrations/registration.php
index 171ac9c..b0fa57e 100755
--- a/models/front/registrations/registration.php
+++ b/models/front/registrations/registration.php
@@ -47,6 +47,8 @@
$haveCart = false;
$regEventFirstTime = false;
$registrantsList = false;
+ $regEventID = false;
+ $haveRegEvent = false;
// Get misc texts
require_once GLM_MEMBERS_REGISTRATIONS_PLUGIN_CLASS_PATH.'/data/dataMisc.php';
@@ -91,15 +93,36 @@
}
}
- // Get eventRegId if supplied
- if (isset($_REQUEST['eventRegId'])) {
+ // If an event code has been supplied by redirect from list page
+ if (isset($actionData['eventCode'])) {
+
+ // check if the code is a numeric ID
+ $ad = $actionData['eventCode'] - 0;
+ if ($ad > 0 && $ad == $actionData['eventCode']) {
+ $regEventID = $ad;
+
+ // Otherwise it should be an event code
+ } else {
+ if ($action)
+ // Try to get reg event ID
+ $regEventID = $this->wpdb->get_var("
+ SELECT id
+ FROM ".GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX . "reg_event
+ WHERE event_code = '".$actionData['eventCode']."'
+ ");
+ }
+ }
+
+ // Get regEventID if supplied
+ if (!$regEventID && isset($_REQUEST['eventRegId'])) {
// Make sure it's numeric
- $eventRegID = ($_REQUEST['eventRegId'] - 0);
+ $regEventID = ($_REQUEST['eventRegId'] - 0);
- if ($eventRegID <= 0) {
- $eventRegID = false;
- }
+ }
+
+ if ($regEventID <= 0) {
+ $regEventID = false;
}
// Set the $view to registration
@@ -178,204 +201,219 @@
switch ( $option ) {
default:
- // Get the RegEvent entry
- $this->postProcAddedEventData = true;
- $regEvent = $this->getEventForRegistration($eventRegID);
-
- $regEventId = $regEvent['id'];
-
- // Create an $event array with the event data.
- $event = array(
- 'id' => $regEvent['id'],
- 'event' => $regEvent['event'],
- 'event_name' => $regEvent['event_name'],
- 'event_code' => $regEvent['event_code'],
- 'descr' => $regEvent['descr'],
- 'time_specific' => $regEvent['time_specific']['value'],
- 'reg_time' => null, //$regEvent['reg_time'],
- 'attendee_max' => $regEvent['attendee_max'],
- 'attendee_max_per_reg' => $regEvent['attendee_max_per_reg'],
- 'reg_hold_minutes' => $regEvent['reg_hold_minutes'],
- 'terms' => $regEvent['terms'],
- );
+ if ($regEventID) {
+
+ // Get the RegEvent entry
+ $this->postProcAddedEventData = true;
+ $regEvent = $this->getEventForRegistration($regEventID);
+
+ if ($regEvent) {
+ $regEventId = $regEvent['id'];
+
+ // Create an $event array with the event data.
+ $event = array(
+ 'id' => $regEvent['id'],
+ 'event' => $regEvent['event'],
+ 'event_name' => $regEvent['event_name'],
+ 'event_code' => $regEvent['event_code'],
+ 'descr' => $regEvent['descr'],
+ 'time_specific' => $regEvent['time_specific']['value'],
+ 'reg_time' => null, //$regEvent['reg_time'],
+ 'attendee_max' => $regEvent['attendee_max'],
+ 'attendee_max_per_reg' => $regEvent['attendee_max_per_reg'],
+ 'reg_hold_minutes' => $regEvent['reg_hold_minutes'],
+ 'terms' => $regEvent['terms'],
+ );
+
+ $haveRegEvent = true;
+ }
+ }
break;
}
- $eventData = array();
+ if ($haveRegEvent) {
- // Build the Class array of JSON objects for the classes.
- $jsonClasses = array();
- $regClasses = array();
+ $eventData = array();
- // $regTimes = array();
+ // Build the Class array of JSON objects for the classes.
+ $jsonClasses = array();
+ $regClasses = array();
- if ( isset( $regEvent['reg_class'] ) && is_array( $regEvent['reg_class'] ) ) {
+ // $regTimes = array();
- // Loop through the $regEvent['reg_class'] array to build $rClass array
- // If the event is Time Specific then the reg_class need to have
- // times array. If it doesn't then there's no current registration
- // allowed for that event.
- foreach ( $regEvent['reg_class'] as $key => $rClass ) {
+ if ( isset( $regEvent['reg_class'] ) && is_array( $regEvent['reg_class'] ) ) {
- $classStartingTime = '';
- // echo '$rClass '."($key): " . print_r( $rClass, true ) . '
';
+ // Loop through the $regEvent['reg_class'] array to build $rClass array
+ // If the event is Time Specific then the reg_class need to have
+ // times array. If it doesn't then there's no current registration
+ // allowed for that event.
+ foreach ( $regEvent['reg_class'] as $key => $rClass ) {
- // Pull the rate data
- if ( isset( $rClass['times'] ) && is_array( $rClass['times'] ) && count( $rClass['times'] ) > 0 ) {
+ $classStartingTime = '';
+ // echo '$rClass '."($key): " . print_r( $rClass, true ) . '
';
- // echo '$rClass[times]: ' . print_r( $rClass['times'], true ) . '
';
- foreach ( $rClass['times'] as $time ) {
- if ( $classStartingTime == '' || $time['start_datetime']['timestamp'] < $classStartingTime['start_datetime']['timestamp'] ) {
- $classStartingTime = $time;
- }
+ // Pull the rate data
+ if ( isset( $rClass['times'] ) && is_array( $rClass['times'] ) && count( $rClass['times'] ) > 0 ) {
- $rClass['loggedIn'] = ( isset($_SESSION['LoginAccount']) ) ? true : false;
- $rClass['reg_event'] = $regEventId;
- $rClass['reg_rate_id'] = $time['id'];
- $rClass['reg_rate_name'] = $time['name'];
- $rClass['reg_rate_base_price'] = $time['base_rate'];
- $rClass['reg_rate_per_reg'] = $time['per_registrant'];
- $rClass['registrant_credits'] = $time['registrant_credits'];
+ // echo '$rClass[times]: ' . print_r( $rClass['times'], true ) . '
';
+ foreach ( $rClass['times'] as $time ) {
+ if ( $classStartingTime == '' || $time['start_datetime']['timestamp'] < $classStartingTime['start_datetime']['timestamp'] ) {
+ $classStartingTime = $time;
+ }
- if ( $regEvent['time_specific'] ) {
- $rClass['selectedTime'] = $time['id'];
+ $rClass['loggedIn'] = ( isset($_SESSION['LoginAccount']) ) ? true : false;
+ $rClass['reg_event'] = $regEventId;
+ $rClass['reg_rate_id'] = $time['id'];
+ $rClass['reg_rate_name'] = $time['name'];
+ $rClass['reg_rate_base_price'] = $time['base_rate'];
+ $rClass['reg_rate_per_reg'] = $time['per_registrant'];
+ $rClass['registrant_credits'] = $time['registrant_credits'];
+
+ if ( $regEvent['time_specific'] ) {
+ $rClass['selectedTime'] = $time['id'];
+ }
+ // if ( empty( $regtimes[$time['id']] ) ) {
+ // $regTimes[$time['id']] = json_encode( $time, JSON_NUMERIC_CHECK );
+ // }
}
- // if ( empty( $regtimes[$time['id']] ) ) {
- // $regTimes[$time['id']] = json_encode( $time, JSON_NUMERIC_CHECK );
- // }
+ $rClass['startingTime'] = $classStartingTime['start_datetime']['datetime'];
+ $rClass['id'] = $key;
+ $jsonClasses[] = json_encode( $rClass, JSON_NUMERIC_CHECK );
+ } else if ( !isset( $rClass['times'] ) || empty( $rClass['times'] ) ) {
+ unset( $regEvent['reg_class'][$key] );
}
- $rClass['startingTime'] = $classStartingTime['start_datetime']['datetime'];
- $rClass['id'] = $key;
- $jsonClasses[] = json_encode( $rClass, JSON_NUMERIC_CHECK );
- } else if ( !isset( $rClass['times'] ) || empty( $rClass['times'] ) ) {
- unset( $regEvent['reg_class'][$key] );
}
}
- }
- // echo '$jsonClasses: ' . print_r( $jsonClasses, true ) . '
';
+ // echo '$jsonClasses: ' . print_r( $jsonClasses, true ) . '
';
- // echo '$regEvent: ' . print_r( $regEvent, true ) . '
';
-
- // Build the regClass JSON for the template.
- $regClassJSON = '[' . implode( ',', $jsonClasses ) . ']';
- $regCartJSON = json_encode( $cart );
- // $regTimesJSON = '[' . implode( ',', $regTimes ) . ']';
-
- // Get terms into JSON
- $termsJSON = json_encode( $this->config['terms'] );
-
- // check to see if there's a user logged in
- if ( isset( $_SESSION['LoginAccount'] ) && filter_var( $_SESSION['LoginAccount']['id'], FILTER_VALIDATE_INT ) ) {
- // Setup JSON for the loginAccount.
- $loginAccount = json_encode( $_SESSION['LoginAccount'], JSON_NUMERIC_CHECK );
- }
+ // echo '$regEvent: ' . print_r( $regEvent, true ) . '
';
- // If there's a cart then pull any registrants for it
- // If there classes in the cart with rates and registrants they'll need
- // be setup.
+ // Build the regClass JSON for the template.
+ $regClassJSON = '[' . implode( ',', $jsonClasses ) . ']';
+ $regCartJSON = json_encode( $cart );
+ // $regTimesJSON = '[' . implode( ',', $regTimes ) . ']';
- $registrants = array();
+ // Get terms into JSON
+ $termsJSON = json_encode( $this->config['terms'] );
- // echo '$cart: ' . print_r( $cart, true ) . '
';
- // Looping through to grab out registrants from the cart.
- if ( isset( $cart['events'] ) && is_array( $cart['events'] ) ) {
-
- // Loop through events array.
- foreach ( $cart['events'] as $rEvent ) {
- if ( isset( $rEvent['classes'] ) && is_array( $rEvent['classes'] ) ) {
-
- // Loop through classes array
- foreach ( $rEvent['classes'] as $class ) {
- if ( isset( $class['rates'] ) && is_array( $class['rates'] ) ) {
-
- // Loop through rates array
- foreach ( $class['rates'] as $rate ) {
- if ( isset( $rate['registrants'] ) && is_array( $rate['registrants'] ) ) {
+ // check to see if there's a user logged in
+ if ( isset( $_SESSION['LoginAccount'] ) && filter_var( $_SESSION['LoginAccount']['id'], FILTER_VALIDATE_INT ) ) {
+ // Setup JSON for the loginAccount.
+ $loginAccount = json_encode( $_SESSION['LoginAccount'], JSON_NUMERIC_CHECK );
+ }
- // Loop through registrants array.
- foreach ( $rate['registrants'] as $registrant ) {
- $accountData = array();
- // If there's an account id get data for the account.
- if ( isset( $registrant['account'] ) && filter_var( $registrant['account'], FILTER_VALIDATE_INT ) ) {
- $accountData = $this->wpdb->get_row(
+ // If there's a cart then pull any registrants for it
+ // If there classes in the cart with rates and registrants they'll need
+ // be setup.
+
+ $registrants = array();
+
+ // echo '$cart: ' . print_r( $cart, true ) . '
';
+ // Looping through to grab out registrants from the cart.
+ if ( isset( $cart['events'] ) && is_array( $cart['events'] ) ) {
+
+ // Loop through events array.
+ foreach ( $cart['events'] as $rEvent ) {
+ if ( isset( $rEvent['classes'] ) && is_array( $rEvent['classes'] ) ) {
+
+ // Loop through classes array
+ foreach ( $rEvent['classes'] as $class ) {
+ if ( isset( $class['rates'] ) && is_array( $class['rates'] ) ) {
+
+ // Loop through rates array
+ foreach ( $class['rates'] as $rate ) {
+ if ( isset( $rate['registrants'] ) && is_array( $rate['registrants'] ) ) {
+
+ // Loop through registrants array.
+ foreach ( $rate['registrants'] as $registrant ) {
+ $accountData = array();
+ // If there's an account id get data for the account.
+ if ( isset( $registrant['account'] ) && filter_var( $registrant['account'], FILTER_VALIDATE_INT ) ) {
+ $accountData = $this->wpdb->get_row(
+ $this->wpdb->prepare(
+ "SELECT fname,lname,org,title,email,addr1,addr2,city,state,zip,country,validated
+ FROM " . GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX . "account
+ WHERE id = %d",
+ $registrant['account']
+ ),
+ ARRAY_A
+ );
+ }
+
+ // Need to know the class id for the registrant
+ $classId = $this->wpdb->get_var(
$this->wpdb->prepare(
- "SELECT fname,lname,email,addr1,addr2,city,state,zip,country,validated
- FROM " . GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX . "account
+ "SELECT class
+ FROM " . GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX . "reg_request_class
WHERE id = %d",
- $registrant['account']
- ),
- ARRAY_A
+ $registrant['reg_request_class']
+ )
);
- }
-
- // Need to know the class id for the registrant
- $classId = $this->wpdb->get_var(
- $this->wpdb->prepare(
- "SELECT class
- FROM " . GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX . "reg_request_class
- WHERE id = %d",
- $registrant['reg_request_class']
- )
- );
- // Also need to fetch the email
- $email = $this->wpdb->get_var(
- $this->wpdb->prepare(
- "SELECT email
- FROM " . GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX . "account
- WHERE id = %d",
- $registrant['account']
- )
- );
- if ( $registrant['reg_time'] && filter_var( $registrant['reg_time'], FILTER_VALIDATE_INT ) ) {
- $regTimeText = $this->wpdb->get_var(
+ // Also need to fetch the email
+ $email = $this->wpdb->get_var(
$this->wpdb->prepare(
- "SELECT DATE_FORMAT( start_datetime, '%%m/%%d/%%Y %%l:%%i %%p' )
- FROM " . GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX . "reg_time
+ "SELECT email
+ FROM " . GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX . "account
WHERE id = %d",
- $registrant['reg_time']
+ $registrant['account']
)
);
- $registrant['reg_time_text'] = $regTimeText;
- }
-
- // Setup the registrant for this level.
- $registrant['name'] = $accountData['fname'] . ' ' . $accountData['lname'];
- $registrant['class_id'] = $classId;
- $registrant['reg_class'] = $classId;
- $registrant['email'] = $email;
- $registrant['validated'] = $accountData['validated'];
- $registrant['addr1'] = $accountData['addr1'];
- $registrant['addr2'] = $accountData['addr2'];
- $registrant['city'] = $accountData['city'];
- $registrant['state'] = $accountData['state'];
- $registrant['zip'] = $accountData['zip'];
- $registrant['country'] = $accountData['country'];
- $registrant['reg_request'] = $rEvent['reg_request'];
- $registrants[] = $registrant;
- } // - End loop through for registrants array.
- }
-
- } // - End loop through rates.
- }
+ if ( $registrant['reg_time'] && filter_var( $registrant['reg_time'], FILTER_VALIDATE_INT ) ) {
+ $regTimeText = $this->wpdb->get_var(
+ $this->wpdb->prepare(
+ "SELECT DATE_FORMAT( start_datetime, '%%m/%%d/%%Y %%l:%%i %%p' )
+ FROM " . GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX . "reg_time
+ WHERE id = %d",
+ $registrant['reg_time']
+ )
+ );
+ $registrant['reg_time_text'] = $regTimeText;
+ }
+
+ // Setup the registrant for this level.
+ $registrant['name'] = $accountData['fname'] . ' ' . $accountData['lname'];
+ $registrant['class_id'] = $classId;
+ $registrant['reg_class'] = $classId;
+ $registrant['email'] = $email;
+ $registrant['validated'] = $accountData['validated'];
+ $registrant['org'] = $accountData['org'];
+ $registrant['title'] = $accountData['title'];
+ $registrant['addr1'] = $accountData['addr1'];
+ $registrant['addr2'] = $accountData['addr2'];
+ $registrant['city'] = $accountData['city'];
+ $registrant['state'] = $accountData['state'];
+ $registrant['zip'] = $accountData['zip'];
+ $registrant['country'] = $accountData['country'];
+ $registrant['reg_request'] = $rEvent['reg_request'];
+ $registrants[] = $registrant;
+ } // - End loop through for registrants array.
+ }
+
+ } // - End loop through rates.
+ }
+
+ } // - End loop through classes.
+ }
- } // - End loop through classes.
- }
+ } // - End loop through events.
+ }
- } // - End loop through events.
- }
+ // If enabled, get list of registrants for this event
+ $registrantsList = false;
+ if ($this->config['settings']['reg_show_attendees_on_reg_page']) {
+ require_once GLM_MEMBERS_REGISTRATIONS_PLUGIN_CLASS_PATH.'/data/dataRegRequestRegistrant.php';
+ $RegRequestRegistrant = new GlmDataRegistrationsRequestRegistrant($this->wpdb, $this->config);
+ $registrantsList = $RegRequestRegistrant->getList("T.reg_event = $regEventId", "T.lname, T.fname");
+ }
- // If enabled, get list of registrants for this event
- $registrantsList = false;
- if ($this->config['settings']['reg_show_attendees_on_reg_page']) {
- require_once GLM_MEMBERS_REGISTRATIONS_PLUGIN_CLASS_PATH.'/data/dataRegRequestRegistrant.php';
- $RegRequestRegistrant = new GlmDataRegistrationsRequestRegistrant($this->wpdb, $this->config);
- $registrantsList = $RegRequestRegistrant->getList("T.reg_event = $regEventId", "T.lname, T.fname");
}
- // echo "".print_r($registrantsList,1)."
";
+
+
+ // echo "".print_r($registrants,1)."
";
// Compile template data
$templateData = array(
@@ -383,7 +421,9 @@
'regEventId' => $regEventId,
'page' => 'registration',
'haveCart' => $haveCart,
+ 'haveRegEvent' => $haveRegEvent,
'regEvent' => $regEvent,
+ 'standAlone' => ($regEvent.event == 0),
'regEventFirstTime' => $regEventFirstTime,
'thisJsUrl' => GLM_MEMBERS_REGISTRATIONS_PLUGIN_URL . '/js',
'regEventJSON' => json_encode( $event, JSON_NUMERIC_CHECK ),
diff --git a/readme.txt b/readme.txt
index 6a9c52a..8fe1201 100755
--- a/readme.txt
+++ b/readme.txt
@@ -26,7 +26,26 @@ e.g.
== Changelog ==
= PENDING =
-* Added sort order for registration classes (levels)
+* Added sort order for registration classes (levels) - Drag and Drop
+* Added ability to create a Stand-Alone registrations event (Not tied to event in Events Add-On).
+* Added ability to hide registration events from front-end lists.
+* Added ability to select a registrations event by code.
+* Added ability to specify a registrations event on URL using registration event code rather than ID.
+* Added ability to go direct to a registrations event front-end page from admin registrations event dashboard.
+* Added more terms and phrases and updated defaults for those that didn't have them.
+* Added notification on registrations event dashboard for why a registrations event won't show up on front-end.
+* More intelligent selection of month initially displayed for calendar in dashboard for a specific event.
+* Displaying above calendar why the initial month displayed was selected. Hide after month change.
+* Added reg_bill_info_requested field to management for selection of checkout fields.
+* Defaulted reg_bill_info_requested field to all on to show all checkout fields by default.
+* Commented out management selection of checkout fields by payment type temporarily.
+* New Rate edit form now has default values.
+* Fixed a range of error log notices regarding undefined variables in models and views.
+* Removed "data" directory with code to inject original test data.
+* Fixed non-working "Read More" button on registration page.
+* Fixed incorrect "Total Charge" at bottom of checkout page when discount codes are applied.
+* Fixed bad dialog box layout due to CSS from Bootstrap
+* Fixed incorrect use of href in form tag
= 1.1.0 =
* Formal release for a range of front-end and admin improvement and fixes
@@ -44,22 +63,22 @@ e.g.
* Checkout page now shows "Billing Information" if there are charges or "Contact Information" if there's no charge.
= 1.0.21 =
-* Added missing callback function for e-mail notices
+* Added missing callback function for e-mail notices
= 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.
+* 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 =
+= 1.0.19 =
* Removed "Select" from progress bar on checkout page that leaked in from development work
= 1.0.18 =
* Now properly formatting checkout failure notices in request Notes field
* Added more list filtering and pagenation features to accounts and requests lists
* Now not showing requests that have no attendees in request admin list
-* Added more debug information to checout processing
+* Added more debug information to checout processing
= 1.0.17 =
* Fixed checkout error messages not showing on checkout page if not checkout page top text provided in settings
diff --git a/setup/adminHooks.php b/setup/adminHooks.php
index 6b97106..4eb9e4f 100644
--- a/setup/adminHooks.php
+++ b/setup/adminHooks.php
@@ -83,7 +83,7 @@ add_filter(
// Since we must not have had a good event ID or didn't find the event in registrations, return title and url to add this event to registrations
return array(
'title' => 'Add Registrations To Event',
- 'url' => GLM_MEMBERS_PLUGIN_ADMIN_MENU_URL_BASE."registrations-events&option=eventDashboard&option=add&event=".$eventId,
+ 'url' => GLM_MEMBERS_PLUGIN_ADMIN_MENU_URL_BASE."registrations-events&&option=add&event=".$eventId,
'warning_title' => false,
'edit_warning' => '',
'update_warning' => ''
diff --git a/setup/adminMenus.php b/setup/adminMenus.php
index b7e7f34..a3c067f 100644
--- a/setup/adminMenus.php
+++ b/setup/adminMenus.php
@@ -61,7 +61,7 @@ add_submenu_page(
add_submenu_page(
'glm-members-admin-menu-members',
'Selected '.$this->config['terms']['reg_term_event_cap'],
- ' '.$this->config['terms']['reg_term_event_plur_cap'],
+ ' List',
'glm_members_members',
'glm-members-admin-menu-registrations-events',
function() {$this->controller('registrations', 'events');}
diff --git a/setup/databaseScripts/create_database_V1.0.2.sql b/setup/databaseScripts/create_database_V1.0.2.sql
deleted file mode 100755
index 420ff1b..0000000
--- a/setup/databaseScripts/create_database_V1.0.2.sql
+++ /dev/null
@@ -1,842 +0,0 @@
--- Gaslight Media Registration Database
--- File Created: 01/18/2017 14:40:00
--- Database Version: 1.0.1
--- Database Creation Script
---
--- To permit each query below to be executed separately,
--- all queries must be separated by a line with four dashes
---
-/*
- * General Database Organization
- * -----------------------------
- *
- * management - General options and configuration - Site manager access only
- *
- * misc - Misc settings and text - Site owner may update
- *
- * payment codes - Promotional payment codes - Used with various things
- * --> Event, Submission, Event Registration, Event Registrant, Account or global
- *
- * reg_event - Describes registration for that event
- * reg_time - One record for each date/time this event has people registered - Primarily tracks attendee counts and charge totals
- * reg_class - Type of registration for this event (one or more)
- * reg_rates - Date range / rate for a reg class (one or more)
- *
- * reg_account - Describes someone who submits / pays for a registration
- * Make these two things the same table....
- * registrant - A person who is registered for an event
- *
- * reg_request - Information on a specific request for registrations
- * reg_request_event - Event selected (one or more)
- * reg_request_class - Class of registration (one or more)
- * reg_request_rate - Specific registration date/rate (one or more)
- * reg_request_registrant - Registrant (one or more)
- *
- * NOTE: additional fields and added fields data will be coming from the Custom Fields add-on
- *
- * Overall Flow
- * ------------
- *
- * User selects an event
- * If the event has available registrations
- * User selects a date for the registration (or if only one that's selected automatically)
- * User can log back into registrations at this point if they've been there before and have a password, create an ccount, or continue as guest ???
- * User selects an available rate type and adds one or more registrants for that rate type
- * User may loop back to select additional rate type(s) and registrants
- * User may go back to date selection and request additional rate types and registrants for the addional dates
- * User may go back to select additional dates and do registrations for those dates as above
- * User may go back to select other events and do registrations for them as above
- * User may select the "Cart" and deselect something added to it
- * User may checkout
- *
- */
-
-/*
- * NOTE: Anything below here may not be completed or accurate yet. I'm still working though this
- * Lines commented out are selected for possible deletion.
- * The INSERT statements are not up-to-date with the tables.
- * The "config/plugin.ini" file in this plugin is also a work in progress.
- */
-
--- Management Options
--- General configurationm parameters for the Registrations application
--- Only one entry in this table!
-CREATE TABLE {prefix}management (
- id INT NOT NULL AUTO_INCREMENT,
- canonical_reg_page TINYTEXT NULL, -- Canonical page slug for registrations
- -- System Owner Information
- reg_org_name TINYTEXT NULL, -- Customer Information - Name of Organization
- reg_org_short TINYTEXT NULL,
- reg_org_address TINYTEXT NULL,
- reg_org_city TINYTEXT NULL,
- reg_org_state TINYTEXT NULL,
- reg_org_zip TINYTEXT NULL,
- reg_org_phone TINYTEXT NULL,
- reg_org_toll_free TINYTEXT NULL,
- reg_org_internal_email TINYTEXT NULL,
- reg_org_from_email TINYTEXT NULL,
- reg_payment_methods SMALLINT NULL, -- Payment methods available for all registrations - Bitmap - see payment_method in plugin.ini
- reg_proc_methods SMALLINT NULL, -- Credit Cart payment processing methods available - Bitmap - see proc_method in plugin.ini
- reg_cc_accepts SMALLINT NULL, -- Credit Cards Accepted - Bitmap - See credit_card in plugin.ini
- -- Authorize.net Credentials
- reg_authorize_net_login TINYTEXT NULL,
- reg_authorize_net_key TINYTEXT NULL,
- reg_authorize_net_test TINYINT NULL, -- Authorize.net test mode - List - see proc_test_mode in plugin.ini
- reg_authorize_net_conf BOOLEAN NULL, -- Flag to send payment confirmation Email from Authorize.net
- reg_authorize_net_merchant_email TINYTEXT NULL, -- E-Mail Authorize.net will send copy of confirmation E-Mail
- reg_authorize_net_merchant_seal TEXT NULL, -- Authorize.net Verified Merchant Seal code
- -- Merchant Solutions Credentials
- reg_merchant_solutions_acctid TINYTEXT NULL, -- Merchant Solutions credentials
- reg_merchant_solutions_merchantpin TINYTEXT NULL,
- reg_merchant_solutions_test TINYINT NULL, -- Merchant Solutions test mode - List - see proc_test_mode in plugin.ini
- reg_merchant_solutions_conf BOOLEAN NULL, -- Flag to send payment confirmation Email
- reg_merchant_solutions_merchant_email TINYTEXT NULL, -- Merchant Solutions will send copy of confirmation E-Mail
- -- PayPal Credentials
- reg_paypal_clientid TINYTEXT NULL, -- PayPal Client ID
- reg_paypal_secret TINYTEXT NULL, -- PayPal Secret
- reg_paypal_sandbox_clientid TINYTEXT NULL, -- PayPal Client ID
- reg_paypal_sandbox_secret TINYTEXT NULL, -- PayPal Secret
- reg_paypal_test TINYINT NULL, -- PayPal test mode - List - see
- -- Billing settings
- reg_full_billing_info BOOLEAN NULL, -- Always request full billing information in checkout page regardless of the following settings
- reg_bill_info_req_no_charge SMALLINT NULL, -- Bitmap of fields to use in checkout for these types of payments - See billing_field in plugin.conf
- reg_bill_info_req_comp_code SMALLINT NULL,
- reg_bill_info_req_cash SMALLINT NULL,
- reg_bill_info_req_check SMALLINT NULL,
- reg_bill_info_req_credit_card SMALLINT NULL,
- reg_bill_info_req_merchant_call SMALLINT NULL,
- -- Misc Options
- reg_request_hold_days SMALLINT NULL, -- Number of days past last update that a request will be retained in "CART" status.
- reg_account_hold_days SMALLINT NULL, -- Number of days past last update that an account will be retained when there are no requests or registrants referring to it.
- reg_not_submitted_dialog BOOLEAN NULL, -- Flag to show page not submitted dialog boxes
- reg_medical_info BOOLEAN NULL, -- This site can ask for "Medical Info" - set in main category of an event
- reg_show_navigation_aids BOOLEAN NULL, -- No, not marine navigational aids, this enables additional text, arrows, etc to direct a user to do something specific that would not normally be required.
- reg_show_attendees_on_reg_page BOOLEAN NULL, -- Flag to show a list of attendees on the registraitons page for an event
- PRIMARY KEY (id)
-);
-
-----
-
--- Terms used in site modifiable on Management page in admin - Only 1 entry in this table
--- Terms in this table should be all self-explanatory
-CREATE TABLE {prefix}settings_terms (
- id INT NOT NULL AUTO_INCREMENT,
- reg_term_registrations_name TINYTEXT NULL, -- Term "Event Registration"
- reg_term_registration TINYTEXT NULL,
- reg_term_registration_cap TINYTEXT NULL,
- reg_term_registration_plur TINYTEXT NULL,
- reg_term_registration_plur_cap TINYTEXT NULL,
- reg_term_register TINYTEXT NULL,
- reg_term_register_cap TINYTEXT NULL,
- reg_term_registers TINYTEXT NULL, -- Intransitive verb of register
- reg_term_registering TINYTEXT NULL,
- reg_term_registering_cap TINYTEXT NULL,
- reg_term_registered TINYTEXT NULL,
- reg_term_registered_cap TINYTEXT NULL,
- reg_term_attendee TINYTEXT NULL,
- reg_term_attendee_cap TINYTEXT NULL,
- reg_term_attendee_plur TINYTEXT NULL,
- reg_term_attendee_plur_cap TINYTEXT NULL,
- reg_term_attending TINYTEXT NULL,
- reg_term_attended TINYTEXT NULL,
- reg_term_registered_user TINYTEXT NULL,
- reg_term_registered_user_cap TINYTEXT NULL,
- reg_term_registered_user_plur TINYTEXT NULL,
- reg_term_registered_user_plur_cap TINYTEXT NULL,
- reg_term_event TINYTEXT NULL,
- reg_term_event_cap TINYTEXT NULL,
- reg_term_event_plur TINYTEXT NULL,
- reg_term_event_plur_cap TINYTEXT NULL,
- reg_term_id TINYTEXT NULL,
- reg_term_id_cap TINYTEXT NULL,
- reg_term_id_plur TINYTEXT NULL,
- reg_term_id_plur_cap TINYTEXT NULL,
- reg_term_level TINYTEXT NULL,
- reg_term_level_cap TINYTEXT NULL,
- reg_term_level_plur TINYTEXT NULL,
- reg_term_level_plur_cap TINYTEXT NULL,
- reg_term_password TINYTEXT NULL,
- reg_term_password_cap TINYTEXT NULL,
- reg_term_password_plur TINYTEXT NULL,
- reg_term_password_plur_cap TINYTEXT NULL,
- reg_term_instructor TINYTEXT NULL,
- reg_term_instructor_cap TINYTEXT NULL,
- reg_term_instructor_plur TINYTEXT NULL,
- reg_term_instructor_plur_cap TINYTEXT NULL,
- reg_term_payment_code TINYTEXT NULL,
- reg_term_payment_code_cap TINYTEXT NULL,
- reg_term_payment_code_plur TINYTEXT NULL,
- reg_term_payment_code_plur_cap TINYTEXT NULL,
- reg_term_registration_button TINYTEXT NULL,
- reg_term_contact_information TINYTEXT NULL,
- reg_term_button_event_list TINYTEXT NULL,
- reg_term_button_login_or_create TINYTEXT NULL,
- reg_term_button_create_account TINYTEXT NULL,
- reg_term_button_login TINYTEXT NULL,
- reg_term_button_logout TINYTEXT NULL,
- reg_term_button_add_attendee TINYTEXT NULL,
- reg_term_button_save_attendee TINYTEXT NULL,
- reg_term_button_attendee_page_continue TINYTEXT NULL,
- reg_term_button_apply_comp_code TINYTEXT NULL,
- reg_term_button_cart_page_continue TINYTEXT NULL,
- reg_term_button_checkout_page_submit TINYTEXT NULL,
- PRIMARY KEY (id)
-);
-
-----
-
--- Misc system-wide customer configurable configuration
--- Various text and flags to be configured by customer
--- Only one entry in this table!
-CREATE TABLE {prefix}misc (
- id INT NOT NULL AUTO_INCREMENT,
- reg_bulletin TEXT NULL, -- Text to display at top of first registration page
- cart_page_text TEXT NULL, -- Text to display at top of cart page
- checkout_page_text TEXT NULL, -- Text to display at top of checkout page
- summary_page_text TEXT NULL, -- Text to display at top of summary page (after checkout)
- reg_terms TEXT NULL, -- Registration terms and conditions
- notify_subject TEXT NULL, -- Subject of notification E-Mail to site owner
- notify_text TEXT NULL, -- Notification E-Mail text for site owner
- instr_notify_subject TEXT NULL, -- Subject of notification E-Mail to instructor
- instr_notify_text TEXT NULL, -- Notification E-Mail text for instructor
- submission_notify_subject TEXT NULL, -- Subject of notification E-Mail to person submitting the registrations
- submission_notify_text TEXT NULL, -- Notification E-Mail text to person submitting the registrations
- registrant_notify_subject TEXT NULL, -- Subject of notification E-Mail to registrant
- registrant_notify_text TEXT NULL, -- Text of notification E-Mail to registrant
- submission_ack_subject TEXT NULL, -- Subject of acknowledgement E-Mail to person submitting the registrations
- submission_ack_text TEXT NULL, -- Text of acknowledgement E-Mail text to person submitting the registrations
- registrant_ack_subject TEXT NULL, -- Subject of acknowledgement E-Mail to registrant
- registrant_ack_text TEXT NULL, -- Text of acknowledgement E-Mail to registrant
- PRIMARY KEY (id)
-);
-
-----
-
--- Payment Codes
--- Promotional payment codes for free/discounted payment
-CREATE TABLE {prefix}payment_code (
- id INT NOT NULL AUTO_INCREMENT,
- code_type TINYINT NULL, -- Type of adjustment - Free only to start with - See pay_code_type in plugin.ini
- ref_type TINYINT NULL, -- See payment_ref_type in plugin.ini
- ref_dest INT NULL, -- Pointer to the specific entity of ref_type
- code TINYTEXT NULL, -- Text code user must enter to use
- amount FLOAT, -- Amount of discount if not type "Free" - Either $ amount or percent
- expire_date DATE NULL, -- Expiration Date
- descr TEXT NULL,
- PRIMARY KEY (id),
- INDEX (ref_dest),
- INDEX (code(10))
-);
-
-----
-
--- Registration event specific information
--- One record for each event in Events add-on
--- Only created when an event is selected to offer registrations
-CREATE TABLE {prefix}reg_event (
- id INT NOT NULL AUTO_INCREMENT,
- event INT NULL, -- Pointer to event in Events add-on - False if event record in Events add-on no longer exists
- event_name TINYTEXT NULL, -- Name of Event so it will always be in the cart data
- event_code TINYTEXT NULL, -- A short code used to reference this event - can be used to directly select an event to register for
- notify_email TINYTEXT NULL, -- E-Mail addresses to receive notification of a registration other than org_internal_email in management, comma separated
- admin_active BOOLEAN NULL, -- Active flag for admin from Events - If logged in Admin user for this event and this is true then admin user may enter registrations even if active is off.
- active BOOLEAN NULL, -- Active flag to indicate that this event is available for registrations and notifications
- time_specific BOOLEAN NULL, -- Registration for this event is not date/time specific. Can attend any date/time of event.
- attendees BOOLEAN NULL, -- Registration requires attendees - Otherwise the person submitting the registration is the registrant
- attendee_max MEDIUMINT NULL, -- Attendee limit - 0 = unlimited
- attendee_max_per_reg TINYINT NULL, -- Maximum attendees per registration submission - 0 = unlimited
- reg_hold_minutes MEDIUMINT NULL, -- Number of minutes hold time for an inactive cart before registrant count hold expires (after which cart attempts to hold again on next access)
- cart_hold_days MEDIUMINT NULL, -- NO LONGER IN USE - Number of days hold time for inactive cart before cart is purged
- reg_hours_before MEDIUMINT NULL, -- Number of hours before an event that is the latest a registration may be submitted.
- registration_account_options SMALLINT NULL, -- Bitmap of how user accounts may be used for this event - See registration_account_option in plugin.ini
- payment_methods SMALLINT NULL, -- Bitmap of payment methods available to users for this event - See payment_method in plugin.ini
- restricted_payment_methods SMALLINT NULL, -- Bitmap of restricted (admin use only) payment methods for this event - see payment_method
- descr TEXT NULL, -- Registrations specific description field for this event
- terms TEXT NULL, -- Terms and Conditions for registration
- first_datetime DATETIME NULL, -- Start of first listed date/time for this event
- last_datetime DATETIME NULL, -- Start of last listed date/time for this event
- reg_file TINYTEXT NULL, -- Name of a downloadable file
- reg_file_title TINYTEXT NULL, -- Title for downloadable file
- form_revision SMALLINT NULL, -- Current MagicForm form revision
- notes TEXT NULL, -- System operator's notes for this event - Not visible to users
- PRIMARY KEY (id),
- INDEX (event),
- INDEX (event_code(10))
-);
-
-----
-
--- Registration Event Time - Information and summary data for a specific event instance (relates to a particular time record in events)
--- A pseudo entry is created if registration is not date/time sensitive for this event. The pseudo entry does not point to an event time.
--- These are created the first time a person tries to register for an event instance (time)
--- One or more for each event
-CREATE TABLE {prefix}reg_time (
- id INT NOT NULL AUTO_INCREMENT,
- active BOOLEAN NULL, -- Flag. True if registrations is available for this time
- non_time_specific BOOLEAN NULL, -- Flag. True if this is a pseudo time for non-time-specific events - Other informational times for the event will have this flag off
- reg_event INT NULL, -- Pointer to reg_event table
- event_time INT NULL, -- ID of events times table entry in Events add-on - If false (0), then this is a pseudo entry to use for all registrations (non-date/time specific)
- start_datetime DATETIME NULL, -- Date and time when event instance starts
- end_datetime DATETIME NULL, -- Date and time when event instance ends
- all_day BOOLEAN NULL, -- All Day flag - Informational
- attendees BOOLEAN NULL, -- Flag if tracking attendees or if only one per registration submission (registers account submitting) - get from reg_event
- attendee_max MEDIUMINT NULL, -- Attendee count limit - 0 = unlimited - get from reg_event record
- attendee_count MEDIUMINT NULL, -- Current attendee count - calculated on the fly and stored here for reference
- attendees_pending MEDIUMINT NULL, -- Current number of attendees for this time in active pending carts (Not checked out and attendees slots held)
- attendees_available MEDIUMINT NULL, -- Currently available attendee count (limit - registered - pending)
- total_base_charge DOUBLE NULL, -- Total base charges
- total_per_attendee DOUBLE NULL, -- Total per-attendee charges
- total_other DOUBLE NULL, -- Total other charges (meals, extras, fees, ...)
- total_taxes DOUBLE NULL, -- Total taxes charged
- total_charges DOUBLE NULL, -- Total charges (sum of all above)
- total_discounts DOUBLE NULL, -- Total discounts of all types (applied payment codes, etc...)
- total_payments DOUBLE NULL, -- Total net payments (total charges - total discounts)
- descr TEXT NULL, -- Optional description field for this time entry
- PRIMARY KEY (id),
- INDEX (reg_event),
- INDEX (event_time),
- INDEX (start_datetime)
-);
-
-----
-
--- Pending Attendees - In carts but not checked out
--- Attendee counts may be held for a particular reg_time entry for carts that have not been checked out
--- These are held for reg_event reg_hold_minutes, afterwhich they are timed out and removed from this table
--- Cart entries are given the ID's for these entries when a hold is requested, if the entry is gone, the hold has expired
-CREATE TABLE {prefix}reg_time_pending (
- id INT NOT NULL AUTO_INCREMENT,
- reg_event INT NULL, -- Pointer to reg_event table
- reg_time INT NULL, -- ID of time record
- registrant INT NULL, -- ID of reg_request_registrant record --
- expire_time DATETIME NULL, -- Time at which this hold expires
- PRIMARY KEY (id),
- INDEX (reg_event),
- INDEX (reg_time)
-);
-
-----
-
--- Registration Class - Type of registration for a specific event - Equates to "Rate Options" in the old system
--- One or more for each event
-CREATE TABLE {prefix}reg_class (
- id INT NOT NULL AUTO_INCREMENT,
- reg_event INT NULL, -- Pointer to reg_event table
- name TINYTEXT NULL, -- Name of this registration type
- descr TEXT NULL, -- Description
- sort_order INT DEFAULT 999, -- Sort order for display in Front-End
- PRIMARY KEY (id),
- INDEX (reg_event)
-);
-
-----
-
--- Rates and dates for a particular reg_class
--- One or more per reg_class - **** Days should not overlap for a particular reg_class
-CREATE TABLE {prefix}reg_rate (
- id INT NOT NULL AUTO_INCREMENT,
- reg_event INT NULL, -- Pointer to reg_event table
- reg_class INT NULL, -- Pointer to reg_class table
- name TINYTEXT NULL, -- Name of this rate
- start_days INT NULL, -- # of days before event time rate becomes available - may be selected as a date then converted for storage
- end_days INT NULL, -- # of days before event time rate becomes unavailable
- base_rate FLOAT, -- Base rate to register
- per_registrant FLOAT, -- Rate per registrant
- registrant_credits TINYINT NULL, -- Number of registrants included in base rate
- PRIMARY KEY (id),
- INDEX (reg_event),
- INDEX (reg_class)
-);
-
-----
-
--- Notifications
--- None or more for each reg event
-CREATE TABLE {prefix}reg_notification (
- id INT NOT NULL AUTO_INCREMENT,
- reg_event INT NULL, -- Pointer to reg_event table
- name TINYTEXT NULL, -- Name of this notification
- notification_days INT NULL, -- # of days before or after event that notification takes place (- before, + after)
- message TEXT NULL, -- Content of message (uses template parameters to merge event/attendee data)
- PRIMARY KEY (id),
- INDEX (reg_event)
-);
-
-----
-
--- Notification Queue
-CREATE TABLE {prefix}notification_queue (
- id INT NOT NULL AUTO_INCREMENT,
- reg_notification INT NOT NULL, -- Pointer to the reg_notification table
- account INT NOT NULL, -- Pointer to the account table
- queued_time DATETIME NOT NULL, -- Creation time
- processed_time DATETIME NULL, -- The time this queue was processed. (sent out)
- to_email TINYTEXT NOT NULL, -- The To email address
- from_email TINYTEXT NOT NULL, -- The From email address
- subject TINYTEXT NOT NULL, -- The subject
- html_message TEXT NOT NULL, -- The complete html message
- PRIMARY KEY (id)
-);
-
-----
-
--- An account for a person submitting a registration or a registrant for an event
--- Depending on the use of these entries may not have all data included
--- A single account may be referenced as a person submitting registrations and/or a person registered for an event
-CREATE TABLE {prefix}account (
- id INT NOT NULL AUTO_INCREMENT,
- active BOOLEAN NULL, -- Is active flag (may be accessed or used) - default is true
- validated BOOLEAN NULL, -- Flag indicating that the account has been validated - Set to false when recovering password
- validation_code TINYTEXT NULL, -- Validation code and timestamp ("{validation code}-{timestamp}) - Clear this after validation
- registered_by INT NULL, -- Account *** THIS FIELD NEEDS TO BE DELETED ***
- member_id TINYTEXT NULL, -- Free-form field for a member ID (not a GLM Associate member ID - See "contact_member_id" below)
- fname TINYTEXT NULL, -- Account primary address
- lname TINYTEXT NULL,
- org TINYTEXT NULL,
- title TINYTEXT NULL,
- addr1 TINYTEXT NULL,
- addr2 TINYTEXT NULL,
- city TINYTEXT NULL,
- state TINYTEXT NULL,
- zip TINYTEXT NULL,
- country TINYTEXT NULL,
- phone TINYTEXT NULL,
- fax TINYTEXT NULL,
- bill_fname TINYTEXT NULL, -- Last used billing infodeletermation - Also stored in each registration request
- bill_lname TINYTEXT NULL,
- bill_org TINYTEXT NULL,
- bill_title TINYTEXT NULL,
- bill_addr1 TINYTEXT NULL,
- bill_addr2 TINYTEXT NULL,
- bill_city TINYTEXT NULL,
- bill_state TINYTEXT NULL,
- bill_zip TINYTEXT NULL,
- bill_country TINYTEXT NULL,
- bill_phone TINYTEXT NULL,
- bill_fax TINYTEXT NULL,
- email TINYTEXT NULL,
- password TINYTEXT NULL, -- Crypted password for login back into this account
- email_ok BOOLEAN NULL,
- is_member BOOLEAN NULL, -- Is a member of the entity that owns the site
- customer_profile_id TINYTEXT NULL, -- Stored Credit Card customer profile ID
- payment_profile_id TINYTEXT NULL, -- Stored Credit Card payment profile ID
- payment_profile_card TINYTEXT NULL, -- Stored Credit Card last card digits
- contact_id INT NULL, -- Pointer to GLM Associate member contact record if account is for a member contact
- contact_member_id INT NULL, -- Pointer to GLM Associate Member for this contact
- contact_fname TINYTEXT NULL,
- contact_lname TINYTEXT NULL,
- contact_org TINYTEXT NULL,
- contact_title TINYTEXT NULL,
- contact_addr1 TINYTEXT NULL,
- contact_addr2 TINYTEXT NULL,
- contact_city TINYTEXT NULL,
- contact_state TINYTEXT NULL,
- contact_zip TINYTEXT NULL,
- contact_country TINYTEXT NULL,
- contact_phone TINYTEXT NULL,
- contact_fax TINYTEXT NULL,
- contact_email TINYTEXT NULL,
- contact_email_ok BOOLEAN NULL,
- guardian TINYTEXT NULL,
- emer_contact TINYTEXT NULL,
- emer_phone TINYTEXT NULL,
- med_history TINYTEXT NULL,
- allergy_med TINYTEXT NULL,
- date_created DATE NULL,
- notes TEXT NULL, -- System operator's notes for this account - not visible to account owner
- user_trace_info TINYTEXT NULL, -- IP Address of user computer and timestamp of last update
- PRIMARY KEY (id),
- INDEX (registered_by),
- INDEX (member_id(10)),
- INDEX (fname(10)),
- INDEX (lname(10)),
- INDEX (org(10)),
- INDEX (city(10)),
- INDEX (state(5)),
- INDEX (zip(5)),
- INDEX (email(10)),
- INDEX (contact_id)
-);
-
-----
-
--- A request for registration
--- Has one or more reg_detail records associated with it
-CREATE TABLE {prefix}reg_request (
- id INT NOT NULL AUTO_INCREMENT,
- account INT NULL, -- Pointer to user account (reg_account) who submitted the registrations. If 0 then guest request (prior to checkout)
- validated BOOLEAN NULL, -- Flag that indicates if request passed last validation with checkRegistrationRequest()
- validation_message TEXT NULL, -- Reasons that request did not pass validation with checkRegistrationRequest() - Serialized array
- bill_fname TINYTEXT NULL, -- Billing information used for this registration submission - Updates account billing address - Kept here for each request
- bill_lname TINYTEXT NULL,
- bill_org TINYTEXT NULL,
- bill_title TINYTEXT NULL,
- bill_addr1 TINYTEXT NULL,
- bill_addr2 TINYTEXT NULL,
- bill_city TINYTEXT NULL,
- bill_state TINYTEXT NULL,
- bill_zip TINYTEXT NULL,
- bill_country TINYTEXT NULL,
- bill_phone TINYTEXT NULL,_class
- bill_email TINYTEXT NULL,
- date_submitted DATE NULL, -- Date of final submission (checkout complete)
- pay_method INT NULL, -- See payment_method in plugin.ini
- payment_code TINYTEXT NULL, -- Payment_code text (comp code) - if submitted and validated
- status SMALLINT NULL, -- See submission_status in plugin.ini
- total DOUBLE PRECISION NULL, -- Total charge including all fees and taxes
- total_discounts DOUBLE PRECISION NULL, -- Total of all comps and discounts
- registrants SMALLINT NULL, -- Total number of registrants in this cart
- cc_type TINYINT NULL, -- Credit Card type (if used) - See credit_card in plugin.ini
- cc_name TINYTEXT NULL, -- Name on Credit Card or Name on Check
- cc_numb TINYTEXT NULL, -- Credit Card Number or Check Number
- cc_exp TINYTEXT NULL,
- cc_cvv TINYTEXT NULL,
- cc_conf TINYTEXT NULL, -- Confirmation code back from card processor
- cc_proc_mesg TINYTEXT NULL, -- Message received from payment processor
- summary TEXT NULL, -- HTML summary of cart contents, costs and payment - Use same HTML displayed to user
- mf_data TEXT NULL, -- Any MagicForm data associated with registrant
- notes TEXT NULL, -- System operator's notes for this registration request
- user_trace_info TEXT NULL, -- IP Address of user computer and timestamp
- date_created DATETIME NULL, -- Date request was first created
- last_update DATETIME NULL, -- Last update date/time - Used for timing out pending carts and attendee counts
- PRIMARY KEY (id),
- INDEX (account),
- INDEX (date_submitted)
-);
-
-----
-
--- Registration for a specific event
--- Has one or more reg_selected_rate records associated with it
-CREATE TABLE {prefix}reg_request_event (
- id INT NOT NULL AUTO_INCREMENT,
- reg_request INT NULL, -- Pointer to reg_request table
- reg_event INT NULL, -- Pointer to reg_event
- event_name TINYTEXT NULL, -- Name of Event so it will always be in the cart data
- notes TEXT NULL, -- System operator's notes for this registration request
- PRIMARY KEY (id),
- INDEX (reg_request),
- INDEX (reg_event)
-);
-
-----
-
--- A particular reg_class selected
--- Has one or more reg_request_rate records associated with it
-CREATE TABLE {prefix}reg_request_class (
- id INT NOT NULL AUTO_INCREMENT,
- reg_event INT NULL, -- Pointer to reg_event entry
- reg_request INT NULL, -- Pointer to the registration request record
- reg_request_event INT NULL, -- Pointer to reg_request_event table entry
- class INT NULL, -- Pointer to event reg_class table - False (0) if registration class no longer exits
- class_name TINYTEXT NULL, -- Name of event class at the time selected
- notes TEXT NULL, -- System operator's notes for this registration request
- PRIMARY KEY (id),
- INDEX (reg_event),
- INDEX (reg_request_event)
-);
-
-----
-
--- A particular reg_rate selected
--- Has one or more reg_request_registrant records associated with it
-CREATE TABLE {prefix}reg_request_rate (
- id INT NOT NULL AUTO_INCREMENT,
- reg_event INT NULL, -- Pointer to reg_event entry
- reg_request INT NULL, -- Pointer to the registration request record
- reg_request_event INT NULL, -- Pointer to reg_request_event table entry
- reg_request_class INT NULL, -- Pointer to reg_request_class table entry
- rate INT NULL, -- Pointer to event reg_rate table - False (0) if registration rate no longer exists
- rate_name TINYTEXT NULL, -- Name of event class rate at the time selected
- base_rate FLOAT, -- Base rate at time of registration
- per_registrant FLOAT, -- Per Registrant Rate at time of registration
- registrant_credits TINYINT NULL, -- Number of registrants included in base rate at time of registration
- notes TEXT NULL, -- System operator's notes for this registration request
- PRIMARY KEY (id),
- INDEX (reg_event),
- INDEX (reg_request_event),
- INDEX (reg_request_class)
-);
-
-----
-
--- A specific registrant for a selected registration rate
-CREATE TABLE {prefix}reg_request_registrant (
- id INT NOT NULL AUTO_INCREMENT,
- account INT NULL, -- Pointer to the account entry for the person being registered - False (0) if account no longer exists or registrant account not needed
- reg_event INT NULL, -- Pointer to reg_event entry
- reg_time INT NULL, -- Pointer reg_time entry
- event_datetime DATETIME NULL, -- Date and time of event time selected so it will always be in the cart
- reg_request INT NULL, -- Pointer to the registration request record
- reg_request_event INT NULL, -- Pointer to reg_request_event table entry
- reg_request_class INT NULL, -- Pointer to reg_request_class table entry
- reg_request_rate INT NULL, -- Pointer to reg_request_rate table entry
- not_attending BOOLEAN DEFAULT false, -- Flag to say if registrant is not attending - set to true when not attending
- fname TINYTEXT NULL, -- First name of registrant at the time of selection
- lname TINYTEXT NULL, -- Last name of registrant at the time of selection
- notes TEXT NULL, -- System operator's notes for this registration request
- PRIMARY KEY (id),
- INDEX (account),
- INDEX (reg_event),
- INDEX (reg_time),
- INDEX (reg_request),
- INDEX (reg_request_event),
- INDEX (reg_request_class),
- INDEX (reg_request_rate)
-);
-
-----
-
--- A specific use of a payment code in this request
-CREATE TABLE {prefix}reg_request_pay_code (
- id INT NOT NULL AUTO_INCREMENT,
- payment_code INT NULL, -- Pointer to payment code
- code TINYTEXT NULL, -- Copy of Payment Code text in case payment code is deleted or changed
- reg_request INT NULL, -- Pointer to the registration request record
- credit DOUBLE PRECISION NULL, -- Total credit for this payment code
- expire_date DATE NULL, -- Expiration Date - NOT USING NOW - Getting from payment_code table always
- PRIMARY KEY (id),
- INDEX (payment_code),
- INDEX (reg_request)
-);
-
-----
-
--- Insert into management table
-INSERT INTO {prefix}management
- (
- canonical_reg_page,
- reg_org_name,
- reg_org_short,
- reg_org_address,
- reg_org_city,
- reg_org_state,
- reg_org_zip,
- reg_org_phone,
- reg_org_toll_free,
- reg_org_internal_email,
- reg_org_from_email,
- reg_payment_methods,
- reg_proc_methods,
- reg_cc_accepts,
- reg_authorize_net_login,
- reg_authorize_net_key,
- reg_authorize_net_test,
- reg_authorize_net_conf,
- reg_authorize_net_merchant_email,
- reg_merchant_solutions_acctid,
- reg_merchant_solutions_merchantpin,
- reg_merchant_solutions_test,
- reg_full_billing_info,
- reg_bill_info_req_no_charge,
- reg_bill_info_req_comp_code,
- reg_bill_info_req_cash,
- reg_bill_info_req_check,
- reg_bill_info_req_credit_card,
- reg_bill_info_req_merchant_call,
- reg_medical_info
- )
- VALUES
- (
- 'registrations', -- reg_canonical_reg_page,
- 'Gaslight Media', -- reg_org_name,
- 'GLM', -- reg_org_short,
- '120 E. Lake St.', -- reg_org_address,
- 'Petoskey', -- reg_org_city,
- 'MI', -- reg_org_state,
- '49770', -- reg_org_zip,
- '231-487-0692', -- reg_org_phone,
- '800-123-1234', -- reg_org_toll_free,
- 'internal@gaslightmedia.com', -- reg_org_internal_email,
- 'info@gaslightmedia.com', -- reg_org_from_email,
- 0, -- reg_payment_methods,
- 0, -- reg_proc_methods,
- 0, -- reg_cc_accepts,
- '', -- reg_authorize_net_login,
- '', -- reg_authorize_net_key,
- 1, -- reg_authorize_net_test,
- true, -- reg_authorize_net_conf
- '', -- reg_authorize_net_merchant_email,
- '', -- reg_merchant_solutions_acctid,
- '', -- reg_merchant_solutions_merchantpin,
- 1, -- reg_merchant_solutions_test,
- true, -- reg_full_billing_info,
- 0, -- reg_bill_info_req_no_charge,
- 0, -- reg_bill_info_req_comp_code,
- 0, -- reg_bill_info_req_cash,
- 0, -- reg_bill_info_req_check,
- 0, -- reg_bill_info_req_credit_card,
- 0, -- reg_bill_info_req_merchant_call,
- true -- reg_medical_info,
- );
-
-----
-
--- Insert into settings_terms table
-INSERT INTO {prefix}settings_terms
- (
- reg_term_registrations_name,
- reg_term_registration,
- reg_term_registration_cap,
- reg_term_registration_plur,
- reg_term_registration_plur_cap,
- reg_term_register,
- reg_term_register_cap,
- reg_term_registers,
- reg_term_registering,
- reg_term_registering_cap,
- reg_term_registered,
- reg_term_registered_cap,
- reg_term_attendee,
- reg_term_attendee_cap,
- reg_term_attendee_plur,
- reg_term_attendee_plur_cap,
- reg_term_attending,
- reg_term_attended,
- reg_term_registered_user,
- reg_term_registered_user_cap,
- reg_term_registered_user_plur,
- reg_term_registered_user_plur_cap,
- reg_term_event,
- reg_term_event_cap,
- reg_term_event_plur,
- reg_term_event_plur_cap,
- reg_term_id,
- reg_term_id_cap,
- reg_term_id_plur,
- reg_term_id_plur_cap,
- reg_term_password,
- reg_term_password_cap,
- reg_term_password_plur,
- reg_term_password_plur_cap,
- reg_term_instructor,
- reg_term_instructor_cap,
- reg_term_instructor_plur,
- reg_term_instructor_plur_cap,
- reg_term_payment_code,
- reg_term_payment_code_cap,
- reg_term_payment_code_plur,
- reg_term_payment_code_plur_cap,
- reg_term_registration_button,
- reg_term_contact_information
- )
- VALUES
- (
- 'Event Registrations', -- reg_term_registrations_name
- 'registration', -- reg_term_registration
- 'Registration', -- reg_term_registration_cap
- 'registrations', -- reg_term_registration_plur
- 'Registrations', -- reg_term_registration_plur_cap
- 'register', -- reg_term_registe
- 'Register', -- reg_term_register_cap
- 'registers', -- reg_term_registers
- 'registering', -- reg_term_registering
- 'Registering', -- reg_term_registering_cap
- 'registered', -- reg_term_registered
- 'Registered', -- reg_term_registered_cap
- 'attendee', -- reg_term_attendee
- 'Attendee', -- reg_term_attendee_cap
- 'attendees', -- reg_term_attendee_plur
- 'Attendees', -- reg_term_attendee_plur_cap
- 'attending', -- reg_term_attending
- 'attended', -- reg_term_attended
- 'user', -- reg_term_registered_user
- 'User', -- reg_term_registered_user_cap
- 'users', -- reg_term_registered_user_plur
- 'Users', -- reg_term_registered_user_plur_cap
- 'event', -- reg_term_event
- 'Event', -- reg_term_event_cap
- 'events', -- reg_term_event_plur
- 'Events', -- reg_term_event_plur_cap
- 'ID', -- reg_term_id
- 'ID', -- reg_term_id_cap
- 'IDs', -- reg_term_id_plur
- 'IDs', -- reg_term_id_plur_cap
- 'password', -- reg_term_password
- 'passwords', -- reg_term_password_cap
- 'Password', -- reg_term_password_plur
- 'Passwords', -- reg_term_password_plur_cap
- 'instructor', -- reg_term_instructor
- 'Instructor', -- reg_term_instructor_cap
- 'instructors', -- reg_term_instructor_plur
- 'Instructors', -- reg_term_instructor_plur_cap
- 'payment code', -- reg_term_payment_code
- 'Payment code', -- reg_term_payment_code_cap
- 'payment codes', -- reg_term_payment_code_plur
- 'Payment codes', -- reg_term_payment_code_plur_cap
- 'Register for Event', -- reg_term_registration_button
- 'Contact Information' -- reg_term_contact_information
- );
-
-----
-
--- Insert into misc table
-INSERT INTO {prefix}misc
- (
- reg_bulletin,
- cart_page_text,
- checkout_page_text,
- summary_page_text,
- reg_terms,
- notify_subject,
- notify_text,
- instr_notify_subject,
- instr_notify_text,
- submission_notify_subject,
- submission_notify_text,
- registrant_notify_subject,
- registrant_notify_text,
- submission_ack_subject,
- submission_ack_text,
- registrant_ack_subject,
- registrant_ack_text
- )
- VALUES
- (
- 'Registration Bulletin Text',
- 'Text for top of Cart Page',
- 'Text for top of Checkout Page',
- 'Text for top of Summary Page',
- 'Terms and Conditions',
- 'Registration Request Submitted',
- 'A registration request has just been submitted to your site.
-
-Sincerely,
-
-{$OrgName}
-{$OrgAddress}
-{$OrgCity}, {$OrgState} {$OrgZip}
-{$OrgPhone}
-{$OrgEmail}
-
-{$Summary}
-
-',
- 'Registration Submitted for {$EventName}',
- 'The following people were just registered for {$EventName}...
-
-{foreach $EventAttendees as $a}{$a.AttendeeFirstName} {$a.AttendeeLastName}
-{/foreach}
-',
- 'Registration Request Submitted',
- 'Thank you for submitting your event registration request.
-
-Below is a summary of your submission. Please contact us if you have any questions regarding this request.
-
-{$summary}',
- 'Your Registration for: {$EventName}',
- 'You have been registered for {$EventName} by {$SubmittedByFirstName} {$SubmittedByLastName}.
-
-Please let us know if you have any questions regarding your registration for this event.
-',
- 'Registration Request Updated',
- 'THIS MESSAGE TYPE IS NOT YET FUNCTIONAL
-
-The status of your registration request submitted on {$DateTimeSubmitted} has been updated to "{$Status}".
-
-Below is a copy of the request at the time it was submitted.
-
-{$Summary}',
- 'Your payment status for the event you are attending has been updated',
- 'TTHIS MESSAGE TYPE IS NOT YET FUNCTIONAL'
- );
diff --git a/setup/databaseScripts/create_database_V1.0.3.sql b/setup/databaseScripts/create_database_V1.0.3.sql
new file mode 100755
index 0000000..536f535
--- /dev/null
+++ b/setup/databaseScripts/create_database_V1.0.3.sql
@@ -0,0 +1,944 @@
+-- Gaslight Media Registration Database
+-- File Created: 01/18/2017 14:40:00
+-- Database Version: 1.0.1
+-- Database Creation Script
+--
+-- To permit each query below to be executed separately,
+-- all queries must be separated by a line with four dashes
+--
+/*
+ * General Database Organization
+ * -----------------------------
+ *
+ * management - General options and configuration - Site manager access only
+ *
+ * misc - Misc settings and text - Site owner may update
+ *
+ * payment codes - Promotional payment codes - Used with various things
+ * --> Event, Submission, Event Registration, Event Registrant, Account or global
+ *
+ * reg_event - Describes registration for that event
+ * reg_time - One record for each date/time this event has people registered - Primarily tracks attendee counts and charge totals
+ * reg_class - Type of registration for this event (one or more)
+ * reg_rates - Date range / rate for a reg class (one or more)
+ *
+ * reg_account - Describes someone who submits / pays for a registration
+ * Make these two things the same table....
+ * registrant - A person who is registered for an event
+ *
+ * reg_request - Information on a specific request for registrations
+ * reg_request_event - Event selected (one or more)
+ * reg_request_class - Class of registration (one or more)
+ * reg_request_rate - Specific registration date/rate (one or more)
+ * reg_request_registrant - Registrant (one or more)
+ *
+ * NOTE: additional fields and added fields data will be coming from the Custom Fields add-on
+ *
+ * Overall Flow
+ * ------------
+ *
+ * User selects an event
+ * If the event has available registrations
+ * User selects a date for the registration (or if only one that's selected automatically)
+ * User can log back into registrations at this point if they've been there before and have a password, create an ccount, or continue as guest ???
+ * User selects an available rate type and adds one or more registrants for that rate type
+ * User may loop back to select additional rate type(s) and registrants
+ * User may go back to date selection and request additional rate types and registrants for the addional dates
+ * User may go back to select additional dates and do registrations for those dates as above
+ * User may go back to select other events and do registrations for them as above
+ * User may select the "Cart" and deselect something added to it
+ * User may checkout
+ *
+ */
+
+/*
+ * NOTE: Anything below here may not be completed or accurate yet. I'm still working though this
+ * Lines commented out are selected for possible deletion.
+ * The INSERT statements are not up-to-date with the tables.
+ * The "config/plugin.ini" file in this plugin is also a work in progress.
+ */
+
+-- Management Options
+-- General configurationm parameters for the Registrations application
+-- Only one entry in this table!
+CREATE TABLE {prefix}management (
+ id INT NOT NULL AUTO_INCREMENT,
+ canonical_reg_page TINYTEXT NULL, -- Canonical page slug for registrations
+ -- System Owner Information
+ reg_org_name TINYTEXT NULL, -- Customer Information - Name of Organization
+ reg_org_short TINYTEXT NULL,
+ reg_org_address TINYTEXT NULL,
+ reg_org_city TINYTEXT NULL,
+ reg_org_state TINYTEXT NULL,
+ reg_org_zip TINYTEXT NULL,
+ reg_org_phone TINYTEXT NULL,
+ reg_org_toll_free TINYTEXT NULL,
+ reg_org_internal_email TINYTEXT NULL,
+ reg_org_from_email TINYTEXT NULL,
+ reg_payment_methods SMALLINT NULL, -- Payment methods available for all registrations - Bitmap - see payment_method in plugin.ini
+ reg_proc_methods SMALLINT NULL, -- Credit Cart payment processing methods available - Bitmap - see proc_method in plugin.ini
+ reg_cc_accepts SMALLINT NULL, -- Credit Cards Accepted - Bitmap - See credit_card in plugin.ini
+ -- Authorize.net Credentials
+ reg_authorize_net_login TINYTEXT NULL,
+ reg_authorize_net_key TINYTEXT NULL,
+ reg_authorize_net_test TINYINT NULL, -- Authorize.net test mode - List - see proc_test_mode in plugin.ini
+ reg_authorize_net_conf BOOLEAN NULL, -- Flag to send payment confirmation Email from Authorize.net
+ reg_authorize_net_merchant_email TINYTEXT NULL, -- E-Mail Authorize.net will send copy of confirmation E-Mail
+ reg_authorize_net_merchant_seal TEXT NULL, -- Authorize.net Verified Merchant Seal code
+ -- Merchant Solutions Credentials
+ reg_merchant_solutions_acctid TINYTEXT NULL, -- Merchant Solutions credentials
+ reg_merchant_solutions_merchantpin TINYTEXT NULL,
+ reg_merchant_solutions_test TINYINT NULL, -- Merchant Solutions test mode - List - see proc_test_mode in plugin.ini
+ reg_merchant_solutions_conf BOOLEAN NULL, -- Flag to send payment confirmation Email
+ reg_merchant_solutions_merchant_email TINYTEXT NULL, -- Merchant Solutions will send copy of confirmation E-Mail
+ -- PayPal Credentials
+ reg_paypal_clientid TINYTEXT NULL, -- PayPal Client ID
+ reg_paypal_secret TINYTEXT NULL, -- PayPal Secret
+ reg_paypal_sandbox_clientid TINYTEXT NULL, -- PayPal Client ID
+ reg_paypal_sandbox_secret TINYTEXT NULL, -- PayPal Secret
+ reg_paypal_test TINYINT NULL, -- PayPal test mode - List - see
+ -- Billing settings
+ reg_full_billing_info BOOLEAN NULL, -- Always request full billing information in checkout page regardless of the following settings
+ reg_bill_info_requested SMALLINT 32767, -- Billing information fields to display on checkout page
+ reg_bill_info_req_no_charge SMALLINT NULL, -- Bitmap of fields to use in checkout for these types of payments - See billing_field in plugin.conf
+ reg_bill_info_req_comp_code SMALLINT NULL,
+ reg_bill_info_req_cash SMALLINT NULL,
+ reg_bill_info_req_check SMALLINT NULL,
+ reg_bill_info_req_credit_card SMALLINT NULL,
+ reg_bill_info_req_merchant_call SMALLINT NULL,
+ -- Misc Options
+ reg_request_hold_days SMALLINT NULL, -- Number of days past last update that a request will be retained in "CART" status.
+ reg_account_hold_days SMALLINT NULL, -- Number of days past last update that an account will be retained when there are no requests or registrants referring to it.
+ reg_not_submitted_dialog BOOLEAN NULL, -- Flag to show page not submitted dialog boxes
+ reg_medical_info BOOLEAN NULL, -- This site can ask for "Medical Info" - set in main category of an event
+ reg_show_navigation_aids BOOLEAN NULL, -- No, not marine navigational aids, this enables additional text, arrows, etc to direct a user to do something specific that would not normally be required.
+ reg_show_attendees_on_reg_page BOOLEAN NULL, -- Flag to show a list of attendees on the registraitons page for an event
+ reg_show_select_by_code BOOLEAN NULL, -- Flag to show an Event Code entry form on Registrations Event List page
+ PRIMARY KEY (id)
+);
+
+----
+
+-- Terms used in site modifiable on Management page in admin - Only 1 entry in this table
+-- Terms in this table should be all self-explanatory
+CREATE TABLE {prefix}settings_terms (
+ id INT NOT NULL AUTO_INCREMENT,
+ reg_term_registrations_name TINYTEXT NULL, -- Term "Event Registration"
+ reg_term_registration TINYTEXT NULL,
+ reg_term_registration_cap TINYTEXT NULL,
+ reg_term_registration_plur TINYTEXT NULL,
+ reg_term_registration_plur_cap TINYTEXT NULL,
+ reg_term_register TINYTEXT NULL,
+ reg_term_register_cap TINYTEXT NULL,
+ reg_term_registers TINYTEXT NULL, -- Intransitive verb of register
+ reg_term_registering TINYTEXT NULL,
+ reg_term_registering_cap TINYTEXT NULL,
+ reg_term_registered TINYTEXT NULL,
+ reg_term_registered_cap TINYTEXT NULL,
+ reg_term_attendee TINYTEXT NULL,
+ reg_term_attendee_cap TINYTEXT NULL,
+ reg_term_attendee_plur TINYTEXT NULL,
+ reg_term_attendee_plur_cap TINYTEXT NULL,
+ reg_term_attending TINYTEXT NULL,
+ reg_term_attended TINYTEXT NULL,
+ reg_term_registered_user TINYTEXT NULL,
+ reg_term_registered_user_cap TINYTEXT NULL,
+ reg_term_registered_user_plur TINYTEXT NULL,
+ reg_term_registered_user_plur_cap TINYTEXT NULL,
+ reg_term_event TINYTEXT NULL,
+ reg_term_event_cap TINYTEXT NULL,
+ reg_term_event_plur TINYTEXT NULL,
+ reg_term_event_plur_cap TINYTEXT NULL,
+ reg_term_id TINYTEXT NULL,
+ reg_term_id_cap TINYTEXT NULL,
+ reg_term_id_plur TINYTEXT NULL,
+ reg_term_id_plur_cap TINYTEXT NULL,
+ reg_term_level TINYTEXT NULL,
+ reg_term_level_cap TINYTEXT NULL,
+ reg_term_level_plur TINYTEXT NULL,
+ reg_term_level_plur_cap TINYTEXT NULL,
+ reg_term_rate TINYTEXT NULL,
+ reg_term_rate_cap TINYTEXT NULL,
+ reg_term_rate_plur TINYTEXT NULL,
+ reg_term_rate_plur_cap TINYTEXT NULL,
+ reg_term_password TINYTEXT NULL,
+ reg_term_password_cap TINYTEXT NULL,
+ reg_term_password_plur TINYTEXT NULL,
+ reg_term_password_plur_cap TINYTEXT NULL,
+ reg_term_instructor TINYTEXT NULL,
+ reg_term_instructor_cap TINYTEXT NULL,
+ reg_term_instructor_plur TINYTEXT NULL,
+ reg_term_instructor_plur_cap TINYTEXT NULL,
+ reg_term_payment_code TINYTEXT NULL,
+ reg_term_payment_code_cap TINYTEXT NULL,
+ reg_term_payment_code_plur TINYTEXT NULL,
+ reg_term_payment_code_plur_cap TINYTEXT NULL,
+ reg_term_registration_button TINYTEXT NULL,
+ reg_term_contact_information TINYTEXT NULL,
+ reg_term_button_event_list TINYTEXT NULL,
+ reg_term_button_login_or_create TINYTEXT NULL,
+ reg_term_button_create_account TINYTEXT NULL,
+ reg_term_button_login TINYTEXT NULL,
+ reg_term_button_logout TINYTEXT NULL,
+ reg_term_button_add_attendee TINYTEXT NULL,
+ reg_term_button_save_attendee TINYTEXT NULL,
+ reg_term_button_attendee_page_continue TINYTEXT NULL,
+ reg_term_button_apply_comp_code TINYTEXT NULL,
+ reg_term_button_cart_page_continue TINYTEXT NULL,
+ reg_term_button_checkout_page_submit TINYTEXT NULL,
+ PRIMARY KEY (id)
+);
+
+----
+
+-- Misc system-wide customer configurable configuration
+-- Various text and flags to be configured by customer
+-- Only one entry in this table!
+CREATE TABLE {prefix}misc (
+ id INT NOT NULL AUTO_INCREMENT,
+ reg_bulletin TEXT NULL, -- Text to display at top of first registration page
+ cart_page_text TEXT NULL, -- Text to display at top of cart page
+ checkout_page_text TEXT NULL, -- Text to display at top of checkout page
+ summary_page_text TEXT NULL, -- Text to display at top of summary page (after checkout)
+ reg_terms TEXT NULL, -- Registration terms and conditions
+ notify_subject TEXT NULL, -- Subject of notification E-Mail to site owner
+ notify_text TEXT NULL, -- Notification E-Mail text for site owner
+ instr_notify_subject TEXT NULL, -- Subject of notification E-Mail to instructor
+ instr_notify_text TEXT NULL, -- Notification E-Mail text for instructor
+ submission_notify_subject TEXT NULL, -- Subject of notification E-Mail to person submitting the registrations
+ submission_notify_text TEXT NULL, -- Notification E-Mail text to person submitting the registrations
+ registrant_notify_subject TEXT NULL, -- Subject of notification E-Mail to registrant
+ registrant_notify_text TEXT NULL, -- Text of notification E-Mail to registrant
+ submission_ack_subject TEXT NULL, -- Subject of acknowledgement E-Mail to person submitting the registrations
+ submission_ack_text TEXT NULL, -- Text of acknowledgement E-Mail text to person submitting the registrations
+ registrant_ack_subject TEXT NULL, -- Subject of acknowledgement E-Mail to registrant
+ registrant_ack_text TEXT NULL, -- Text of acknowledgement E-Mail to registrant
+ PRIMARY KEY (id)
+);
+
+----
+
+-- Payment Codes
+-- Promotional payment codes for free/discounted payment
+CREATE TABLE {prefix}payment_code (
+ id INT NOT NULL AUTO_INCREMENT,
+ code_type TINYINT NULL, -- Type of adjustment - Free only to start with - See pay_code_type in plugin.ini
+ ref_type TINYINT NULL, -- See payment_ref_type in plugin.ini
+ ref_dest INT NULL, -- Pointer to the specific entity of ref_type
+ code TINYTEXT NULL, -- Text code user must enter to use
+ amount FLOAT, -- Amount of discount if not type "Free" - Either $ amount or percent
+ expire_date DATE NULL, -- Expiration Date
+ descr TEXT NULL,
+ PRIMARY KEY (id),
+ INDEX (ref_dest),
+ INDEX (code(10))
+);
+
+----
+
+-- Registration event specific information
+-- One record for each event in Events add-on
+-- Only created when an event is selected to offer registrations
+CREATE TABLE {prefix}reg_event (
+ id INT NOT NULL AUTO_INCREMENT,
+ event INT NULL, -- Pointer to event in Events add-on - 0 (false) if stand-alone regsitrations event
+ event_name TINYTEXT NULL, -- Name of Event so it will always be in the cart data
+ event_code TINYTEXT NULL, -- A short code used to reference this event - can be used to directly select an event to register for
+ notify_email TINYTEXT NULL, -- E-Mail addresses to receive notification of a registration other than org_internal_email in management, comma separated
+ admin_active BOOLEAN NULL, -- Active flag for admin from Events - If logged in Admin user for this event and this is true then admin user may enter registrations even if active is off.
+ active BOOLEAN NULL, -- Active flag to indicate that this event is available for registrations and notifications
+ time_specific BOOLEAN NULL, -- Registration for this event is date/time specific. If not can attend any date/time of event.
+ not_included_in_lists BOOLEAN NULL, -- This registration event is not displayed in lists of registration events.
+ attendees BOOLEAN NULL, -- Registration requires attendees - Otherwise the person submitting the registration is the registrant
+ attendee_max MEDIUMINT NULL, -- Attendee limit - 0 = unlimited
+ attendee_max_per_reg TINYINT NULL, -- Maximum attendees per registration submission - 0 = unlimited
+ reg_hold_minutes MEDIUMINT NULL, -- Number of minutes hold time for an inactive cart before registrant count hold expires (after which cart attempts to hold again on next access)
+ cart_hold_days MEDIUMINT NULL, -- NO LONGER IN USE - Number of days hold time for inactive cart before cart is purged
+ reg_hours_before MEDIUMINT NULL, -- Number of hours before an event that is the latest a registration may be submitted.
+ registration_account_options SMALLINT NULL, -- Bitmap of how user accounts may be used for this event - See registration_account_option in plugin.ini
+ payment_methods SMALLINT NULL, -- Bitmap of payment methods available to users for this event - See payment_method in plugin.ini
+ restricted_payment_methods SMALLINT NULL, -- Bitmap of restricted (admin use only) payment methods for this event - see payment_method
+ descr TEXT NULL, -- Registrations specific description field for this event
+ terms TEXT NULL, -- Terms and Conditions for registration
+ first_datetime DATETIME NULL, -- Start of first listed date/time for this event
+ last_datetime DATETIME NULL, -- Start of last listed date/time for this event
+ reg_file TINYTEXT NULL, -- Name of a downloadable file
+ reg_file_title TINYTEXT NULL, -- Title for downloadable file
+ form_revision SMALLINT NULL, -- Current MagicForm form revision
+ notes TEXT NULL, -- System operator's notes for this event - Not visible to users
+ -- Fields below are for stand-alonge registrations events only.
+ -- If not stand-alone, this data comes from the event.
+ image TINYTEXT NULL, -- Event Image
+ cost TINYTEXT NULL, -- Description of event cost
+ hide_address BOOLEAN NULL, -- Option to hide address on front-end
+ use_member_location BOOLEAN NULL, -- Use location of the member (if provided) rather than location table data
+ member INT NULL, -- Set location of the event to another member
+ location_name TINYTEXT NULL, -- Name of location
+ address TINYTEXT NULL, -- Street Address
+ city INT NULL, -- Pointer to city - references main plugin city table
+ state TINYTEXT NULL, -- Two character state abbreviation
+ zip TINYTEXT NULL, -- ZIP/Postal code
+ country TINYTEXT NULL, -- Country Code
+ lat FLOAT NULL, -- Latitude of location
+ lon FLOAT NULL, -- Longitude of location
+ region INT NULL, -- Pointer to Region - references main plugin region table
+ phone TINYTEXT NULL, -- Location Phone #
+ url TINYTEXT NULL, -- Location URL
+ email TINYTEXT NULL, -- Location E-Mail Address
+ contact_addon_id INT NULL, -- ID of Contact from contact add-on (optional and if available)
+ contact_fname TINYTEXT NULL, -- Contact first name for this location (optional)
+ contact_lname TINYTEXT NULL, -- Contact last name for this location (optional)
+ contact_phone TINYTEXT NULL, -- Contact phone for this location (optional)
+ contact_email TINYTEXT NULL, -- Contact E-Mail address (optional)
+ PRIMARY KEY (id),
+ INDEX (event),
+ INDEX (event_code(10))
+);
+
+----
+
+-- Registration Event Time - Information and summary data for a specific event instance (relates to a particular time record in events)
+-- A pseudo entry is created if registration is not date/time sensitive for this event. The pseudo entry does not point to an event time.
+-- These are created the first time a person tries to register for an event instance (time)
+-- One or more for each event
+CREATE TABLE {prefix}reg_time (
+ id INT NOT NULL AUTO_INCREMENT,
+ active BOOLEAN NULL, -- Flag. True if registrations is available for this time
+ non_time_specific BOOLEAN NULL, -- Flag. True if this is a pseudo time for non-time-specific events - Other informational times for the event will have this flag off
+ reg_event INT NULL, -- Pointer to reg_event table
+ event_time INT NULL, -- ID of events times table entry in Events add-on - If false (0), then this is a pseudo entry to use for all registrations (non-date/time specific)
+ start_datetime DATETIME NULL, -- Date and time when event instance starts
+ end_datetime DATETIME NULL, -- Date and time when event instance ends
+ all_day BOOLEAN NULL, -- All Day flag - Informational
+ attendees BOOLEAN NULL, -- Flag if tracking attendees or if only one per registration submission (registers account submitting) - get from reg_event
+ attendee_max MEDIUMINT NULL, -- Attendee count limit - 0 = unlimited - get from reg_event record
+ attendee_count MEDIUMINT NULL, -- Current attendee count - calculated on the fly and stored here for reference
+ attendees_pending MEDIUMINT NULL, -- Current number of attendees for this time in active pending carts (Not checked out and attendees slots held)
+ attendees_available MEDIUMINT NULL, -- Currently available attendee count (limit - registered - pending)
+ total_base_charge DOUBLE NULL, -- Total base charges
+ total_per_attendee DOUBLE NULL, -- Total per-attendee charges
+ total_other DOUBLE NULL, -- Total other charges (meals, extras, fees, ...)
+ total_taxes DOUBLE NULL, -- Total taxes charged
+ total_charges DOUBLE NULL, -- Total charges (sum of all above)
+ total_discounts DOUBLE NULL, -- Total discounts of all types (applied payment codes, etc...)
+ total_payments DOUBLE NULL, -- Total net payments (total charges - total discounts)
+ descr TEXT NULL, -- Optional description field for this time entry
+ PRIMARY KEY (id),
+ INDEX (reg_event),
+ INDEX (event_time),
+ INDEX (start_datetime)
+);
+
+----
+
+-- Pending Attendees - In carts but not checked out
+-- Attendee counts may be held for a particular reg_time entry for carts that have not been checked out
+-- These are held for reg_event reg_hold_minutes, afterwhich they are timed out and removed from this table
+-- Cart entries are given the ID's for these entries when a hold is requested, if the entry is gone, the hold has expired
+CREATE TABLE {prefix}reg_time_pending (
+ id INT NOT NULL AUTO_INCREMENT,
+ reg_event INT NULL, -- Pointer to reg_event table
+ reg_time INT NULL, -- ID of time record
+ registrant INT NULL, -- ID of reg_request_registrant record --
+ expire_time DATETIME NULL, -- Time at which this hold expires
+ PRIMARY KEY (id),
+ INDEX (reg_event),
+ INDEX (reg_time)
+);
+
+----
+
+-- Registration Class - Type of registration for a specific event - Equates to "Rate Options" in the old system
+-- One or more for each event
+CREATE TABLE {prefix}reg_class (
+ id INT NOT NULL AUTO_INCREMENT,
+ reg_event INT NULL, -- Pointer to reg_event table
+ name TINYTEXT NULL, -- Name of this registration type
+ descr TEXT NULL, -- Description
+ sort_order INT DEFAULT 999, -- Sort order for display in Front-End
+ PRIMARY KEY (id),
+ INDEX (reg_event)
+);
+
+----
+
+-- Rates and dates for a particular reg_class
+-- One or more per reg_class - **** Days should not overlap for a particular reg_class
+CREATE TABLE {prefix}reg_rate (
+ id INT NOT NULL AUTO_INCREMENT,
+ reg_event INT NULL, -- Pointer to reg_event table
+ reg_class INT NULL, -- Pointer to reg_class table
+ name TINYTEXT NULL, -- Name of this rate
+ start_days INT NULL, -- # of days before event time rate becomes available - may be selected as a date then converted for storage
+ end_days INT NULL, -- # of days before event time rate becomes unavailable
+ base_rate FLOAT, -- Base rate to register
+ per_registrant FLOAT, -- Rate per registrant
+ registrant_credits TINYINT NULL, -- Number of registrants included in base rate
+ PRIMARY KEY (id),
+ INDEX (reg_event),
+ INDEX (reg_class)
+);
+
+----
+
+-- Notifications
+-- None or more for each reg event
+CREATE TABLE {prefix}reg_notification (
+ id INT NOT NULL AUTO_INCREMENT,
+ reg_event INT NULL, -- Pointer to reg_event table
+ name TINYTEXT NULL, -- Name of this notification
+ notification_days INT NULL, -- # of days before or after event that notification takes place (- before, + after)
+ message TEXT NULL, -- Content of message (uses template parameters to merge event/attendee data)
+ PRIMARY KEY (id),
+ INDEX (reg_event)
+);
+
+----
+
+-- Notification Queue
+CREATE TABLE {prefix}notification_queue (
+ id INT NOT NULL AUTO_INCREMENT,
+ reg_notification INT NOT NULL, -- Pointer to the reg_notification table
+ account INT NOT NULL, -- Pointer to the account table
+ queued_time DATETIME NOT NULL, -- Creation time
+ processed_time DATETIME NULL, -- The time this queue was processed. (sent out)
+ to_email TINYTEXT NOT NULL, -- The To email address
+ from_email TINYTEXT NOT NULL, -- The From email address
+ subject TINYTEXT NOT NULL, -- The subject
+ html_message TEXT NOT NULL, -- The complete html message
+ PRIMARY KEY (id)
+);
+
+----
+
+-- An account for a person submitting a registration or a registrant for an event
+-- Depending on the use of these entries may not have all data included
+-- A single account may be referenced as a person submitting registrations and/or a person registered for an event
+CREATE TABLE {prefix}account (
+ id INT NOT NULL AUTO_INCREMENT,
+ active BOOLEAN NULL, -- Is active flag (may be accessed or used) - default is true
+ validated BOOLEAN NULL, -- Flag indicating that the account has been validated - Set to false when recovering password
+ validation_code TINYTEXT NULL, -- Validation code and timestamp ("{validation code}-{timestamp}) - Clear this after validation
+ registered_by INT NULL, -- Account *** THIS FIELD NEEDS TO BE DELETED ***
+ member_id TINYTEXT NULL, -- Free-form field for a member ID (not a GLM Associate member ID - See "contact_member_id" below)
+ fname TINYTEXT NULL, -- Account primary address
+ lname TINYTEXT NULL,
+ org TINYTEXT NULL,
+ title TINYTEXT NULL,
+ addr1 TINYTEXT NULL,
+ addr2 TINYTEXT NULL,
+ city TINYTEXT NULL,
+ state TINYTEXT NULL,
+ zip TINYTEXT NULL,
+ country TINYTEXT NULL,
+ phone TINYTEXT NULL,
+ fax TINYTEXT NULL,
+ bill_fname TINYTEXT NULL, -- Last used billing infodeletermation - Also stored in each registration request
+ bill_lname TINYTEXT NULL,
+ bill_org TINYTEXT NULL,
+ bill_title TINYTEXT NULL,
+ bill_addr1 TINYTEXT NULL,
+ bill_addr2 TINYTEXT NULL,
+ bill_city TINYTEXT NULL,
+ bill_state TINYTEXT NULL,
+ bill_zip TINYTEXT NULL,
+ bill_country TINYTEXT NULL,
+ bill_phone TINYTEXT NULL,
+ bill_fax TINYTEXT NULL,
+ email TINYTEXT NULL,
+ password TINYTEXT NULL, -- Crypted password for login back into this account
+ email_ok BOOLEAN NULL,
+ is_member BOOLEAN NULL, -- Is a member of the entity that owns the site
+ customer_profile_id TINYTEXT NULL, -- Stored Credit Card customer profile ID
+ payment_profile_id TINYTEXT NULL, -- Stored Credit Card payment profile ID
+ payment_profile_card TINYTEXT NULL, -- Stored Credit Card last card digits
+ contact_id INT NULL, -- Pointer to GLM Associate member contact record if account is for a member contact
+ contact_member_id INT NULL, -- Pointer to GLM Associate Member for this contact
+ contact_fname TINYTEXT NULL,
+ contact_lname TINYTEXT NULL,
+ contact_org TINYTEXT NULL,
+ contact_title TINYTEXT NULL,
+ contact_addr1 TINYTEXT NULL,
+ contact_addr2 TINYTEXT NULL,
+ contact_city TINYTEXT NULL,
+ contact_state TINYTEXT NULL,
+ contact_zip TINYTEXT NULL,
+ contact_country TINYTEXT NULL,
+ contact_phone TINYTEXT NULL,
+ contact_fax TINYTEXT NULL,
+ contact_email TINYTEXT NULL,
+ contact_email_ok BOOLEAN NULL,
+ guardian TINYTEXT NULL,
+ emer_contact TINYTEXT NULL,
+ emer_phone TINYTEXT NULL,
+ med_history TINYTEXT NULL,
+ allergy_med TINYTEXT NULL,
+ date_created DATE NULL,
+ notes TEXT NULL, -- System operator's notes for this account - not visible to account owner
+ user_trace_info TINYTEXT NULL, -- IP Address of user computer and timestamp of last update
+ PRIMARY KEY (id),
+ INDEX (registered_by),
+ INDEX (member_id(10)),
+ INDEX (fname(10)),
+ INDEX (lname(10)),
+ INDEX (org(10)),
+ INDEX (city(10)),
+ INDEX (state(5)),
+ INDEX (zip(5)),
+ INDEX (email(10)),
+ INDEX (contact_id)
+);
+
+----
+
+-- A request for registration
+-- Has one or more reg_detail records associated with it
+CREATE TABLE {prefix}reg_request (
+ id INT NOT NULL AUTO_INCREMENT,
+ account INT NULL, -- Pointer to user account (reg_account) who submitted the registrations. If 0 then guest request (prior to checkout)
+ validated BOOLEAN NULL, -- Flag that indicates if request passed last validation with checkRegistrationRequest()
+ validation_message TEXT NULL, -- Reasons that request did not pass validation with checkRegistrationRequest() - Serialized array
+ bill_fname TINYTEXT NULL, -- Billing information used for this registration submission - Updates account billing address - Kept here for each request
+ bill_lname TINYTEXT NULL,
+ bill_org TINYTEXT NULL,
+ bill_title TINYTEXT NULL,
+ bill_addr1 TINYTEXT NULL,
+ bill_addr2 TINYTEXT NULL,
+ bill_city TINYTEXT NULL,
+ bill_state TINYTEXT NULL,
+ bill_zip TINYTEXT NULL,
+ bill_country TINYTEXT NULL,
+ bill_phone TINYTEXT NULL,_class
+ bill_email TINYTEXT NULL,
+ date_submitted DATE NULL, -- Date of final submission (checkout complete)
+ pay_method INT NULL, -- See payment_method in plugin.ini
+ payment_code TINYTEXT NULL, -- Payment_code text (comp code) - if submitted and validated
+ status SMALLINT NULL, -- See submission_status in plugin.ini
+ total DOUBLE PRECISION NULL, -- Total charge including all fees and taxes
+ total_discounts DOUBLE PRECISION NULL, -- Total of all comps and discounts
+ registrants SMALLINT NULL, -- Total number of registrants in this cart
+ cc_type TINYINT NULL, -- Credit Card type (if used) - See credit_card in plugin.ini
+ cc_name TINYTEXT NULL, -- Name on Credit Card or Name on Check
+ cc_numb TINYTEXT NULL, -- Credit Card Number or Check Number
+ cc_exp TINYTEXT NULL,
+ cc_cvv TINYTEXT NULL,
+ cc_conf TINYTEXT NULL, -- Confirmation code back from card processor
+ cc_proc_mesg TINYTEXT NULL, -- Message received from payment processor
+ summary TEXT NULL, -- HTML summary of cart contents, costs and payment - Use same HTML displayed to user
+ mf_data TEXT NULL, -- Any MagicForm data associated with registrant
+ notes TEXT NULL, -- System operator's notes for this registration request
+ user_trace_info TEXT NULL, -- IP Address of user computer and timestamp
+ date_created DATETIME NULL, -- Date request was first created
+ last_update DATETIME NULL, -- Last update date/time - Used for timing out pending carts and attendee counts
+ PRIMARY KEY (id),
+ INDEX (account),
+ INDEX (date_submitted)
+);
+
+----
+
+-- Registration for a specific event
+-- Has one or more reg_selected_rate records associated with it
+CREATE TABLE {prefix}reg_request_event (
+ id INT NOT NULL AUTO_INCREMENT,
+ reg_request INT NULL, -- Pointer to reg_request table
+ reg_event INT NULL, -- Pointer to reg_event
+ event_name TINYTEXT NULL, -- Name of Event so it will always be in the cart data
+ notes TEXT NULL, -- System operator's notes for this registration request
+ PRIMARY KEY (id),
+ INDEX (reg_request),
+ INDEX (reg_event)
+);
+
+----
+
+-- A particular reg_class selected
+-- Has one or more reg_request_rate records associated with it
+CREATE TABLE {prefix}reg_request_class (
+ id INT NOT NULL AUTO_INCREMENT,
+ reg_event INT NULL, -- Pointer to reg_event entry
+ reg_request INT NULL, -- Pointer to the registration request record
+ reg_request_event INT NULL, -- Pointer to reg_request_event table entry
+ class INT NULL, -- Pointer to event reg_class table - False (0) if registration class no longer exits
+ class_name TINYTEXT NULL, -- Name of event class at the time selected
+ notes TEXT NULL, -- System operator's notes for this registration request
+ PRIMARY KEY (id),
+ INDEX (reg_event),
+ INDEX (reg_request_event)
+);
+
+----
+
+-- A particular reg_rate selected
+-- Has one or more reg_request_registrant records associated with it
+CREATE TABLE {prefix}reg_request_rate (
+ id INT NOT NULL AUTO_INCREMENT,
+ reg_event INT NULL, -- Pointer to reg_event entry
+ reg_request INT NULL, -- Pointer to the registration request record
+ reg_request_event INT NULL, -- Pointer to reg_request_event table entry
+ reg_request_class INT NULL, -- Pointer to reg_request_class table entry
+ rate INT NULL, -- Pointer to event reg_rate table - False (0) if registration rate no longer exists
+ rate_name TINYTEXT NULL, -- Name of event class rate at the time selected
+ base_rate FLOAT, -- Base rate at time of registration
+ per_registrant FLOAT, -- Per Registrant Rate at time of registration
+ registrant_credits TINYINT NULL, -- Number of registrants included in base rate at time of registration
+ notes TEXT NULL, -- System operator's notes for this registration request
+ PRIMARY KEY (id),
+ INDEX (reg_event),
+ INDEX (reg_request_event),
+ INDEX (reg_request_class)
+);
+
+----
+
+-- A specific registrant for a selected registration rate
+CREATE TABLE {prefix}reg_request_registrant (
+ id INT NOT NULL AUTO_INCREMENT,
+ account INT NULL, -- Pointer to the account entry for the person being registered - False (0) if account no longer exists or registrant account not needed
+ reg_event INT NULL, -- Pointer to reg_event entry
+ reg_time INT NULL, -- Pointer reg_time entry
+ event_datetime DATETIME NULL, -- Date and time of event time selected so it will always be in the cart
+ reg_request INT NULL, -- Pointer to the registration request record
+ reg_request_event INT NULL, -- Pointer to reg_request_event table entry
+ reg_request_class INT NULL, -- Pointer to reg_request_class table entry
+ reg_request_rate INT NULL, -- Pointer to reg_request_rate table entry
+ not_attending BOOLEAN DEFAULT false, -- Flag to say if registrant is not attending - set to true when not attending
+ fname TINYTEXT NULL, -- First name of registrant at the time of selection
+ lname TINYTEXT NULL, -- Last name of registrant at the time of selection
+ notes TEXT NULL, -- System operator's notes for this registration request
+ PRIMARY KEY (id),
+ INDEX (account),
+ INDEX (reg_event),
+ INDEX (reg_time),
+ INDEX (reg_request),
+ INDEX (reg_request_event),
+ INDEX (reg_request_class),
+ INDEX (reg_request_rate)
+);
+
+----
+
+-- A specific use of a payment code in this request
+CREATE TABLE {prefix}reg_request_pay_code (
+ id INT NOT NULL AUTO_INCREMENT,
+ payment_code INT NULL, -- Pointer to payment code
+ code TINYTEXT NULL, -- Copy of Payment Code text in case payment code is deleted or changed
+ reg_request INT NULL, -- Pointer to the registration request record
+ credit DOUBLE PRECISION NULL, -- Total credit for this payment code
+ expire_date DATE NULL, -- Expiration Date - NOT USING NOW - Getting from payment_code table always
+ PRIMARY KEY (id),
+ INDEX (payment_code),
+ INDEX (reg_request)
+);
+
+----
+
+-- Insert into management table
+INSERT INTO {prefix}management
+ (
+ canonical_reg_page,
+ reg_org_name,
+ reg_org_short,
+ reg_org_address,
+ reg_org_city,
+ reg_org_state,
+ reg_org_zip,
+ reg_org_phone,
+ reg_org_toll_free,
+ reg_org_internal_email,
+ reg_org_from_email,
+ reg_payment_methods,
+ reg_proc_methods,
+ reg_cc_accepts,
+ reg_authorize_net_login,
+ reg_authorize_net_key,
+ reg_authorize_net_test,
+ reg_authorize_net_conf,
+ reg_authorize_net_merchant_email,
+ reg_merchant_solutions_acctid,
+ reg_merchant_solutions_merchantpin,
+ reg_merchant_solutions_test,
+ reg_full_billing_info,
+ reg_bill_info_req_no_charge,
+ reg_bill_info_req_comp_code,
+ reg_bill_info_req_cash,
+ reg_bill_info_req_check,
+ reg_bill_info_req_credit_card,
+ reg_bill_info_req_merchant_call,
+ reg_medical_info,
+ reg_show_select_by_code
+ )
+ VALUES
+ (
+ 'registrations', -- reg_canonical_reg_page,
+ 'Gaslight Media', -- reg_org_name,
+ 'GLM', -- reg_org_short,
+ '120 E. Lake St.', -- reg_org_address,
+ 'Petoskey', -- reg_org_city,
+ 'MI', -- reg_org_state,
+ '49770', -- reg_org_zip,
+ '231-487-0692', -- reg_org_phone,
+ '800-123-1234', -- reg_org_toll_free,
+ 'internal@gaslightmedia.com', -- reg_org_internal_email,
+ 'info@gaslightmedia.com', -- reg_org_from_email,
+ 0, -- reg_payment_methods,
+ 0, -- reg_proc_methods,
+ 0, -- reg_cc_accepts,
+ '', -- reg_authorize_net_login,
+ '', -- reg_authorize_net_key,
+ 1, -- reg_authorize_net_test,
+ true, -- reg_authorize_net_conf
+ '', -- reg_authorize_net_merchant_email,
+ '', -- reg_merchant_solutions_acctid,
+ '', -- reg_merchant_solutions_merchantpin,
+ 1, -- reg_merchant_solutions_test,
+ true, -- reg_full_billing_info,
+ 0, -- reg_bill_info_req_no_charge,
+ 0, -- reg_bill_info_req_comp_code,
+ 0, -- reg_bill_info_req_cash,
+ 0, -- reg_bill_info_req_check,
+ 0, -- reg_bill_info_req_credit_card,
+ 0, -- reg_bill_info_req_merchant_call,
+ true, -- reg_medical_info,
+ true -- reg_show_select_by_code
+ );
+
+----
+
+-- Insert into settings_terms table
+INSERT INTO {prefix}settings_terms
+ (
+ reg_term_registrations_name,
+ reg_term_registration,
+ reg_term_registration_cap,
+ reg_term_registration_plur,
+ reg_term_registration_plur_cap,
+ reg_term_register,
+ reg_term_register_cap,
+ reg_term_registers,
+ reg_term_registering,
+ reg_term_registering_cap,
+ reg_term_registered,
+ reg_term_registered_cap,
+ reg_term_attendee,
+ reg_term_attendee_cap,
+ reg_term_attendee_plur,
+ reg_term_attendee_plur_cap,
+ reg_term_attending,
+ reg_term_attended,
+ reg_term_registered_user,
+ reg_term_registered_user_cap,
+ reg_term_registered_user_plur,
+ reg_term_registered_user_plur_cap,
+ reg_term_event,
+ reg_term_event_cap,
+ reg_term_event_plur,
+ reg_term_event_plur_cap,
+ reg_term_id,
+ reg_term_id_cap,
+ reg_term_id_plur,
+ reg_term_id_plur_cap,
+ reg_term_level,
+ reg_term_level_cap,
+ reg_term_level_plur,
+ reg_term_level_plur_cap,
+ reg_term_rate,
+ reg_term_rate_cap,
+ reg_term_rate_plur,
+ reg_term_rate_plur_cap,
+ reg_term_password,
+ reg_term_password_cap,
+ reg_term_password_plur,
+ reg_term_password_plur_cap,
+ reg_term_instructor,
+ reg_term_instructor_cap,
+ reg_term_instructor_plur,
+ reg_term_instructor_plur_cap,
+ reg_term_payment_code,
+ reg_term_payment_code_cap,
+ reg_term_payment_code_plur,
+ reg_term_payment_code_plur_cap,
+ reg_term_registration_button,
+ reg_term_contact_information
+ reg_term_button_event_list,
+ reg_term_button_login_or_create,
+ reg_term_button_create_account,
+ reg_term_button_login,
+ reg_term_button_logout,
+ reg_term_button_add_attendee,
+ reg_term_button_save_attendee,
+ reg_term_button_attendee_page_continue,
+ reg_term_button_apply_comp_code,
+ reg_term_button_cart_page_continue,
+ reg_term_button_checkout_page_submit
+ )
+ VALUES
+ (
+ 'Event Registrations', -- reg_term_registrations_name
+ 'registration', -- reg_term_registration
+ 'Registration', -- reg_term_registration_cap
+ 'registrations', -- reg_term_registration_plur
+ 'Registrations', -- reg_term_registration_plur_cap
+ 'register', -- reg_term_register
+ 'Register', -- reg_term_register_cap
+ 'registers', -- reg_term_registers
+ 'registering', -- reg_term_registering
+ 'Registering', -- reg_term_registering_cap
+ 'registered', -- reg_term_registered
+ 'Registered', -- reg_term_registered_cap
+ 'attendee', -- reg_term_attendee
+ 'Attendee', -- reg_term_attendee_cap
+ 'attendees', -- reg_term_attendee_plur
+ 'Attendees', -- reg_term_attendee_plur_cap
+ 'attending', -- reg_term_attending
+ 'attended', -- reg_term_attended
+ 'user', -- reg_term_registered_user
+ 'User', -- reg_term_registered_user_cap
+ 'users', -- reg_term_registered_user_plur
+ 'Users', -- reg_term_registered_user_plur_cap
+ 'event', -- reg_term_event
+ 'Event', -- reg_term_event_cap
+ 'events', -- reg_term_event_plur
+ 'Events', -- reg_term_event_plur_cap
+ 'ID', -- reg_term_id
+ 'ID', -- reg_term_id_cap
+ 'IDs', -- reg_term_id_plur
+ 'IDs', -- reg_term_id_plur_cap
+ 'level', -- reg_term_level
+ 'Level', -- reg_term_level_cap
+ 'levels', -- reg_term_level_plur
+ 'Levels', -- reg_term_level_plur_cap
+ 'rate', -- reg_term_rate
+ 'Rate', -- reg_term_rate_cap
+ 'rates', -- reg_term_rate_plur
+ 'Rates', -- reg_term_rate_plur_cap
+ 'password', -- reg_term_password
+ 'passwords', -- reg_term_password_cap
+ 'Password', -- reg_term_password_plur
+ 'Passwords', -- reg_term_password_plur_cap
+ 'instructor', -- reg_term_instructor
+ 'Instructor', -- reg_term_instructor_cap
+ 'instructors', -- reg_term_instructor_plur
+ 'Instructors', -- reg_term_instructor_plur_cap
+ 'payment code', -- reg_term_payment_code
+ 'Payment code', -- reg_term_payment_code_cap
+ 'payment codes', -- reg_term_payment_code_plur
+ 'Payment codes', -- reg_term_payment_code_plur_cap
+ 'Register for Event', -- reg_term_registration_button
+ 'Contact Information', -- reg_term_contact_information
+ 'Event Registration List', -- reg_term_button_event_list
+ 'Login or Create Account', -- reg_term_button_login_or_create
+ 'Create an Account', -- reg_term_button_create_account
+ 'Login'. -- reg_term_button_login
+ 'Logout', -- reg_term_button_logout
+ 'Add New Attendee', -- reg_term_button_add_attendee
+ 'Save Attendee', -- reg_term_button_save_attendee
+ 'Continue', -- reg_term_button_attendee_page_continue
+ 'Apply Comp Code', -- reg_term_button_apply_comp_code
+ 'Proceed to Checkout', -- reg_term_button_cart_page_continue
+ 'Submit Registration Request' -- reg_term_button_checkout_page_submit
+
+
+
+
+
+
+
+
+ );
+
+----
+
+-- Insert into misc table
+INSERT INTO {prefix}misc
+ (
+ reg_bulletin,
+ cart_page_text,
+ checkout_page_text,
+ summary_page_text,
+ reg_terms,
+ notify_subject,
+ notify_text,
+ instr_notify_subject,
+ instr_notify_text,
+ submission_notify_subject,
+ submission_notify_text,
+ registrant_notify_subject,
+ registrant_notify_text,
+ submission_ack_subject,
+ submission_ack_text,
+ registrant_ack_subject,
+ registrant_ack_text
+ )
+ VALUES
+ (
+ 'Registration Bulletin Text',
+ 'Text for top of Cart Page',
+ 'Text for top of Checkout Page',
+ 'Text for top of Summary Page',
+ 'Terms and Conditions',
+ 'Registration Request Submitted',
+ 'A registration request has just been submitted to your site.
+
+$OrgName: {$OrgName}
+$OrgAddress: {$OrgAddress}
+$OrgCity: {$OrgCity}
+$OrgState: {$OrgState}
+$OrgZip: {$OrgZip}
+$OrgPhone: {$OrgPhone}
+$OrgEmail: {$OrgEmail}
+$SubmittedByFirstName: {$SubmittedByFirstName}
+$SubmittedByLastName: {$SubmittedByLastName}
+$SubmittedByTitle: {$SubmittedByTitle}
+$SubmittedByOrganization: {$SubmittedByOrganization}
+$BillingFirstname: {$BillingFirstname}
+$BillingLastname: {$BillingLastname}
+$BillingAddrLine1: {$BillingAddrLine1}
+$BillingAddrLine2 {$BillingAddrLine2}
+$BillingCity: {$BillingCity}
+$BillingState: {$BillingState}
+$BillingCountry: {$BillingCountry}
+$BillingPhone: {$BillingPhone}
+$BillingEmailAddress: {$BillingEmailAddress}
+$DateTimeSubmitted: {$DateTimeSubmitted}
+$PaymentMethod: {$PaymentMethod}
+$Status: {$Status}
+$NumberAttendees: {$NumberAttendees}
+$Summary: {$Summary}
+',
+ 'Registration Submitted for {$EventName}',
+ 'The following people were just registered for {$EventName}...
+
+{foreach $EventAttendees as $a}{$a.AttendeeFirstName} {$a.AttendeeLastName}
+{/foreach}
+',
+ 'Registration Request Submitted',
+ 'Thank you for submitting your registration request.
+
+Here is a summary of your submission:
+
+{$Summary}',
+ 'Your Registration for: {$EventName}',
+ '{$DateTimeSubmitted}
+
+{$SubmittedByFirstName} {$SubmittedByLastName} has registered you for the {$EventName}.
+
+Here is your registration confirmation:
+Event: {$EventName}
+Registration Type: {$LevelName}
+Rate Name: {$RateName}
+Attendee Name Submitted: {$AttendeeFirstName} {$AttendeeLastName}
+
+Please let us know if you have any questions regarding your registration for this event.
+',
+ 'Registration Request Updated',
+ 'THIS MESSAGE TYPE IS NOT YET FUNCTIONAL
+
+The status of your registration request submitted on {$DateTimeSubmitted} has been updated to "{$Status}".
+
+Below is a copy of the request at the time it was submitted.
+
+{$Summary}',
+ 'Your payment status for the event you are attending has been updated',
+ 'TTHIS MESSAGE TYPE IS NOT YET FUNCTIONAL'
+ );
diff --git a/setup/databaseScripts/dbVersions.php b/setup/databaseScripts/dbVersions.php
index f0706e0..a595f81 100755
--- a/setup/databaseScripts/dbVersions.php
+++ b/setup/databaseScripts/dbVersions.php
@@ -48,7 +48,8 @@ $glmMembersRegistrationsDbVersions = array(
'0.0.32' => array('version' => '0.0.32', 'tables' => 18, 'date' => '05/22/2018'),
'1.0.0' => array('version' => '1.0.0', 'tables' => 18, 'date' => '06/04/2018'),
'1.0.1' => array('version' => '1.0.1', 'tables' => 18, 'date' => '06/12/2018'),
- '1.0.2' => array('version' => '1.0.2', 'tables' => 18, 'date' => '10/08/2018')
+ '1.0.2' => array('version' => '1.0.2', 'tables' => 18, 'date' => '10/08/2018'),
+ '1.0.3' => array('version' => '1.0.3', 'tables' => 18, 'date' => '12/11/2018')
);
diff --git a/setup/databaseScripts/drop_database_V1.0.2.sql b/setup/databaseScripts/drop_database_V1.0.2.sql
deleted file mode 100755
index 2ac0fe3..0000000
--- a/setup/databaseScripts/drop_database_V1.0.2.sql
+++ /dev/null
@@ -1,26 +0,0 @@
--- Gaslight Media Members Database
--- File Created: 12/09/14 15:27:15
--- Database Version: 0.0.19
--- Database Deletion Script
--- Note: Tables with DELETE CASCADE must appear before referenced table
-
-DROP TABLE IF EXISTS
- {prefix}management,
- {prefix}settings_terms,
- {prefix}misc,
- {prefix}payment_code,
- {prefix}reg_event,
- {prefix}reg_time,
- {prefix}reg_time_pending,
- {prefix}reg_class,
- {prefix}reg_rate,
- {prefix}reg_notification,
- {prefix}account,
- {prefix}reg_request,
- {prefix}reg_request_event,
- {prefix}reg_request_class,
- {prefix}reg_request_rate,
- {prefix}reg_request_registrant,
- {prefix}reg_request_pay_code
-;
-
diff --git a/setup/databaseScripts/drop_database_V1.0.3.sql b/setup/databaseScripts/drop_database_V1.0.3.sql
new file mode 100755
index 0000000..2ac0fe3
--- /dev/null
+++ b/setup/databaseScripts/drop_database_V1.0.3.sql
@@ -0,0 +1,26 @@
+-- Gaslight Media Members Database
+-- File Created: 12/09/14 15:27:15
+-- Database Version: 0.0.19
+-- Database Deletion Script
+-- Note: Tables with DELETE CASCADE must appear before referenced table
+
+DROP TABLE IF EXISTS
+ {prefix}management,
+ {prefix}settings_terms,
+ {prefix}misc,
+ {prefix}payment_code,
+ {prefix}reg_event,
+ {prefix}reg_time,
+ {prefix}reg_time_pending,
+ {prefix}reg_class,
+ {prefix}reg_rate,
+ {prefix}reg_notification,
+ {prefix}account,
+ {prefix}reg_request,
+ {prefix}reg_request_event,
+ {prefix}reg_request_class,
+ {prefix}reg_request_rate,
+ {prefix}reg_request_registrant,
+ {prefix}reg_request_pay_code
+;
+
diff --git a/setup/databaseScripts/update_database_V0.0.10.sql b/setup/databaseScripts/update_database_V0.0.10.sql
old mode 100644
new mode 100755
index 1f825fb..e4e119a
--- a/setup/databaseScripts/update_database_V0.0.10.sql
+++ b/setup/databaseScripts/update_database_V0.0.10.sql
@@ -7,7 +7,7 @@
-- all queries must be separated by a line with four dashes
-- Pending Attendees - In carts but not checked out
--- Attendee counts may be held for a particular reg_time entry for carts that have not been checked out
+-- Attendee counts may be held for a particular reg_time entry for carts that have not been checked out
-- These are held for reg_event reg_hold_minutes, afterwhich they are timed out and removed from this table
-- Cart entries are given the ID's for these entries when a hold is requested, if the entry is gone, the hold has expired
CREATE TABLE {prefix}reg_time_pending (
diff --git a/setup/databaseScripts/update_database_V1.0.3.sql b/setup/databaseScripts/update_database_V1.0.3.sql
new file mode 100755
index 0000000..e57eeb1
--- /dev/null
+++ b/setup/databaseScripts/update_database_V1.0.3.sql
@@ -0,0 +1,126 @@
+-- Gaslight Media Members Database - Registratiuons Add-On
+-- File Updated: 2018-10-08
+-- Database Version: 1.0.2
+-- Database Update From Previous Version Script
+--
+-- To permit each query below to be executed separately,
+-- all queries must be separated by a line with four dashes
+
+ALTER TABLE {prefix}management ADD COLUMN reg_bill_info_requested SMALLINT DEFAULT 32767;
+
+----
+
+ALTER TABLE {prefix}settings_terms ADD COLUMN reg_term_rate TINYTEXT DEFAULT NULL;
+
+----
+
+ALTER TABLE {prefix}settings_terms ADD COLUMN reg_term_rate_cap TINYTEXT DEFAULT NULL;
+
+----
+
+ALTER TABLE {prefix}settings_terms ADD COLUMN reg_term_rate_plur TINYTEXT DEFAULT NULL;
+
+----
+
+ALTER TABLE {prefix}settings_terms ADD COLUMN reg_term_rate_plur_cap TINYTEXT DEFAULT NULL;
+
+----
+
+UPDATE {prefix}settings_terms SET reg_term_rate = 'rate', reg_term_rate_cap = 'Rate', reg_term_rate_plur = 'rates', reg_term_rate_plur_cap = 'Rates' where id = 1;
+
+----
+
+ALTER TABLE {prefix}management ADD COLUMN reg_show_select_by_code BOOLEAN DEFAULT FALSE;
+
+----
+
+ALTER TABLE {prefix}reg_event ADD COLUMN not_included_in_lists BOOLEAN DEFAULT FALSE;
+
+----
+
+ALTER TABLE {prefix}reg_event ADD COLUMN image TINYTEXT DEFAULT NULL;
+
+----
+
+ALTER TABLE {prefix}reg_event ADD COLUMN cost TINYTEXT DEFAULT NULL;
+
+----
+
+ALTER TABLE {prefix}reg_event ADD COLUMN hide_address BOOLEAN DEFAULT FALSE;
+
+----
+
+ALTER TABLE {prefix}reg_event ADD COLUMN use_member_location BOOLEAN DEFAULT FALSE;
+
+----
+
+ALTER TABLE {prefix}reg_event ADD COLUMN member INT DEFAULT NULL;
+
+----
+
+ALTER TABLE {prefix}reg_event ADD COLUMN location_name TINYTEXT DEFAULT NULL;
+
+----
+
+ALTER TABLE {prefix}reg_event ADD COLUMN address TINYTEXT DEFAULT NULL;
+
+----
+
+ALTER TABLE {prefix}reg_event ADD COLUMN city INT DEFAULT NULL;
+
+----
+
+ALTER TABLE {prefix}reg_event ADD COLUMN state TINYTEXT DEFAULT NULL;
+
+----
+
+ALTER TABLE {prefix}reg_event ADD COLUMN zip TINYTEXT DEFAULT NULL;
+
+----
+
+ALTER TABLE {prefix}reg_event ADD COLUMN country TINYTEXT DEFAULT NULL;
+
+----
+
+ALTER TABLE {prefix}reg_event ADD COLUMN lat FLOAT DEFAULT NULL;
+
+----
+
+ALTER TABLE {prefix}reg_event ADD COLUMN lon FLOAT DEFAULT NULL;
+
+----
+
+ALTER TABLE {prefix}reg_event ADD COLUMN region INT DEFAULT NULL;
+
+----
+
+ALTER TABLE {prefix}reg_event ADD COLUMN phone TINYTEXT DEFAULT NULL;
+
+----
+
+ALTER TABLE {prefix}reg_event ADD COLUMN url TINYTEXT DEFAULT NULL;
+
+----
+
+ALTER TABLE {prefix}reg_event ADD COLUMN email TINYTEXT DEFAULT NULL;
+
+----
+
+ALTER TABLE {prefix}reg_event ADD COLUMN contact_addon_id INT DEFAULT NULL;
+
+----
+
+ALTER TABLE {prefix}reg_event ADD COLUMN contact_fname TINYTEXT DEFAULT NULL;
+
+----
+
+ALTER TABLE {prefix}reg_event ADD COLUMN contact_lname TINYTEXT DEFAULT NULL;
+
+----
+
+ALTER TABLE {prefix}reg_event ADD COLUMN contact_phone TINYTEXT DEFAULT NULL;
+
+----
+
+ALTER TABLE {prefix}reg_event ADD COLUMN contact_email TINYTEXT DEFAULT NULL;
+
diff --git a/views/admin/ajax/registrantsListExport.html b/views/admin/ajax/registrantsListExport.html
index f7cb58d..759dc18 100644
--- a/views/admin/ajax/registrantsListExport.html
+++ b/views/admin/ajax/registrantsListExport.html
@@ -27,6 +27,8 @@
{if $select.exportId} ID {/if}
{if $select.exportRegistrant}{$terms.reg_term_attendee_cap} Name {/if}
+ {if $select.exportOrg}Org {/if}
+ {if $select.exportTitle}Title {/if}
{if $select.exportAddr1}Address {/if}
{if $select.exportAddr2}Addr Line #2 {/if}
{if $select.exportCity}City {/if}
@@ -53,6 +55,8 @@
{if $select.exportId}
@@ -119,7 +119,7 @@
{$m.id} {/if}
{if $select.exportRegistrant}{$m.fname} {$m.lname} {/if}
+ {if $select.exportOrg}{$m.account.org} {/if}
+ {if $select.exportTitle}{$m.account.title} {/if}
{if $select.exportAddr1}{$m.account.addr1} {/if}
{if $select.exportAddr2}{$m.account.addr2} {/if}
{if $select.exportCity}{$m.account.city} {/if}
diff --git a/views/admin/ajax/registrantsListExportCsv.html b/views/admin/ajax/registrantsListExportCsv.html
index d1a223b..dc121f0 100644
--- a/views/admin/ajax/registrantsListExportCsv.html
+++ b/views/admin/ajax/registrantsListExportCsv.html
@@ -1,6 +1,8 @@
{if $haveRegistrants}
{if $select.exportId}"ID",{/if}
{if $select.exportRegistrant}"{$terms.reg_term_attendee_cap} Name",{/if}
+{if $select.exportOrg}"Organization",{/if}
+{if $select.exportTitle}"Title/Dept",{/if}
{if $select.exportAddr1}"Address",{/if}
{if $select.exportAddr2}"Addr Line #2",{/if}
{if $select.exportCity}"City",{/if}
@@ -18,6 +20,8 @@
{foreach $registrants as $m}
{if $select.exportId}"{$m.id}",{/if}
{if $select.exportRegistrant}"{$m.fname} {$m.lname}",{/if}
+{if $select.exportOrg}"{$m.account.org}",{/if}
+{if $select.exportTitle}"{$m.account.title}",{/if}
{if $select.exportAddr1}"{$m.account.addr1}",{/if}
{if $select.exportAddr2}"{$m.account.addr2}",{/if}
{if $select.exportCity}"{$m.account.city}",{/if}
diff --git a/views/admin/management/registrations.html b/views/admin/management/registrations.html
index 7577ddc..3e62dd0 100644
--- a/views/admin/management/registrations.html
+++ b/views/admin/management/registrations.html
@@ -110,7 +110,7 @@
{foreach from=$regSettings.fieldData.reg_payment_methods.bitmap item=v}
{$v.name}
- {/foreach}
+ {/foreach}
{if $regSettings.fieldFail.reg_payment_methods}
{foreach from=$regSettings.fieldData.reg_cc_accepts.bitmap item=v}
{$v.name}
@@ -136,9 +136,9 @@
-
+
-
+
- {/foreach}
+ {/foreach}
{if $regSettings.fieldFail.reg_cc_accepts}
@@ -171,12 +171,12 @@
-
-
+-->
+
See Authorize.net Merchant Portal for notifications sent by Authorize.net.
-
+
-
+
Verified Merchant Seal HTML:
@@ -206,7 +206,7 @@
@@ -253,9 +253,9 @@
{if $regSettings.fieldFail.reg_merchant_solutions_merchant_email}
-
+
-
+
-
-
-
+
+
+
@@ -301,9 +301,9 @@
+
@@ -340,22 +340,40 @@
+
Show Select Event by Code Form on Registration Events list
+
+
+
+
+
+
+
+
-
+
@@ -427,7 +446,7 @@
// Get the value from the selected Payment Method
var processor = $('#reg_proc_methods').val();
-
+
// This is a hack, we should be looking at the plugin.ini for these numbers but I'm just too lazy today
if (processor == 2) {
$('.authorize-net').removeClass('glm-hidden');
@@ -441,7 +460,7 @@
}
}
-
+
// When payment method selection changes
$('#reg_proc_methods').on('change', function() {
showSelectedCardProcessor();
@@ -457,7 +476,7 @@
window.open(sealUrl, '_blank', "width=300,height=200,menubar=no,scrollbars=no,location=no");
return false;
});
-
+
});
diff --git a/views/admin/management/regterms.html b/views/admin/management/regterms.html
index 992d82a..34f963b 100644
--- a/views/admin/management/regterms.html
+++ b/views/admin/management/regterms.html
@@ -15,7 +15,7 @@
{if $settingsUpdated}Billing Info Fields for Checkout:
+
+ {foreach from=$regSettings.fieldData.reg_bill_info_requested.bitmap item=v}
+ {$v.name}
+
+ {/foreach}
+ {if $regSettings.fieldFail.reg_bill_info_requested}Settings Updated
{/if}
{if $settingsUpdateError}Settings Update Error{/if}
{$terms.reg_term_registrations_name} Terms and Phrases
-
+
@@ -30,7 +30,7 @@
{if $termSettings.fieldFail.reg_term_registrations_name}
-
+
-
+
Attendee:
@@ -64,7 +64,7 @@
{if $termSettings.fieldFail.reg_term_attendee_plur_cap}
-
+
Attended:
@@ -74,7 +74,7 @@
{if $termSettings.fieldFail.reg_term_attended}
-
+
Attending:
@@ -84,7 +84,7 @@
{if $termSettings.fieldFail.reg_term_attending}
-
+
Contact Information:
@@ -94,7 +94,7 @@
{if $termSettings.fieldFail.reg_term_contact_information}
-
+
Event:
@@ -128,7 +128,7 @@
{if $termSettings.fieldFail.reg_term_event_plur_cap}
+
+ ID:
@@ -231,6 +231,40 @@
+
+ Rate:
+ Normal:
+
+
+ {if $termSettings.fieldFail.reg_term_rate}
+
+
+
+ Capitalized:
+
+
+ {if $termSettings.fieldFail.reg_term_rate_cap}
+
+
+
+ Plural:
+
+
+ {if $termSettings.fieldFail.reg_term_rate_plur}
+
+
+
+ Plural Capitalized:
+
+
+ {if $termSettings.fieldFail.reg_term_rate_plur_cap}
+
-
+
Password:
@@ -316,10 +350,10 @@
{if $termSettings.fieldFail.reg_term_register_cap}
-
-
+
Register for Event
+ Register for Event:
Normal:
@@ -327,9 +361,9 @@
-
-
+
Registered;
+ Registered:
Normal:
@@ -344,7 +378,7 @@
{if $termSettings.fieldFail.reg_term_registered_cap}
-
+
Registered User:
@@ -378,7 +412,7 @@
{if $termSettings.fieldFail.reg_term_registered_user_plur_cap}
-
+
Registering
@@ -403,11 +437,10 @@
Normal:
- {if $termSettings.fieldFail.reg_term_registers}
-
+
Registration:
@@ -441,13 +474,13 @@
{if $termSettings.fieldFail.reg_term_registration_plur_cap}
-
+
diff --git a/views/admin/registrations/accountDashboard.html b/views/admin/registrations/accountDashboard.html
index 38976d7..f990884 100755
--- a/views/admin/registrations/accountDashboard.html
+++ b/views/admin/registrations/accountDashboard.html
@@ -74,14 +74,14 @@
-
+
+ Buttons at top of all pages
- List Events:
@@ -529,9 +562,9 @@
{if $termSettings.fieldFail.reg_term_button_checkout_page_submit}Status
{$terms.reg_term_attendee_plur_cap}
- {foreach $account.requests as $request}
+ {foreach $account.requests as $request}
+
{/foreach}
@@ -98,11 +98,11 @@
{$request.id}
{$request.date_submitted.datetime}
{$request.pay_method.name}
{$request.status.name}
{$request.registrants}
- Name
{$terms.reg_term_event_cap}
Level
- Rate
+ {$terms.reg_term_rate_cap}
Request Status
Attending
- {foreach $account.registrants as $registrant}
+ {foreach $account.registrants as $registrant}
+
{/foreach}
diff --git a/views/admin/registrations/accountsDashboard.html b/views/admin/registrations/accountsDashboard.html
index 5a92563..9322635 100755
--- a/views/admin/registrations/accountsDashboard.html
+++ b/views/admin/registrations/accountsDashboard.html
@@ -25,7 +25,7 @@
Inactive Accounts
{$registrant.id}
{$registrant.fname} {$registrant.lname}
@@ -111,7 +111,7 @@
{$registrant.rate_name}
{$registrant.request_status_name}
{if $registrant.not_attending.value}No{else}Yes{/if}
-
This action looks for dates and time specified for the associated {$terms.reg_term_event} in the {$terms.reg_term_event} schedules. If there are any dates and times that are @@ -109,7 +127,7 @@ and times to {$terms.reg_term_registration_plur} for this {$terms.reg_term_event}. To deactivate or remove those dates you will be required to click on each date/time and either deactivate it or demove it.
-