Added event_setup.php to provide a sample structure like what will be provided to...
authorChuck Scott <cscott@gaslightmedia.com>
Mon, 21 Aug 2017 20:36:29 +0000 (16:36 -0400)
committerChuck Scott <cscott@gaslightmedia.com>
Mon, 21 Aug 2017 20:36:29 +0000 (16:36 -0400)
Updated some commentary in the database related to these fields.

data/event_setup.php [new file with mode: 0644]
data/events.php
models/admin/registrations/event.php
setup/databaseScripts/create_database_V0.0.8.sql

diff --git a/data/event_setup.php b/data/event_setup.php
new file mode 100644 (file)
index 0000000..03a8d20
--- /dev/null
@@ -0,0 +1,115 @@
+<?php
+
+
+// Sample event setup data - Describes registration for an event
+// This data must be stored into the data tables and pulled out using data abstract to be useable.
+$regEventSample = array(
+    
+    // reg_event base data - Base info on this registration event - from reg_event table
+    'reg_event' =>  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 "<pre>".print_r($regEventSample,1)."</pre>";
+
index b99a76d..8405fa7 100644 (file)
@@ -1,4 +1,6 @@
-<?php
+<?php   
+
+// Sample front-end event selection data - Should really be a cart entry
 $eventData = array(
     1 => array(
         'id'         => 1,
@@ -45,3 +47,4 @@ $eventData = array(
         ),
     )
 );
+
index 26e2621..97e3e5e 100644 (file)
@@ -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;
index 04ec95d..29ec947 100644 (file)
@@ -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