Continuing work on reported checkout issues
authorChuck Scott <cscott@gaslightmedia.com>
Thu, 14 Jun 2018 20:20:51 +0000 (16:20 -0400)
committerChuck Scott <cscott@gaslightmedia.com>
Thu, 14 Jun 2018 20:20:51 +0000 (16:20 -0400)
Fixed confusion with checkout data when using "Do not clear" feature.
Fixed problem with Checkout data submission for non-payment checkout methods.
Cleaned up Register New Account forms.
Further enhanced checkout failure message data sent to cscott@gaslightmedia.com.
Now displaying failure message if using "Do not clear" feature.
Verfied that only one message is sent when attendee and submitting account have same E-mail.

classes/regCartSupport.php
models/front/registrations/checkoutProcess.php
views/front/registrations/register.html
views/front/registrations/summary.html

index bfae21a..c41b91f 100644 (file)
@@ -1432,8 +1432,8 @@ class GlmRegCartSupport
                 $subjectLine = $this->generateHTML($viewData, $regMisc['submission_notify_subject'], true);
                 $emailMsg = $this->generateHTML($viewData, nl2br($regMisc['submission_notify_text']), true)."\n\n".$summary;
 
-                // If front debug is on and this is a test submission output message to screen rather than semd.
-                if (GLM_MEMBERS_PLUGIN_FRONT_DEBUG && $doNotUpdateInventory) {
+                // If front debug is on and this is a test submission output message to screen rather than send.
+                if (GLM_MEMBERS_PLUGIN_FRONT_DEBUG) {
                     $this->displayEmailforTesting('Notice to Person Submitting Registrations', $submitAddr, $subjectLine, $emailMsg);
                 } else {
                     $this->sendHtmlEmail($submitAddr, $subjectLine, $emailMsg);
index 7b0703c..aaa3c03 100644 (file)
@@ -181,8 +181,7 @@ class GlmMembersFront_registrations_checkoutProcess extends GlmRegCartSupport
 
                 // Try to update the account information and if that works get the data for editing again
                 if ($accountId > 0) {
-                    // Update the account billing information only then grab it again for edit to match what we're getting below.
-                    $regAccount = $Account->updateAccountBillingOnly($accountId);
+                    $regAccount = $Account->updateEntry($accountId);
                     $regAccount = $Account->editEntry($accountId);
                 }
 
@@ -653,7 +652,7 @@ class GlmMembersFront_registrations_checkoutProcess extends GlmRegCartSupport
         );
 
         // Save date, pay method, status, total
-        if (count($messages) == '' && !$doNotClear) {
+        if (count($messages) == '') {
 
             $reqData = array_merge(
                 $reqData,
@@ -684,6 +683,9 @@ class GlmMembersFront_registrations_checkoutProcess extends GlmRegCartSupport
                 )
             );
 
+            if ($doNotClear) {
+                $reqData['status'] = $this->config['submission_status_numb']['CART'];
+            }
         }
 
         // Store the data
@@ -696,13 +698,23 @@ class GlmMembersFront_registrations_checkoutProcess extends GlmRegCartSupport
 
         // Check if not properly stored ..... Send E-Mail to developers
         if ($updated != 1) {
-            $reqData['wpdb_error_message'] = $last_error;
-            $reqData['query_result'] = print_r($updated,1);
-            $reqData['user_trace_info'] = unserialize($reqData['user_trace_info']);
-            $reqData['REQUEST'] = $_REQUEST;
-            $reqData['REQUEST']['cc_numb'] = '(suppressed)';
-            $requestText = print_r($reqData,1);
-            mail('cscott@gaslightmedia.com', 'Registration Add-On Failure:', $requestText);
+            $err = array(
+                'Site'                  => $this->config['settings']['reg_org_name'],
+                'requestId'             => $requestId,
+                'wpdb_error_message'    => $last_error,
+                'query_result'          => print_r($updated,1),
+                'user_trace_info'       => unserialize($reqData['user_trace_info']),
+                '$_REQUEST'             => $_REQUEST,
+                'submittedData'         => $reqData
+            );
+            $requestText = print_r($err,1);
+
+            if ($doNotClear) {
+                $this->displayEmailforTesting($this->config['settings']['reg_org_short'].": Registgration Storage Failure at Checkout", 'cscott@gaslightmedia.com', $this->config['settings']['reg_org_short'].": Registration Storage Failure at Checkout", "<pre>$requestText</pre>");
+            } else {
+                mail('cscott@gaslightmedia.com', 'Registration Add-On Failure:', $requestText);
+            }
+
             $messages[] =
                  'Oops, we had a technical problem of some sort. '
                 .'Our shiny new servers were unable to store the request you submitted but have already taken the precaution to notify us. '
index 3aa39ba..141fcc0 100644 (file)
             </div>
             <div class="row">
                 <div class="small-12 large-6 columns">
-                    <label class="error">Email Address *
+                    <label class="error">Email Address
                         {if $emailError} <span class="glm-error">{$emailError}</span> {/if}
                         <input name="email" value="" required>
                     </label>
                 </div>
                 <div class="small-12 large-6 columns">
-                    <label class="error">{$terms.reg_term_password_cap} *
+                    <label class="error">{$terms.reg_term_password_cap}
                         {if $passwordError} <span class="glm-error">{$passwordError}</span> {/if}
                         <input type="password" name="password" value="" required>
                     </label>
             <div class="row">
                 <div class="small-12 large-6 columns">
                     <label class="error">
-                        First Name *
+                        First Name
                         <input name="fname" value="{$reg.fname}" required>
                     </label>
                 </div>
                 <div class="small-12 large-6 columns">
                     <label class="error">
-                        Last Name *
+                        Last Name
                     </label>
                     <input name="lname" value="{$reg.lname}" required>
                 </div>
@@ -42,7 +42,7 @@
             <div class="row">
                 <div class="small-12 large-6 columns">
                     <label class="error">
-                        Address 1 *
+                        Address 1
                         <input name="addr1" value="{$reg.addr1}" required>
                     </label>
                 </div>
             <div class="row">
                 <div class="small-12 large-4 columns">
                     <label class="error">
-                        City *
+                        City
                         <input name="city" value="{$reg.city}" required>
                     </label>
                 </div>
                 <div class="small-12 large-4 columns">
                     <label class="error">
-                        State *
+                        State
                         <select name="state">
                             <option value=""></option>
                             {foreach $states_list as $stateAbbr => $stateName}
@@ -73,7 +73,7 @@
                 </div>
                 <div class="small-12 large-4 columns">
                     <label class="error">
-                        Zip/Postal Code *
+                        Zip/Postal Code
                         <input name="zip" value="{$reg.zip}" required>
                     </label>
                 </div>
index b6e7baa..c782cf1 100644 (file)
             </div>
             <div class="row">
                 <div class="small-12 large-6 columns">
-                    <label class="error">Email Address *
+                    <label class="error">Email Address
                         {if $emailError} <span class="glm-error">{$emailError}</span> {/if}
                         <input name="email" value="" required>
                     </label>
                 </div>
                 <div class="small-12 large-6 columns">
-                    <label class="error">{$terms.reg_term_password_cap} *
+                    <label class="error">{$terms.reg_term_password_cap}
                         {if $passwordError} <span class="glm-error">{$passwordError}</span> {/if}
                         <input type="password" name="password" value="" required>
                     </label>
             <div class="row">
                 <div class="small-12 large-6 columns">
                     <label class="error">
-                        First Name *
+                        First Name
                         <input name="fname" value="{$reg.fname}" required>
                     </label>
                 </div>
                 <div class="small-12 large-6 columns">
                     <label class="error">
-                        Last Name *
+                        Last Name
                     </label>
                     <input name="lname" value="{$reg.lname}" required>
                 </div>
@@ -66,7 +66,7 @@
             <div class="row">
                 <div class="small-12 large-6 columns">
                     <label class="error">
-                        Address 1 *
+                        Address 1
                         <input name="addr1" value="{$reg.addr1}" required>
                     </label>
                 </div>
             <div class="row">
                 <div class="small-12 large-4 columns">
                     <label class="error">
-                        City *
+                        City
                         <input name="city" value="{$reg.city}" required>
                     </label>
                 </div>
                 <div class="small-12 large-4 columns">
                     <label class="error">
-                        State *
+                        State
                         <select name="state">
                             <option value=""></option>
                             {foreach $states_list as $stateAbbr => $stateName}
@@ -97,7 +97,7 @@
                 </div>
                 <div class="small-12 large-4 columns">
                     <label class="error">
-                        Zip/Postal Code *
+                        Zip/Postal Code
                         <input name="zip" value="{$reg.zip}" required>
                     </label>
                 </div>