From e5a3f1cbe89f4d1598a264e1912e42e5c45c2534 Mon Sep 17 00:00:00 2001 From: Chuck Scott Date: Thu, 14 Jun 2018 16:20:51 -0400 Subject: [PATCH] Continuing work on reported checkout issues 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 | 4 +-- .../front/registrations/checkoutProcess.php | 32 +++++++++++++------ views/front/registrations/register.html | 16 +++++----- views/front/registrations/summary.html | 16 +++++----- 4 files changed, 40 insertions(+), 28 deletions(-) diff --git a/classes/regCartSupport.php b/classes/regCartSupport.php index bfae21a..c41b91f 100644 --- a/classes/regCartSupport.php +++ b/classes/regCartSupport.php @@ -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); diff --git a/models/front/registrations/checkoutProcess.php b/models/front/registrations/checkoutProcess.php index 7b0703c..aaa3c03 100644 --- a/models/front/registrations/checkoutProcess.php +++ b/models/front/registrations/checkoutProcess.php @@ -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", "
$requestText
"); + } 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. ' diff --git a/views/front/registrations/register.html b/views/front/registrations/register.html index 3aa39ba..141fcc0 100644 --- a/views/front/registrations/register.html +++ b/views/front/registrations/register.html @@ -13,13 +13,13 @@
-
-