From: Steve Sutton Date: Tue, 14 Apr 2015 15:36:45 +0000 (-0400) Subject: Update the email message for the passport form X-Git-Tag: v1.3.3^2~5 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=f8562f85dee62ba97f9107f5b76bcbfb18d4e41a;p=web%2FGaylordGolfMecca.git Update the email message for the passport form CHANGE TEXT IN BEGINNING OF EMAIL: Thank you for ordering the Gaylord Golf Mecca Passport. This is a confirmation receipt for: Customer information (name, address, etc) [spelling correction ss] Line break the quantity and price and type (individual line items) Shipping fee Total of order --- diff --git a/Toolkit/Contacts/ContactUs.php b/Toolkit/Contacts/ContactUs.php index 337bf6d..f1830d1 100755 --- a/Toolkit/Contacts/ContactUs.php +++ b/Toolkit/Contacts/ContactUs.php @@ -906,6 +906,7 @@ class Toolkit_Contacts_ContactUs $email, $emailSubject, $emailTemplate, + $emailData = null, $mailFactory = 'mail' ) { @@ -918,6 +919,7 @@ class Toolkit_Contacts_ContactUs $page->subject = $emailSubject; $page->fname = $this->getSubmitValue('fname'); $page->lname = $this->getSubmitValue('lname'); + $page->formData = $emailData; if ($this->elementExists('qty')) { $page->qty = $this->getSubmitValue('qty'); diff --git a/Toolkit/Contacts/PassPort.php b/Toolkit/Contacts/PassPort.php index 9a4b7e0..5a51d0f 100755 --- a/Toolkit/Contacts/PassPort.php +++ b/Toolkit/Contacts/PassPort.php @@ -1,6 +1,6 @@ 'State/Province', 'opts' => $GLOBALS['states'] ); + $e[] = array( + 'type' => 'text', + 'req' => true, + 'name' => 'zip', + 'display' => 'ZIP/Postal Code' + ); $e[] = array( 'type' => 'email', 'req' => true, @@ -213,12 +219,6 @@ class Toolkit_Contacts_PassPort 'name' => 'email_rmv', 'display' => 'Verify E-mail' ); - $e[] = array( - 'type' => 'text', - 'req' => true, - 'name' => 'zip', - 'display' => 'ZIP/Postal Code' - ); $e[] = array( 'type' => 'tel', 'req' => false, @@ -268,8 +268,8 @@ class Toolkit_Contacts_PassPort 'type' => 'static', 'req' => false, 'display' => '' - . '' - . '' + . '' + . '' . '
Postage and Handling
Total Price
Postage and Handling$
Total Price$
' ); @@ -315,13 +315,15 @@ class Toolkit_Contacts_PassPort 'm' => 'mm', 'Y' => 'yyyy' ) - ) + ), + 'att' => array('style' => 'width: 70px;') ); $e[] = array( 'type' => 'text', 'req' => true, 'name' => 'cc_cvv', 'display' => 'CVV', + 'opts' => array('style' => 'width: 50px;') ); } @@ -485,10 +487,30 @@ class Toolkit_Contacts_PassPort { $email = $this->getSubmitValue('email'); if (GLM_TOOLBOX::valid_email($email)) { + $perPrice = filter_var($_REQUEST['pass_type'], FILTER_VALIDATE_INT); + $qtyPassports = filter_var($_REQUEST['qty'], FILTER_VALIDATE_INT); + $totalCharge = filter_var($_REQUEST['total_price'], FILTER_VALIDATE_INT); $this->sendConfirmation( - $email, // Email to - 'Gaylord Golf Passport', // Email Subject - 'passportConfEmail.tpl' // Email Template File + 'vagrant@localhost',//$email, // Email to + 'Gaylord Golf Passport Order', // Email Subject + 'passportConfEmail.tpl', // Email Template File + array( + 'fields' => array( + 'First Name' => filter_var($_REQUEST['fname'], FILTER_SANITIZE_STRING), + 'Last Name' => filter_var($_REQUEST['lname'], FILTER_SANITIZE_STRING), + 'Address' => filter_var($_REQUEST['address'], FILTER_SANITIZE_STRING), + 'City' => filter_var($_REQUEST['city'], FILTER_SANITIZE_STRING), + 'State' => filter_var($_REQUEST['state'], FILTER_SANITIZE_STRING), + 'ZIP' => filter_var($_REQUEST['zip'], FILTER_SANITIZE_STRING), + 'Email' => filter_var($_REQUEST['email'], FILTER_SANITIZE_STRING), + 'Telephone' => filter_var($_REQUEST['phone'], FILTER_SANITIZE_STRING), + ), + 'qtyPassports' => $qtyPassports, + 'perPrice' => $perPrice, + 'passportPrice' => $qtyPassports * $perPrice, + 'shipping' => 3, + 'totalCharge' => $totalCharge + ) ); } } @@ -688,6 +710,7 @@ class Toolkit_Contacts_PassPort $this->mergeFiles ); if ($res === true) { + $this->captchaQuestion->destroy(); $this->cleanForm(); $this->freeze(); $this->emailOwner(); diff --git a/Toolkit/Contacts/templates/passportConfEmail.tpl b/Toolkit/Contacts/templates/passportConfEmail.tpl index 056a34d..6970299 100755 --- a/Toolkit/Contacts/templates/passportConfEmail.tpl +++ b/Toolkit/Contacts/templates/passportConfEmail.tpl @@ -11,14 +11,36 @@ {subject:h}

- +
@@ -27,7 +49,7 @@
- +
+
-

Thank you for requesting a Golf Passport!

-

This is a confirmation of your order for {qty} {pass_type}(s)

-

A $3.00 shipping charge is added to your total.

+

Thank you for ordering the Gaylord Golf Mecca Passport.

+

This is a confirmation receipt for:

+
+ + {foreach:formData[fields],label,value} + + + + + {end:} + + + + + + + + + + + + + +
{label}{value}
{formData[qtyPassports]} Passports at ${formData[perPrice]} each${formData[passportPrice]}
Shipping Charge${formData[shipping]}
Total Charge${formData[totalCharge]}
-
+ To ensure the delivery of these e-mails to your inbox, please add {email_from:h} to your e-mail Address Book or Safe List. diff --git a/js/PassportForm.js b/js/PassportForm.js index 4a506b6..9d6751e 100644 --- a/js/PassportForm.js +++ b/js/PassportForm.js @@ -28,7 +28,8 @@ $(document).ready(function () { PassportForm.pass_type = +$(this).val(); setPassportPrice(); }); - PassportForm.pass_type = pass_type.val(); + var pass_type_selected = $('input[name="pass_type"]:checked'); + PassportForm.pass_type = pass_type_selected.val(); PassportForm.qty = qty.val(); setPassportPrice(); });