From c73764b7faa2829a63a29721dbd3940cf1f7f672 Mon Sep 17 00:00:00 2001 From: Chuck Scott Date: Mon, 21 Aug 2017 16:36:29 -0400 Subject: [PATCH] Added event_setup.php to provide a sample structure like what will be provided to the front-end step 1 (registration). Updated some commentary in the database related to these fields. --- data/event_setup.php | 115 ++++++++++++++++++ data/events.php | 5 +- models/admin/registrations/event.php | 3 + .../create_database_V0.0.8.sql | 2 +- 4 files changed, 123 insertions(+), 2 deletions(-) create mode 100644 data/event_setup.php diff --git a/data/event_setup.php b/data/event_setup.php new file mode 100644 index 0000000..03a8d20 --- /dev/null +++ b/data/event_setup.php @@ -0,0 +1,115 @@ + array + ( + 'id' => 1000, + '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 priviledges.', + '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)."
"; + diff --git a/data/events.php b/data/events.php index b99a76d..8405fa7 100644 --- a/data/events.php +++ b/data/events.php @@ -1,4 +1,6 @@ - array( 'id' => 1, @@ -45,3 +47,4 @@ $eventData = array( ), ) ); + diff --git a/models/admin/registrations/event.php b/models/admin/registrations/event.php index 26e2621..97e3e5e 100644 --- a/models/admin/registrations/event.php +++ b/models/admin/registrations/event.php @@ -88,6 +88,9 @@ class GlmMembersAdmin_registrations_event extends GlmDataRegistrationsRegEvent public function modelAction($actionData = false) { +// Un-comment to generate a sample set of reg event data +include GLM_MEMBERS_REGISTRATIONS_PLUGIN_PATH . '/data/event_setup.php'; + $option = 'list'; $template = 'list.html'; $regEvent = false; diff --git a/setup/databaseScripts/create_database_V0.0.8.sql b/setup/databaseScripts/create_database_V0.0.8.sql index 04ec95d..29ec947 100644 --- a/setup/databaseScripts/create_database_V0.0.8.sql +++ b/setup/databaseScripts/create_database_V0.0.8.sql @@ -334,7 +334,7 @@ CREATE TABLE {prefix}reg_event ( CREATE TABLE {prefix}reg_time ( id INT NOT NULL AUTO_INCREMENT, reg_event INT NULL, -- Pointer to reg_event table - event_time INT NULL, -- Pointer to events times table entry - If false, then this is a pseudo entry to use for all registrations (non-date/time specific) + 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 - Informational - Actual events data is definitive end_datetime DATETIME NULL, -- Date and time when event instance ends - Informational all_day BOOLEAN NULL, -- All Day flag - Informational -- 2.17.1