From: Chuck Scott Date: Mon, 2 Oct 2017 15:54:17 +0000 (-0400) Subject: Now trimming trailing whitespace on PHP files. Most of these files have only whitespa... X-Git-Tag: v1.0.0^2~378 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=28e4014c1315c9062645cc921359ee3ebebf206a;p=WP-Plugins%2Fglm-member-db-registrations.git Now trimming trailing whitespace on PHP files. Most of these files have only whitespace changes. Updated getRegistrationCart() and checkRegistrationRequest() to now both optionally return a JSON or an array for the cart contents or return only a status flag. --- diff --git a/classes/regCartSupport.php b/classes/regCartSupport.php index 1a98e3c..4f0fc21 100644 --- a/classes/regCartSupport.php +++ b/classes/regCartSupport.php @@ -138,12 +138,16 @@ class GlmRegCartSupport * * ) * - * @param integer $requestId + * @param integer $requestId Cart (request) ID + * @param boolean $json Tell function to return cart data as JSON + * @param boolean $noReturn Tell function to not return any data - overridden by $json + * + * @return array Array of cart (request) and all associated information (optionally as a JSON) or false if failure. + * Returns true or false for cart 'status' if $noReturn is set to true. * - * @return array Array of request and all associated information or false * @access public */ - public function getRegistrationCart($requestId = false, $json = false) + public function getRegistrationCart($requestId = false, $json = false, $noReturn = false) { $RegEvent = new GlmDataRegistrationsRegEvent($this->wpdb, $this->config); @@ -172,7 +176,7 @@ class GlmRegCartSupport } // Try to get the base registration request data - $this->cart['request'] = $RegRequest->getEntry($requestId); + $this->cart['request'] = $RegRequest->getEntry($requestId); if (!$this->cart['request']) { $this->cart['errorMsg'] = 'Unable to retrieve the requested registration request.'; return $this->cart; @@ -183,7 +187,7 @@ class GlmRegCartSupport // Get list of events being requested $this->cart['events'] = $RequestEvent->getList("T.reg_request = $requestId"); - + // For each event if ($this->cart['events']) { foreach ($this->cart['events'] as $eventKey => $event) { @@ -230,15 +234,19 @@ class GlmRegCartSupport $this->cart['status'] = true; $this->cart['validated'] = false; - + // echo "
getRegistrationCart() Results:
".print_r($this->cart,1)."
"; exit; - + if ($json) { return json_encode($this->cart); } - return; + if ($noReturn) { + return $this->cart['status']; + } + + return $this->cart; } @@ -258,20 +266,24 @@ class GlmRegCartSupport * Updates request last accessed time * * @param integer $requestId - * - * @return array Array of request and all associated information or false + * @param boolean $json Tell function to return cart data as JSON + * @param boolean $noReturn Tell function to not return any data - overridden by $json + * + * @return array Array of cart (request) and all associated information (optionally as a JSON) or false if failure. + * Returns true or false for cart 'status' if $noReturn is set to true. + * * @access public */ - public function checkRegistrationRequest($requestId = false) + public function checkRegistrationRequest($requestId = false, $json = false, $noReturn = false) { // Try to get the cart data - $this->getRegistrationCart($requestId); - + $this->getRegistrationCart($requestId, false, true); + if (!$this->cart) { return false; } - + $RegEvent = new GlmDataRegistrationsRegEvent($this->wpdb, $this->config); $RegTime = new GlmDataRegistrationsRegTime($this->wpdb, $this->config); $RegRequest = new GlmDataRegistrationsRegRequest($this->wpdb, $this->config); @@ -279,14 +291,14 @@ class GlmRegCartSupport $RequestClass = new GlmDataRegistrationsRequestClass($this->wpdb, $this->config); $RequestRate = new GlmDataRegistrationsRegRequestRate($this->wpdb, $this->config); $RequestRegistrant = new GlmDataRegistrationsRequestRegistrant($this->wpdb, $this->config); - + $this->cart['messages'] = array(); - + $totalRegistrants = 0; $totalCharges = 0; $totalDiscounts = 0; $grandTotal = 0; - + // If we have a cart (request) if ($this->cart) { @@ -294,119 +306,119 @@ class GlmRegCartSupport if ($this->cart['request']['account'] && !isset($this->cart['accounts'][$this->cart['request']['account']])) { $this->cart['messages'][] .= 'Account for person submitting the request is missing.'; } - + /* * Events Processing */ - + // If we don't have events for this cart if (!is_array($this->cart['events']) || count($this->cart['events']) == 0) { $this->cart['messages'][] = 'Cart is empty.'; } else { - + // Loop through all events in the cart foreach ($this->cart['events'] as $eventKey => $event) { - + $eventRegistrants = 0; $eventCharges = 0; $eventDiscounts = 0; $eventTotal = 0; - + // Do event Checks - - - + + + // Check if Event exists in Events add-on and is active in registrations or if doing admin (admin_active) $regEvent = $RegEvent->getEntry($event['reg_event']); if (!$regEvent) { $this->cart['messages'][] = 'Event in cart is not currently available for registration.'; } - + // Check if the event is time-specific and if there's a list of times for this event - If not, should be a default - + /* * Classes (levels) Processing */ - + // If we don't have classes for this event if (!is_array($event['classes']) || count($event['classes']) == 0 ) { $this->cart['messages'][] = 'Event '.$event['event_name'].' has no levels.'; } else { - + // Loop through all classes (levels) for this event - foreach ($event['classes'] as $classKey => $class) { - + foreach ($event['classes'] as $classKey => $class) { + $classRegistrants = 0; $classCharges = 0; $classDiscounts = 0; $classTotal = 0; - + // Do class (level) checks - - + + /* * Rates Processing */ - + // If we don't have rates for this class if (!is_array($class['rates']) || count($class['rates']) == 0 ) { $this->cart['messages'][] = 'Class '.$class['class_name'].' has no rates.'; } else { - + // loop through all rates foreach ($class['rates'] as $rateKey => $rate) { - + $rateRegistrants = 0; $rateCharges = 0; $rateDiscounts = 0; $rateTotal = 0; - + // Do rate Checks - + // Check if listed rate is currently available - If not, add as a problem - + /* * Registrants Processing */ - + // If we don't have registrants for this class if (!is_array($rate['registrants']) || count($rate['registrants']) == 0 ) { $this->cart['messages'][] = 'Rate '.$rate['rate_name'].' has no registrants.'; } else { - + // loop through all Registrants foreach ($rate['registrants'] as $registrantKey => $registrant) { - + $registrantCharges = 0; $registrantDiscounts = 0; $registrantTotal = 0; - + // Do registrant checks - - + + // Save totals for this registrant $this->cart['events'][$eventKey]['classes'][$classKey]['rates'][$rateKey]['registrants'][$registrantKey]['totalCharges'] = $registrantCharges; $this->cart['events'][$eventKey]['classes'][$classKey]['rates'][$rateKey]['registrants'][$registrantKey]['totalDiscounts'] = $registrantDiscounts; $this->cart['events'][$eventKey]['classes'][$classKey]['rates'][$rateKey]['registrants'][$registrantKey]['rateTotal'] = $registrantTotal; - + // Add totals to rate $rateRegistrants++; $rateCharges += $registrantCharges; $rateDiscounts += $registrantDiscounts; $rateTotal += $registrantTotal; - + } // Each registrant - + } // Have registrants - + // Save totals for this rate $this->cart['events'][$eventKey]['classes'][$classKey]['rates'][$rateKey]['totalRegistrants'] = $rateRegistrants; $this->cart['events'][$eventKey]['classes'][$classKey]['rates'][$rateKey]['totalCharges'] = $rateCharges; $this->cart['events'][$eventKey]['classes'][$classKey]['rates'][$rateKey]['totalDiscounts'] = $rateDiscounts; $this->cart['events'][$eventKey]['classes'][$classKey]['rates'][$rateKey]['rateTotal'] = $rateTotal; - + // Add totals to class $classRegistrants += $rateRegistrants; $classCharges += $rateCharges; @@ -414,48 +426,48 @@ class GlmRegCartSupport $classTotal += $rateTotal; } // Each Rate - + } // Have rates - + // Save totals for this class (level) $this->cart['events'][$eventKey]['classes'][$classKey]['totalRegistrants'] = $classRegistrants; $this->cart['events'][$eventKey]['classes'][$classKey]['totalCharges'] = $classCharges; $this->cart['events'][$eventKey]['classes'][$classKey]['totalDiscounts'] = $classDiscounts; $this->cart['events'][$eventKey]['classes'][$classKey]['classTotal'] = $classTotal; - + // Add totals to event $eventRegistrants += $classRegistrants; $eventCharges += $classCharges; $eventDiscounts += $classDiscounts; $eventTotal += $classTotal; - - + + } // Each class - + } // Have Classes - + // Save totals for this event $this->cart['events'][$eventKey]['totalRegistrants'] = $eventRegistrants; $this->cart['events'][$eventKey]['totalCharges'] = $eventCharges; $this->cart['events'][$eventKey]['totalDiscounts'] = $eventDiscounts; $this->cart['events'][$eventKey]['eventTotal'] = $eventTotal; - + // Add totals to request $totalCharges += $eventCharges; $totalRegistrants += $eventRegistrants; $totalDiscounts += $eventDiscounts; $totalTotal += $eventTotal; - + } // Each event - + } // Have events - + // Update request last_update timestamp - + } // have request - + // Check if Event Time exists in Events add-on - + // echo "
".print_r($this->cart,1)."
"; // Check if no messages then cart validated @@ -463,7 +475,15 @@ class GlmRegCartSupport $this->cart['validated'] = true; } - return; + if ($json) { + return json_encode($this->cart); + } + + if ($noReturn) { + return $this->cart['status']; + } + + return $this->cart; } diff --git a/gulpfile.js b/gulpfile.js index 165297b..47326ec 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -43,3 +43,4 @@ gulp.task('watch', function(){ }); gulp.task('default', ['frontscripts', 'adminscripts', 'watch']); + \ No newline at end of file diff --git a/models/admin/ajax/regAdmin.php b/models/admin/ajax/regAdmin.php index bc9b813..7fbc9e7 100644 --- a/models/admin/ajax/regAdmin.php +++ b/models/admin/ajax/regAdmin.php @@ -2,7 +2,7 @@ /** * Gaslight Media Members Database - * Registration add-on admin AJAX processor + * Registration add-on admin AJAX processor * * PHP version 5.5 * @@ -14,7 +14,7 @@ */ /** - * This class processes AJAX requests from admin Backbone.js registrations interface + * This class processes AJAX requests from admin Backbone.js registrations interface */ class GlmMembersAdmin_ajax_regAdmin { @@ -73,7 +73,7 @@ class GlmMembersAdmin_ajax_regAdmin // Get Backbone collection we're talking with $collection = filter_var( $_REQUEST['collection'], FILTER_SANITIZE_STRING ); - + // If not a valid collection, die quietly if (!in_array($collection, array('regClasses', 'regRates'))) { $this->failureResponse('Not a valid desitination (collection?).'); @@ -86,33 +86,33 @@ class GlmMembersAdmin_ajax_regAdmin } else { $modelData = $_REQUEST; } - + // Build model and path and class names $modelName = GLM_MEMBERS_REGISTRATIONS_PLUGIN_PATH.'/models/admin/ajax/regAdmin/'.$collection.'.php'; $className = 'GlmMembersAdmin_registrations_ajax_'.$collection; - + // Check if model for this request exists if (!file_exists($modelName)) { trigger_error ( "ERROR: The specified model file doesn't exist. ($modelName)", E_USER_ERROR); wp_die(); } - + // Load the model file require_once $modelName; - + // check for an invalid model class name if (!class_exists($className)) { trigger_error ( "ERROR: The specified class name doesn't exist. ($className)", E_USER_ERROR); wp_die(); } - + // Instantiate the model and ask it to perform the work $model = new $className($this->wpdb, $this->config); $results = $model->modelAction($modelData); - - + + } - + } diff --git a/models/admin/ajax/regAdmin/regClasses.php b/models/admin/ajax/regAdmin/regClasses.php index 9cae7e0..4c19702 100644 --- a/models/admin/ajax/regAdmin/regClasses.php +++ b/models/admin/ajax/regAdmin/regClasses.php @@ -85,12 +85,12 @@ class GlmMembersAdmin_registrations_ajax_regClasses extends GlmDataRegistrations // Perform specified action switch ($modelData['option']) { - + case 'add': - + // Make sure we got a parent ID with the data if (isset($modelData['parent']) || ($modelData['parent']-0) > 0) { - + // Try to insert the class (level) data $res = $this->wpdb->insert( $this->table, @@ -105,12 +105,12 @@ class GlmMembersAdmin_registrations_ajax_regClasses extends GlmDataRegistrations '%s' ) ); - + if ($res != 1) { trigger_error('Registration Class Insert failed'); return false; } - + // If there's a new classID, declare success $classID = $this->wpdb->insert_id; if ($classID) { @@ -120,16 +120,16 @@ class GlmMembersAdmin_registrations_ajax_regClasses extends GlmDataRegistrations echo json_encode(0); wp_die(); } - + } - + break; - + case 'get': break; - + case 'update': - + // We must have a numeric class (level) ID $classID = ($modelData['id'] - 0); if ($classID > 0) { @@ -148,33 +148,33 @@ class GlmMembersAdmin_registrations_ajax_regClasses extends GlmDataRegistrations ), array( '%d' ) ); - + } - + break; - + case 'delete': - + $classID = ($modelData['id'] - 0); if ($classID > 0) { $this->wpdb->delete( GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX . 'reg_rate', array( 'reg_class' => $classID ), array( '%d' ) ); $this->wpdb->delete( $this->table, array( 'id' => $classID ), array( '%d' ) ); } - + return; - + break; - + default: die(); // should never get here break; - + } - + wp_die(); - - - + + + } diff --git a/models/admin/ajax/regAdmin/regRates.php b/models/admin/ajax/regAdmin/regRates.php index f1932ff..7bde1bc 100644 --- a/models/admin/ajax/regAdmin/regRates.php +++ b/models/admin/ajax/regAdmin/regRates.php @@ -107,22 +107,22 @@ class GlmMembersAdmin_registrations_ajax_regRates extends GlmDataRegistrationsRe switch ($modelData['option']) { case 'add': - + // Make sure we got a parent ID with the data if (isset($modelData['parent']) || (modelData['parent']-0) > 0) { - + // Try to insert the rate (level) data $res = $this->wpdb->insert( $this->table, $ratesFields, $ratesFieldTypes ); - + if ($res != 1) { trigger_error('Registration Rate Insert failed'); return false; } - + // If there's a new rateID, declare success $rateID = $this->wpdb->insert_id; if ($rateID) { @@ -132,16 +132,16 @@ class GlmMembersAdmin_registrations_ajax_regRates extends GlmDataRegistrationsRe echo json_encode(0); wp_die(); } - + } - + break; - + case 'get': break; - + case 'update': - + // We must have a numeric class (level) ID $rateID = ($modelData['id'] - 0); if ($rateID > 0) { @@ -154,32 +154,32 @@ class GlmMembersAdmin_registrations_ajax_regRates extends GlmDataRegistrationsRe $ratesFieldTypes, array( '%d' ) ); - + } - + break; - + case 'delete': - + $rateID = ($modelData['id'] - 0); if ($rateID > 0) { $this->wpdb->delete( $this->table, array( 'id' => $rateID ), array( '%d' ) ); } - + return; - + break; - + default: die(); // should never get here break; - + } - + wp_die(); - - - + + + } diff --git a/models/admin/ajax/regFront/regRequestEvent.php b/models/admin/ajax/regFront/regRequestEvent.php index fa6b802..ee3579d 100644 --- a/models/admin/ajax/regFront/regRequestEvent.php +++ b/models/admin/ajax/regFront/regRequestEvent.php @@ -81,33 +81,33 @@ class GlmMembersAdmin_registrations_ajax_regClasses extends GlmDataRegistrations public function modelAction($modelData) { -trigger_error(print_r($modelData,1)); - +trigger_error(print_r($modelData,1)); + // Perform specified action switch ($modelData['option']) { - + case 'add': break; - + case 'get': break; - + case 'update': break; - + case 'delete': break; - + default: die(); // should never get here break; - + } - + wp_die(); - - - + + + } diff --git a/models/admin/management/registrations.php b/models/admin/management/registrations.php index 69a39d5..742c718 100644 --- a/models/admin/management/registrations.php +++ b/models/admin/management/registrations.php @@ -170,7 +170,7 @@ class GlmMembersAdmin_management_registrations extends GlmDataRegistrationsManag $errorMsg = "Unable to load the Registrations management settings"; trigger_error($errorMsg, E_USER_NOTICE); - + return array( 'status' => false, 'menuItemRedirect' => 'error', diff --git a/models/admin/management/regterms.php b/models/admin/management/regterms.php index 446a76e..ea58c69 100644 --- a/models/admin/management/regterms.php +++ b/models/admin/management/regterms.php @@ -156,7 +156,7 @@ class GlmMembersAdmin_management_regterms extends GlmDataRegistrationsSettingsTe if ($termsSettings === false) { trigger_error("Unable to load Terms Settings: /models/admin/settings/terms.php", E_USER_NOTICE); - + return array( 'status' => false, 'menuItemRedirect' => 'error', diff --git a/models/admin/registrations/events.php b/models/admin/registrations/events.php index a64774a..67b1e56 100644 --- a/models/admin/registrations/events.php +++ b/models/admin/registrations/events.php @@ -114,7 +114,7 @@ class GlmMembersAdmin_registrations_events extends GlmDataRegistrationsRegEvent $regEventJSON = false; $regClassesJSON = false; $regTimesJSON = false; - + // Get any provided option if (isset($_REQUEST['option'])) { $option = $_REQUEST['option']; @@ -175,16 +175,16 @@ class GlmMembersAdmin_registrations_events extends GlmDataRegistrationsRegEvent if (is_array($regEvent['reg_time'])) { $regEvent['reg_time'] = array_values($regEvent['reg_time']); } - + // Separate Event, Classes, and Times and send those as separate JSONs $regClassesJSON = json_encode($regEvent['reg_class']); $regTimesJSON = json_encode($regEvent['reg_time']); - + // Get rid of class and time arrays so we just have the event data unset($regEvent['reg_class']); unset($regEvent['reg_time']); $regEventJSON = json_encode($regEvent); - + $view = 'eventEditLevels'; break; @@ -197,7 +197,7 @@ class GlmMembersAdmin_registrations_events extends GlmDataRegistrationsRegEvent $eventData = false; $eventID = ($_REQUEST['event']-0); - + // Verify that event is not already listed $regEvent = $this->getEntry($eventID, 'event'); if (!$regEvent) { @@ -273,9 +273,9 @@ class GlmMembersAdmin_registrations_events extends GlmDataRegistrationsRegEvent } } } - + // echo "
".print_r($regEvent,1)."
"; - + $view = 'eventEdit'; break; @@ -436,7 +436,7 @@ class GlmMembersAdmin_registrations_events extends GlmDataRegistrationsRegEvent if (isset($_REQUEST['text_search']) && trim($_REQUEST['text_search'] != '')) { $textSearch = trim($_REQUEST['text_search']); $where = "event_name LIKE '%".$textSearch."%'"; - + // Clean up for use in redisplaying search value $textSearch = stripslashes($textSearch); } @@ -529,7 +529,7 @@ class GlmMembersAdmin_registrations_events extends GlmDataRegistrationsRegEvent 'thisJsUrl' => GLM_MEMBERS_REGISTRATIONS_PLUGIN_URL . '/js', 'regEventJSON' => $regEventJSON, 'regClassesJSON' => $regClassesJSON, - 'regTimesJSON' => $regTimesJSON + 'regTimesJSON' => $regTimesJSON ); // Return status, any suggested view, and any data to controller diff --git a/models/admin/registrations/reports.php b/models/admin/registrations/reports.php index b912ae9..2ca14b0 100644 --- a/models/admin/registrations/reports.php +++ b/models/admin/registrations/reports.php @@ -86,12 +86,12 @@ class GlmMembersAdmin_registrations_reports { $view = 'reports'; $reason = array(); - + // Compile template data $templateData = array( 'reason' => $reason ); - + // Return status, any suggested view, and any data to controller return array( 'status' => true, diff --git a/models/admin/registrations/requests.php b/models/admin/registrations/requests.php index 3eb7b1c..079d96f 100644 --- a/models/admin/registrations/requests.php +++ b/models/admin/registrations/requests.php @@ -107,25 +107,25 @@ class GlmMembersAdmin_registrations_requests extends GlmDataRegistrationsRegRequ if (isset($_REQUEST['option']) && $_REQUEST['option'] != '') { $option = $_REQUEST['option']; } - - + + // Get request ID if supplied if (isset($_REQUEST['requestID'])) { - + // Make sure it's numeric $requestID = ($_REQUEST['requestID'] - 0); - + } else { - + // Try to get saved $requestID = get_option('glmMembersDatabaseRegistrationsRequestID'); - + } - + if (!$requestID || $requestID <= 0) { $requestID = false; } - + // Perform selected option switch ($option) { @@ -133,20 +133,20 @@ class GlmMembersAdmin_registrations_requests extends GlmDataRegistrationsRegRequ case 'check': $cart = $regCartSupport->checkRegistrationRequest($requestID); - + break; - + // Display selected registration request dashboard case 'requestDashboard': - + $cart = $regCartSupport->getRegistrationCart($requestID); if ($cart) { $haveCart = true; } - + $view = 'requestDashboard.html'; - + break; // Display/Edit a registration request @@ -195,7 +195,7 @@ class GlmMembersAdmin_registrations_requests extends GlmDataRegistrationsRegRequ if ($requestID > 0) { update_option('glmMembersDatabaseRegistrationsRequestID', $requestID); } - + // Compile template data $templateData = array( 'haveRequests' => $haveRequests, diff --git a/models/front/registrations/account.php b/models/front/registrations/account.php index ee63b2c..8e0b304 100644 --- a/models/front/registrations/account.php +++ b/models/front/registrations/account.php @@ -53,10 +53,10 @@ parent::__construct(false, false); } - + public function modelAction($actionData = false) { - + // Get any provided option if (isset($_REQUEST['option'])) { diff --git a/models/front/registrations/cart.php b/models/front/registrations/cart.php index 6bb5fe7..6c061a6 100644 --- a/models/front/registrations/cart.php +++ b/models/front/registrations/cart.php @@ -1,7 +1,7 @@ wpdb = $wpdb; - + // Save plugin configuration object $this->config = $config; - + /* * Run constructor for the REgistrations data class * @@ -73,17 +73,16 @@ class GlmMembersFront_registrations_cart extends GlmRegCartSupport * data class that it should flag a group of fields as 'view_only'. */ parent::__construct(false, false, true); - + } - public function modelAction($actionData = false) { - + $cartId = false; $haveCart = false; $option = false; - + // Get any provided option if (isset($_REQUEST['option'])) { $option = $_REQUEST['option']; @@ -101,20 +100,24 @@ class GlmMembersFront_registrations_cart extends GlmRegCartSupport } // Get cart ID if supplied - if (isset($_SESSION['glm_reg_cart_id'])) { - - // Get ID from sessiosn - $cartId = $_SESSION['glm_reg_cart_id']; - - } elseif (isset($_REQUEST['cart'])) { - + if (isset($_REQUEST['cartId'])) { + // Get ID from REQUEST Make sure it's numeric - $cartId = ($_REQUEST['cart'] - 0); - + $cartId = ($_REQUEST['cartId'] - 0); + + // If bad cart ID, set to false if ($cartId <= 0) { $cartId = false; + } else { + // If good dart ID save that in the session + $_SESSION['glm_reg_cart_id'] = $cartId; } - + + } elseif (isset($_SESSION['glm_reg_cart_id'])) { + + // Get ID from session + $cartId = $_SESSION['glm_reg_cart_id']; + } if ($cartId) { @@ -123,22 +126,22 @@ class GlmMembersFront_registrations_cart extends GlmRegCartSupport $haveCart = true; } } - + $view = 'cart'; switch ( $option ) { - - + + case 'showCart': default: - + if ($cartId) { // Try to get a Validate cart with updated totals $this->checkRegistrationRequest($cartId); - + } - + break; } @@ -150,7 +153,7 @@ class GlmMembersFront_registrations_cart extends GlmRegCartSupport 'cart' => $this->cart ); - + //echo "
".print_r($templateData,1)."
"; // Return status, any suggested view, and any data to controller diff --git a/models/front/registrations/checkout.php b/models/front/registrations/checkout.php index cb03584..56cdf74 100644 --- a/models/front/registrations/checkout.php +++ b/models/front/registrations/checkout.php @@ -80,7 +80,7 @@ require_once GLM_MEMBERS_REGISTRATIONS_PLUGIN_CLASS_PATH.'/data/dataRegEvent.php ); } - - - + + + } diff --git a/models/front/registrations/checkoutProcess.php b/models/front/registrations/checkoutProcess.php index 830d902..2870d58 100644 --- a/models/front/registrations/checkoutProcess.php +++ b/models/front/registrations/checkoutProcess.php @@ -18,7 +18,7 @@ require_once GLM_MEMBERS_REGISTRATIONS_PLUGIN_CLASS_PATH.'/regCartSupport.php'; class GlmMembersAdmin_registrations_event extends GlmRegCartSupport { - + /** * WordPress Database Object * @@ -45,22 +45,22 @@ class GlmMembersAdmin_registrations_event extends GlmRegCartSupport */ public function __construct($wpdb, $config, $limitedEdit = false) { - + // If this class is not being extended along with existing $wpdb and $config if (!$this->wpdb) { - + // Save WordPress Database object $this->wpdb = $wpdb; - + // Save plugin configuration object $this->config = $config; - + } } - + /** * Model Action - * + * * This model returns an array containing the following... * * 'status' @@ -89,45 +89,45 @@ class GlmMembersAdmin_registrations_event extends GlmRegCartSupport /* * Initial Checks */ - + // Do we have a current login account - + // If not, then is guest checkout permitted? - + // Otheriwse back to checkout with a message - + // Do we need accounts for all registrants? - + // If so, do we have accounts for all registrants - + // If needed, create accounts - + // Is the submission valid, do we have all required information - + // All submitter data - + // All billing data - + // All policies accepted - + /* * Store Submission */ - + /* * Process Payment */ - + /* * Send out Notifications */ - + /* * If all is done correctly, use model redirect to go to Step 4 - Dispaly summary */ - - - + + + // Compile template data $templateData = array( @@ -141,7 +141,7 @@ class GlmMembersAdmin_registrations_event extends GlmRegCartSupport ); } - - - + + + } diff --git a/models/front/registrations/list.php b/models/front/registrations/list.php index e5f5500..da1f705 100644 --- a/models/front/registrations/list.php +++ b/models/front/registrations/list.php @@ -95,10 +95,10 @@ switch ( $option ) { default: - + // Get a current list of reg events $listResult = $this->getSimpleRegEventsList($where.$alphaWhere, 'event_name', true, 'id', $start, $limit, true); - + //echo '
$listResult: ' . print_r( $listResult, true ) . '
'; // Get paging results diff --git a/models/front/registrations/summary.php b/models/front/registrations/summary.php index f1167a9..006e168 100644 --- a/models/front/registrations/summary.php +++ b/models/front/registrations/summary.php @@ -1,6 +1,6 @@ array( 'plugin' => GLM_MEMBERS_REGISTRATIONS_PLUGIN_SLUG, @@ -102,10 +102,10 @@ $glmMembersRegistrationsShortcodes = array( 'datetime' => false, 'time' => false, 'account' => false, - + ) ) - + ); $glmMembersRegistrationsShortcodesDescription = ' @@ -114,9 +114,9 @@ $glmMembersRegistrationsShortcodesDescription = ' [glm-members-registrations]   - By default shows a list of current and upcoming events that are set to accept + By default shows a list of current and upcoming events that are set to accept registrations. The added "page" parameter can be used to specify the desired - registrations page. + registrations page. @@ -145,16 +145,16 @@ $glmMembersRegistrationsShortcodesDescription = '   cart="{ID of a specific cart}" - The "cart" attribute is used to specify the ID of a particular user cart. - Note that if a user is logged in to a registrations "account", that they may have one - or more completed carts and one or more carts in progress. + The "cart" attribute is used to specify the ID of a particular user cart. + Note that if a user is logged in to a registrations "account", that they may have one + or more completed carts and one or more carts in progress.   event="{event ID or event code}" - The "event" attribute is used to specify the ID of an event for registration. + The "event" attribute is used to specify the ID of an event for registration. This may also be the "event code" for an event that offers registrations. @@ -172,9 +172,9 @@ $glmMembersRegistrationsShortcodesDescription = ' date="{a text date}" A date string used to search for matching event instances, primarily for the "Registrations List" page. - This can be used to list the times for all events that can take reservations on that date or + This can be used to list the times for all events that can take reservations on that date or can be used along with the "event" ID attribute to list all times on that date for the specified - event. Additionally both "date" and "time" can be used to together to list all occurances on a + event. Additionally both "date" and "time" can be used to together to list all occurances on a specific date and at a specific time. @@ -183,9 +183,9 @@ $glmMembersRegistrationsShortcodesDescription = ' time="{a text time}" A time string used to search for matching event instances, primarily for the "Registrations List" page. - This can be used to list the dates for all events that can take reservations at that particular time of day or + This can be used to list the dates for all events that can take reservations at that particular time of day or can be used along with the "event" ID attribute to list all dates for that time for the specified - event. Additionally both "date" and "time" can be used to together to list all occurances on a + event. Additionally both "date" and "time" can be used to together to list all occurances on a specific date and at a specific time. @@ -193,13 +193,13 @@ $glmMembersRegistrationsShortcodesDescription = '   account="{ID of a specific user account}" - This is the ID of a specific registration user account. Registration "accounts" hold information on + This is the ID of a specific registration user account. Registration "accounts" hold information on a particular person. That person/account may have been registered for one or more event or may have submitted one or more registreation carts.
- This is primarily used to specify the + This is primarily used to specify the currently logged-in account, but it is more likely to be obtained from currently logged-in information that is stored along with some type of browser storage or session. Use of an account - that is not currently logged in may be permitted in some restricted cases. + that is not currently logged in may be permitted in some restricted cases. '; diff --git a/views/front/registrations/cart.html b/views/front/registrations/cart.html index f9c7be3..0560945 100644 --- a/views/front/registrations/cart.html +++ b/views/front/registrations/cart.html @@ -14,7 +14,7 @@
{foreach $event.classes as $class} - +

Level: {$class.class_name}

@@ -22,7 +22,7 @@
{foreach $class.rates as $rate} - +

Rate: {$rate.rate_name}
Base Rate: {$rate.base_rate}
@@ -40,7 +40,7 @@ {$aid = $registrant.account} Registrant Name: {$account.$aid.fname} {$account.$aid.lname}
- Date & Time: {$registrant.event_datetime.datetime}
+ Date & Time: {$registrant.event_datetime.datetime}
Charges: {$registrant.totalCharges}
Discounts: {$registrant.totalDiscounts}
Net Charges: {$registrant.rateTotal}