Work on requested updates and fixes and some bugs found while working on Registrations
authorChuck Scott <cscott@gaslightmedia.com>
Fri, 20 Apr 2018 19:59:28 +0000 (15:59 -0400)
committerChuck Scott <cscott@gaslightmedia.com>
Fri, 20 Apr 2018 19:59:28 +0000 (15:59 -0400)
Added E-Mail address to accounts dashboard list in eventDashboard.html
Fixed problem with event Payment Codes showing up in all Events in event_paymentCodes.php
Replaced GLM Grid version stored summary with table driven version to work in E-Mail in summaryStore.html
Fixed minor problems in cart and checkout summaries in cartSummary.html
Added more data that can be used in notifications to attendee in regCartSupport.php
Fixed save credit card text and checkbox showing when credit card payment not selected
Now removing payment methods from events that are not enabled in management.

classes/data/dataRegEvent.php
classes/regCartSupport.php
models/admin/registrations/events_paymentCodes.php
models/front/registrations/checkoutProcess.php
views/admin/registrations/accountsDashboard.html
views/admin/registrations/eventPaymentCodes.html
views/front/registrations/cartSummary.html
views/front/registrations/checkout.html
views/front/registrations/summaryStore.html

index 5e0d552..e7d7655 100644 (file)
@@ -352,6 +352,15 @@ class GlmDataRegistrationsRegEvent extends GlmDataAbstract
     public function entryPostProcessing( $result_data, $action )
     {
 
+        // Remove payment methods that are turned of in management
+        foreach ($result_data['payment_methods']['bitmap'] as $pmKey=>$pm) {
+            $bit = pow(2, $pm['value']);
+            if (($bit & $this->config['settings']['reg_payment_methods']) == 0) {
+                unset($result_data['payment_methods']['bitmap'][$pmKey]);
+                unset($result_data['restricted_payment_methods']['bitmap'][$pmKey]);
+            }
+        }
+
         // If $postProcAddedEventData option set
         if ($this->postProcAddedEventData) {
 
@@ -466,6 +475,7 @@ class GlmDataRegistrationsRegEvent extends GlmDataAbstract
             'id' => $savedFields['id'],
             'event_name' => $savedFields['event_name'],
             'notify_email' => $savedFields['notify_email'],
+            'blabla' => 1,
             'descr' => $savedFields['descr'],
             'first_datetime' => $savedFields['first_datetime'],
             'last_datetime' => $savedFields['last_datetime']
index f148314..94ea65a 100644 (file)
@@ -1,4 +1,7 @@
 <?php
+use PayPal\Api\Address;
+use net\authorize\api\contract\v1\LineItemType;
+
 /**
  * Gaslight Media Associate
  * Registrations Plugin support class
@@ -266,7 +269,7 @@ class GlmRegCartSupport
                                     foreach ($this->cart['events'][$eventKey]['classes'][$classKey]['rates'][$rateKey]['registrants'] as $registrantKey => $registrant) {
 
                                         // Provide a more friendly date/time output
-                                        $this->cart['events'][$eventKey]['classes'][$classKey]['rates'][$rateKey]['registrants'][$registrantKey]['timeReformatted'] = date('m/d/Y g:i A', strtotime($registrant['event_time']));
+                                        $this->cart['events'][$eventKey]['classes'][$classKey]['rates'][$rateKey]['registrants'][$registrantKey]['timeReformatted'] = date('m/d/Y at g:i A', strtotime($registrant['event_time']));
 
                                         // Add registrant account to accounts table if needed
                                         $this->addAccountToCart($registrant['account']);
@@ -303,8 +306,12 @@ class GlmRegCartSupport
                                         // If custom fields add-on is installed - get custom fields data
                                         $this->cart['events'][$eventKey]['classes'][$classKey]['rates'][$rateKey]['registrants'][$registrantKey]['event_attendee_custom_form'] = false;
                                         if (apply_filters('glm-members-customfields-plugin-active', false)) {
+
                                             $form = apply_filters( 'glm-members-customfields-form-data-recall', '', "glm_reg_customfields_reg_event_attendee_".$event['reg_event'], $registrantKey, true );
                                             $this->cart['events'][$eventKey]['classes'][$classKey]['rates'][$rateKey]['registrants'][$registrantKey]['event_attendee_custom_form'] = $form;
+
+                                            $form = apply_filters( 'glm-members-customfields-form-data-recall', '', "glm_reg_customfields_reg_event_".$event['reg_event']."_level_".$class['class'], $registrantKey, true );
+                                            $this->cart['events'][$eventKey]['classes'][$classKey]['rates'][$rateKey]['registrants'][$registrantKey]['event_attendee_custom_form_level'] = $form;
                                         }
 
                                     } // Each Registrant
@@ -490,6 +497,12 @@ class GlmRegCartSupport
                                                 if (!isset($regEventTimes[$registrant['reg_time']]) || !$regEventTimes[$registrant['reg_time']]['active']['value']) {
                                                     $this->cart['messages'][] = "The event date and/or time selected for ".$registrant['fname'].' '.$registrant['fname']." has been dropped from the event. Registrant was removed.";
                                                     $removeRegistrant = true;
+                                                } else {
+
+                                                    // Add some info from the time record to the registrant
+                                                    $this->cart['events'][$eventKey]['classes'][$classKey]['rates'][$rateKey]['registrants'][$registrantKey]['non_time_specific'] = $regEventTimes[$registrant['reg_time']]['non_time_specific']['value'];
+                                                    $this->cart['events'][$eventKey]['classes'][$classKey]['rates'][$rateKey]['registrants'][$registrantKey]['reg_event_descr'] = $regEventTimes[$registrant['reg_time']]['descr'];
+
                                                 }
 
                                                 // Check the if registrant does not have a reg_time_pending entry
@@ -552,7 +565,7 @@ class GlmRegCartSupport
                                                 }
 
                                                 // Add a more familiar date/time
-                                                $this->cart['events'][$eventKey]['classes'][$classKey]['rates'][$rateKey]['registrants'][$registrantKey]['timeReformatted'] = date('m/d/Y g:i A', strtotime($registrant['event_time']));
+                                                $this->cart['events'][$eventKey]['classes'][$classKey]['rates'][$rateKey]['registrants'][$registrantKey]['timeReformatted'] = date('m/d/Y at g:i A', strtotime($registrant['event_time']));
 
                                             } // Each registrant
 
@@ -1316,12 +1329,13 @@ class GlmRegCartSupport
      *
      * @param string $summary HTML Summary of checkout for sending to owner and requesting address
      * @param integer $requestId Specify the request ID - not required if cart is already loaded
+     * @param boolean $doNotUpdateInventory If TRUE, don't update the inventory numbers (for testing only)
      *
      * @return null
      *
      * @access public
      */
-    public function checkoutUpdateInventoryAndNotify($summary = '', $requestId = false)
+    public function checkoutUpdateInventoryAndNotify($summary = '', $requestId = false, $doNotUpdateInventory = false)
     {
 
         $RegEvent = new GlmDataRegistrationsRegEvent($this->wpdb, $this->config);
@@ -1357,16 +1371,23 @@ class GlmRegCartSupport
          */
         $accountId = $this->cart['request']['account'];
         if (isset($this->cart['accounts'][$accountId])) {
-            $emailAddr = '';
+            $submitAddr = '';
             if (trim($this->cart['accounts'][$accountId]['email']) != '') {
-                $emailAddr = $this->cart['accounts'][$accountId]['email'];
+                $submitAddr = $this->cart['accounts'][$accountId]['email'];
             } elseif (trim($this->cart['accounts'][$accountId]['contact_email']) != '') {
-                $emailAddr = $this->cart['accounts'][$accountId]['contact_email'];
+                $submitAddr = $this->cart['accounts'][$accountId]['contact_email'];
             }
-            if ($emailAddr != '') {
+            if ($submitAddr != '') {
+
                 $subjectLine = $this->generateHTML($viewData, $regMisc['submission_notify_subject'], true);
                 $emailMsg = $this->generateHTML($viewData, nl2br($regMisc['submission_notify_text']), true)."\n\n".$summary;
-                $this->sendHtmlEmail($emailAddr, $subjectLine, $emailMsg);
+
+                // 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) {
+                    $this->displayEmailforTesting('Notice to Person Submitting Registrations', $submitAddr, $subjectLine, $emailMsg);
+                } else {
+                    $this->sendHtmlEmail($submitAddr, $subjectLine, $emailMsg);
+                }
             }
         }
 
@@ -1385,7 +1406,9 @@ class GlmRegCartSupport
                     foreach ($rate['registrants'] as $registrant) {
 
                         // Adjust the inventory and hold numbers
-                        $this->updateTimeEntryCounts($registrant['reg_time'], -1, 1);
+                        if (!$doNotUpdateInventory) {
+                            $this->updateTimeEntryCounts($registrant['reg_time'], -1, 1);
+                        }
 
                         // Remove the hold record
                         $this->wpdb->delete(
@@ -1404,11 +1427,25 @@ class GlmRegCartSupport
                             } elseif (trim($this->cart['accounts'][$accountId]['contact_email']) != '') {
                                 $emailAddr = $this->cart['accounts'][$accountId]['contact_email'];
                             }
-                            if ($emailAddr != '') {
-                                $viewData['registrant'] = $registrant;
-                                $subjectLine = $this->generateHTML($viewData, $regMisc['registrant_notify_subject'], true);
-                                $emailMsg = $this->generateHTML($viewData, nl2br($regMisc['registrant_notify_text']), true);
-                                $this->sendHtmlEmail($emailAddr, $subjectLine, $emailMsg);
+                            if ($emailAddr != '' && $emailAddr != $submitAddr) {
+                                $vData = array(
+                                    'event' => $event['event_name'],
+                                    'description' => $registrant['reg_event_descr'],
+                                    'fname' => $registrant['fname'],
+                                    'lname' => $registrant['lname'],
+                                    'datetime' => $registrant['non_time_specific'] ? 'any time during event' : 'on '.$registrant['event_time_reformatted'],
+                                    'request_fname' => $this->cart['request']['bill_fname'],
+                                    'request_lname' => $this->cart['request']['bill_lname']
+                                );
+                                $subjectLine = $this->generateHTML($vData, $regMisc['registrant_notify_subject'], true);
+                                $emailMsg = $this->generateHTML($vData, nl2br($regMisc['registrant_notify_text']), true);
+
+                                // 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) {
+                                    $this->displayEmailforTesting("Notice to Registrant", $emailAddr, $subjectLine, $emailMsg);
+                                } else {
+                                    $this->sendHtmlEmail($emailAddr, $subjectLine, $emailMsg);
+                                }
                             }
                         }
 
@@ -1427,13 +1464,47 @@ class GlmRegCartSupport
                 $viewData['eventRegistrants'] = $eventRegistrants;
                 $subjectLine = $this->generateHTML($viewData, $regMisc['instr_notify_subject'], true);
                 $emailMsg = $this->generateHTML($viewData, nl2br($regMisc['instr_notify_text']), true);
-                $this->sendHtmlEmail($emailAddr, $subjectjectLine, $emailMsg);
+
+                // 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) {
+                    $this->displayEmailforTesting('Notice to Contacts Listed in Event', $emailAddr, $subjectLine, $emailMsg);
+                } else {
+                    $this->sendHtmlEmail($emailAddr, $subjectjectLine, $emailMsg);
+                }
+
             }
 
         }
 
     }
 
+    /**
+     * Output an E-Mail message to screen for testing
+     *
+     * @param $whatMsg string What message is being sent
+     * @param $to string To Address
+     * @param $subject string Subject Line
+     * @param $msg string Message body
+     *
+     * @return void
+     *
+     */
+    function displayEmailforTesting($whatMsg, $to, $subject, $msg)
+    {
+        echo '
+            <div>
+                <table>
+                    <tr><th>E-Mail Message:</th><td>'.$whatMsg.'</td></tr>
+                    <tr><td>To:</td><td>'.$to.'</td></tr>
+                    <tr><td>Subject:</td><td>'.$subject.'</td></tr>
+                    <tr><td valign="top">Body:</td><td>'.$msg.'</td></tr>
+                </table>
+            </div>
+        ';
+
+    }
+
+
     /**
      * Merge template and data to produce HTML
      *
index e9347d5..7cd7c74 100644 (file)
@@ -13,6 +13,9 @@
  * @link     http://dev.gaslightmedia.com/
  */
 
+// Get event ID
+$eventId = filter_input(INPUT_GET, 'regEventID', FILTER_SANITIZE_NUMBER_INT);
+
 require_once GLM_MEMBERS_REGISTRATIONS_PLUGIN_CLASS_PATH.'/data/dataPaymentCode.php';
 $PayCode = new GlmDataRegistrationsPaymentCode($this->wpdb, $this->config);
 
@@ -31,21 +34,25 @@ if (isset($_REQUEST['option2']) && $_REQUEST['option2'] != '') {
             break;
 
         case 'update':
-            $payCodeId = ($_REQUEST['payCodeId'] - 0);
-            $res = $PayCode->updateEntry($payCodeId);
-            if (!$res['status']) {
-                foreach ($res['fieldFail'] as $ff) {
-                    if (trim($ff) != '') {
-                        $messages[] = $ff;
+            if ($eventId) {
+                $payCodeId = ($_REQUEST['payCodeId'] - 0);
+                $res = $PayCode->updateEntry($payCodeId);
+                if (!$res['status']) {
+                    foreach ($res['fieldFail'] as $ff) {
+                        if (trim($ff) != '') {
+                            $messages[] = $ff;
+                        }
                     }
                 }
             }
             break;
 
         case 'delete':
-            $payCodeId = ($_REQUEST['payCodeId'] - 0);
-            if ( $payCodeId > 0 ) {
-                $PayCode->deleteEntry( $payCodeId, true );
+            if ($eventId) {
+                $payCodeId = ($_REQUEST['payCodeId'] - 0);
+                if ( $payCodeId > 0 ) {
+                    $PayCode->deleteEntry( $payCodeId, true );
+                }
             }
             break;
     }
@@ -56,7 +63,11 @@ $newPayCode = $PayCode->newEntry();
 // Specify the pay code type number that should be used.
 $refPaycodeType = $this->config['pay_code_ref_type_numb']['Event'];
 
-$payCodes = $PayCode->getList("T.ref_type = $refPaycodeType");
+// If we have an event ID then get any pacodes for that event
+$payCodes = false;
+if ($eventId) {
+    $payCodes = $PayCode->getList("T.ref_type = $refPaycodeType AND T.ref_dest = $eventId");
+}
 
 if ($payCodes) {
     $havePayCodes = true;
@@ -64,4 +75,5 @@ if ($payCodes) {
 
 $regEvent = $this->getEntry($regEventID);
 
+
 $view = 'eventPaymentCodes';
index 310de57..9b1601e 100644 (file)
@@ -277,7 +277,6 @@ class GlmMembersFront_registrations_checkoutProcess extends GlmRegCartSupport
         /*
          * Process Payment?
          */
-echo "Grand Total = ".$this->cart['grandTotal']."<P>";
 
         require_once GLM_MEMBERS_REGISTRATIONS_PLUGIN_CLASS_PATH.'/data/dataManagement.php';
         $Management = new GlmDataRegistrationsManagement($this->wpdb, $this->config);
@@ -618,8 +617,11 @@ echo "Grand Total = ".$this->cart['grandTotal']."<P>";
             )
         );
 
+        // Check if request to do a test checkout only - Don't clear session or update inventory
+        $doNotClear = $_REQUEST['bill_addr2'] == '*** GLM DO NOT CLEAR ***';
+
         // Save date, pay method, status, total
-        if (count($messages) == '' && $billing['addr2'] != '*** DO NOT CLEAR ***') {
+        if (count($messages) == '' && !$doNotClear) {
 
             $reqData = array_merge(
                 $reqData,
@@ -747,15 +749,12 @@ echo "Grand Total = ".$this->cart['grandTotal']."<P>";
             array( 'id' => $requestId ),
             array('%s')
         );
-        if ($updated != 1 && $billing['addr2'] != '*** DO NOT CLEAR ***') {
+        if ($updated != 1 && !$doNotClear) {
             $messages[] = 'Cart Summary did not store. This is a technical issue that means our systems could not store a summmary of what you submitted.';
         }
 
         // Update inventory totals and send notifications unless this is a test submission
-        if ($billing['addr2'] != '*** DO NOT CLEAR ***') {
-
-            $this->checkoutUpdateInventoryAndNotify($summary);
-        }
+        $this->checkoutUpdateInventoryAndNotify($summary, false, $doNotClear);
 
         // Send acknowledgement to person submitting request
         mail($request['email'], $misc['submission_ack_subject'], $summary);
@@ -769,7 +768,7 @@ echo "Grand Total = ".$this->cart['grandTotal']."<P>";
          * Remove cart from session
          *
          */
-        if ($billing['addr2'] != '*** DO NOT CLEAR ***') {
+        if (!$doNotClear) {
             unset($_SESSION['glm_reg_cart_id']);
         }
 
@@ -785,6 +784,7 @@ echo "Grand Total = ".$this->cart['grandTotal']."<P>";
             'guestAccount'   => $guestAccount,
             'requestId'      => $requestId,
             'summaryCheck'   => $summaryCheck,
+            'summary'        => $summary,
             'misc'           => $misc,
             'reg_account_id' => $accountId,
             'states_list'    => $this->config['states'],
@@ -793,6 +793,8 @@ echo "Grand Total = ".$this->cart['grandTotal']."<P>";
             'passwordError'  => $passwordError,
         );
 
+        // echo "<pre>".print_r($this->cart,1)."</pre>";
+
         // Return status, any suggested view, and any data to controller
         return array(
             'status'        => true,
index 2b461d3..2dc4e15 100644 (file)
@@ -39,6 +39,7 @@
                 <th>Active</th>
                 <th>First Name</th>
                 <th>Last Name</th>
+                <th>E-Mail Address</th>
                 <th>Organization</th>
                 <th>Title</th>
                 <th>City</th>
@@ -59,6 +60,7 @@
             <td>{$account.active.name}</td>
             <td>{$account.fname}</td>
             <td>{$account.lname}</td>
+            <td>{$account.email}</td>
             <td>{$account.org}</td>
             <td>{$account.title}</td>
             <td>{$account.city}</td>
index 3c4cb47..6fe222d 100644 (file)
@@ -22,7 +22,7 @@
 {/if}
 </div>
 
-<div>&nbsp;</div>ssss
+<div>&nbsp;</div>
 
 <table class="glm-admin-table glm-settings-table" style="width: 99%;">
     <tr><td colspan="2">
index 7753208..6a1f2bd 100644 (file)
                   ${$customField.cost|number_format:2}
                 </div>
           {/if}
-                </div>  
+            </div>  
+        {else}        
+          {if $summaryType=='store'}
+            <div class="row glm-reg-cart-registrant">
+                <div class="{$summaryColumnsItem}  column glm-reg-cart-summary-custom-fields" >
+                    <span class="glm-reg-label glm-reg-cart-data glm-reg-cart-data-label">{$customField.field_name}: </span>
+                    <span class="glm-reg-cart-data glm-reg-cart-data-value">{$customField.stored}</span>
+                </div>
+            {if $customField.cost > 0}                
+                <div class="{$summaryColumnsCharge} column glm-reg-right glm-reg-cart-data glm-reg-cart-charge glm-reg-cart-custom-charge">
+                  ${$customField.cost|number_format:2}
+                </div>
+            {/if}
+            </div>
+          {/if}  
+        {/if}
+      {/foreach}
+    {/if}                    
+    {if $registrant.event_attendee_custom_form_level}
+      {foreach $registrant.event_attendee_custom_form_level.form as $customField}
+        {if $customField.priority_display.value || $customField.cost > 0}
+            <div class="row glm-reg-cart-registrant">
+                <div class="{$summaryColumnsItem}  column glm-reg-cart-summary-custom-fields" >
+                    <span class="glm-reg-label glm-reg-cart-data glm-reg-cart-data-label">{$customField.field_name}: </span>
+                    <span class="glm-reg-cart-data glm-reg-cart-data-value">{$customField.stored}</span>
+                </div>
+          {if $customField.cost > 0}                
+                <div class="{$summaryColumnsCharge} column glm-reg-right glm-reg-cart-data glm-reg-cart-charge glm-reg-cart-custom-charge">
+                  ${$customField.cost|number_format:2}
+                </div>
+          {/if}
+            </div>  
+        {else}
+          {if $summaryType=='store'}
+            <div class="row glm-reg-cart-registrant">
+                <div class="{$summaryColumnsItem}  column glm-reg-cart-summary-custom-fields" >
+                    <span class="glm-reg-label glm-reg-cart-data glm-reg-cart-data-label">{$customField.field_name}: </span>
+                    <span class="glm-reg-cart-data glm-reg-cart-data-value">{$customField.stored}</span>
+                </div>
+            {if $customField.cost > 0}                
+                <div class="{$summaryColumnsCharge} column glm-reg-right glm-reg-cart-data glm-reg-cart-charge glm-reg-cart-custom-charge">
+                  ${$customField.cost|number_format:2}
+                </div>
+            {/if}
+            </div>
+          {/if}  
         {/if}
       {/foreach}
     {/if}                    
    {foreach $event.payCodes as $payCode}
             <div class="row glm-reg-cart-event-discount">
                 <div class="small-8 medium-8 column glm-reg-right glm-reg-cart-label">
-                    <b>Discount Code:</b> "{$payCode.code}", 
-     {if $payCode.code_type == 'Free'}Free{/if}  
-     {if $payCode.code_type =='Amount'}${$payCode.amount|number_format:2}{/if}                
-     {if $payCode.code_type == 'Percent'}{$payCode.amount}%{/if}                
+                    <b>Event {$terms.reg_term_payment_code_cap}:</b> "{$payCode.code}", 
                 </div>
                 <div class="small-4 medium-4 column glm-reg-right glm-reg-cart-data">
-                    ${$payCode.thisDiscount|number_format:2}
+                    -${$payCode.thisDiscount|number_format:2}
                 </div>
             </div>
    {/foreach}
- {/if}
- {if $event.eventDiscounts > 0}
- <!-- 
-            <div class="row glm-reg-cart-event-discount">
-                <div class="small-8 medium-8 column glm-reg-right glm-reg-cart-label">
-                    Event Discounts
-                </div>
-                <div class="small-4 medium-4 column glm-reg-right glm-reg-cart-data">
-                     ${$event.eventDiscounts|number_format:2}
-                </div>
-            </div>
- -->            
  {/if}
             <div class="row glm-reg-row-bold glm-reg-cart-event-registrants">
                 <div class="small-12 column glm-reg-right glm-reg-cart-data glm-reg-cart-subtotal">
         </div>
 {if $cart.globalPayCodes}
 <div class="small-12 columns">
-    
-
   {foreach $cart.globalPayCodes as $payCode}
             <div class="row glm-reg-cart-event-discount">
                 <div class="small-8 column glm-reg-right glm-reg-cart-label glm-reg-cart-discount-total">
-                    <b>Discount Code:</b> "{$payCode.code}", 
-    {if $payCode.code_type == 'Free'}Free{/if}  
-    {if $payCode.code_type =='Amount'}${$payCode.amount|number_format:2}{/if}                
-    {if $payCode.code_type == 'Percent'}{$payCode.amount}%{/if}                
+                    <b>Global {$terms.reg_term_payment_code_cap}:</b> "{$payCode.code}", 
                 </div>
                 <div class="small-4 column glm-reg-right glm-reg-cart-data">
-                    ${$payCode.thisDiscount|number_format:2}
+                    -${$payCode.thisDiscount|number_format:2}
                 </div>
             </div>
   {/foreach}
 </div>
-{/if}
-{if $cart.totalDiscounts > 0}
-<!-- 
-        <div class="row glm-reg-cart-total-discounts">
-            <div class="small-12 medium-8 column glm-reg-right glm-reg-cart-label">
-                Total Discounts
-            </div>
-            <div class="small-12 medium-4 column glm-reg-right glm-reg-cart-data">
-                ${$cart.totalDiscounts|number_format:2}
-            </div>
-        </div>
- -->        
 {/if}
         <div class="row glm-reg-row-bold glm-reg-cart-summary-footer">
             <div class="small-12 medium-7 column text-center glm-reg-cart-total-attendees">
index 36ca25f..9f3826a 100644 (file)
                                     <input type="text" placeholder="3 or 4 digit security code on back of card" name="cc_cvv" value="{$regAccount.fieldData.cc_cvv}"{if $regAccount.fieldRequired.cc_cvv} required{/if} class="payMethodInput payMethodInput_{$pmNumb} cvv-input">
                                 </div>
                             </div>
-                        </div>
                 {if $settings.reg_proc_methods == 2} {* If using Authorize.net *}
                             <div class="glm-reg-row savedCardProfileHide">
                                 <div class="glm-reg-checkout-field-data glm-small-12 glm-large-12 glm-columns">
                                </div>
                             </div>                        
                 {/if}
+                        </div>
             {else}
                         <div id="payMethod_{$pmNumb}" class="payMethodSelection glm-hidden">
 
index 1b83725..5c664e6 100644 (file)
@@ -1,12 +1,6 @@
 <html>    
     <head>
         <style>
-            
-/* GLM GRID */            
-{literal}
-.glm-small-1{width:5.33333rem}.glm-small-2{width:10.66667rem}.glm-small-3{width:16rem}.glm-small-4{width:21.33333rem}.glm-small-5{width:26.66667rem}.glm-small-6{width:32rem}.glm-small-7{width:37.33333rem}.glm-small-8{width:42.66667rem}.glm-small-9{width:48rem}.glm-small-10{width:53.33333rem}.glm-small-11{width:58.66667rem}.glm-small-12{width:64rem}.glm-medium-1{width:5.33333rem}.glm-medium-2{width:10.66667rem}.glm-medium-3{width:16rem}.glm-medium-4{width:21.33333rem}.glm-medium-5{width:26.66667rem}.glm-medium-6{width:32rem}.glm-medium-7{width:37.33333rem}.glm-medium-8{width:42.66667rem}.glm-medium-9{width:48rem}.glm-medium-10{width:53.33333rem}.glm-medium-11{width:58.66667rem}.glm-medium-12{width:64rem}.glm-large-1{width:5.33333rem}.glm-large-2{width:10.66667rem}.glm-large-3{width:16rem}.glm-large-4{width:21.33333rem}.glm-large-5{width:26.66667rem}.glm-large-6{width:32rem}.glm-large-7{width:37.33333rem}.glm-large-8{width:42.66667rem}.glm-large-9{width:48rem}.glm-large-10{width:53.33333rem}.glm-large-11{width:58.66667rem}.glm-large-12{width:64rem}@media only screen{.glm-small-1{width:8.33333%}.glm-small-2{width:16.66667%}.glm-small-3{width:25%}.glm-small-4{width:33.33333%}.glm-small-5{width:41.66667%}.glm-small-6{width:50%}.glm-small-7{width:58.33333%}.glm-small-8{width:66.66667%}.glm-small-9{width:75%}.glm-small-10{width:83.33333%}.glm-small-11{width:91.66667%}.glm-small-12{width:100%}}@media only screen and (min-width: 40.0625em){.glm-medium-1{width:8.33333%}.glm-medium-2{width:16.66667%}.glm-medium-3{width:25%}.glm-medium-4{width:33.33333%}.glm-medium-5{width:41.66667%}.glm-medium-6{width:50%}.glm-medium-7{width:58.33333%}.glm-medium-8{width:66.66667%}.glm-medium-9{width:75%}.glm-medium-10{width:83.33333%}.glm-medium-11{width:91.66667%}.glm-medium-12{width:100%}}@media only screen and (min-width: 64.0625em){.glm-large-1{width:8.33333%}.glm-large-2{width:16.66667%}.glm-large-3{width:25%}.glm-large-4{width:33.33333%}.glm-large-5{width:41.66667%}.glm-large-6{width:50%}.glm-large-7{width:58.33333%}.glm-large-8{width:66.66667%}.glm-large-9{width:75%}.glm-large-10{width:83.33333%}.glm-large-11{width:91.66667%}.glm-large-12{width:100%}}.glm-row{width:100%;position:relative}.glm-row::after{clear:both}.glm-row::before,.glm-row::after{content:" ";display:table}.glm-row::before,.glm-row::after{content:" ";display:table}.glm-row{clear:both;margin-left:auto;margin-right:auto;max-width:64rem;width:100%}.wp-admin .glm-row{clear:both;margin-left:auto;margin-right:auto;max-width:100%;width:100%}.glm-column,.glm-columns{padding-left:0.9375rem;padding-right:0.9375rem;float:left}
-{/literal}            
-
 
             h3 {
                 color: #729d8d;
@@ -43,9 +37,6 @@
                 text-align: left;
                 padding: .2rem;
             }
-            .td-right {
-                text-align: right;
-            }
             .event-line {
                 padding-top: 1rem;
             }
@@ -70,9 +61,6 @@
             .glm-reg-space-left {
                 padding-left: 1.25rem;
             }
-            .glm-reg-right {
-                text-align: right;
-            }
             .glm-reg-row-bold {
                 font-weight: bold;
             }
                 height: 2rem;
                 padding-top: .2rem;
             }
+            .glm-reg-c1 {
+                white-space: nowrap;
+                vertical-align: top;
+            }
+            .glm-reg-c2 {
+            }
+            .glm-reg-c3 {
+                text-align: right;
+            }
+            .glm-reg-text-right {
+                text-align: right;
+            }
+            
         </style>
     </head>
     <body>
                 <td class="container-table-td" valign="top">
                     <table class="info-table" width="100%">
                         <thead>
-                            <tr><th colspan="2">Submission</th></tr>
+                            <tr><th colspan="2" class="glm-reg-c1">Submission</th></tr>
                         </thead>
                         <tbody>
                    {if $account.fname || $account.lname}
                             <tr>
-                                <th valign="top">Requested By:</th>
+                                <th valign="top" class="glm-reg-c1">Requested By:</th>
                                 <td>
                                     {$account.fname} {$account.lname}{if $account.title}, {$account.title}{/if}<br>
                                     {if $account.org}{$account.org}<br>{/if}
                             </tr>
                     {/if}
                     {if $account.phone}
-                            <tr><th>Phone:</th><td>{$account.phone}</td></tr>
+                            <tr><th class="glm-reg-c1">Phone:</th><td>{$account.phone}</td></tr>
                     {/if}
                     {if $account.fax}
-                            <tr><th>title:</th><td>{$account.title}</td></tr>
+                            <tr><th class="glm-reg-c1">title:</th><td>{$account.title}</td></tr>
                     {/if}
-                            <tr><th>E-Mail Address:</th><td>{$account.email}</td></tr>                            
-                            <tr><th>Request #:</th><td>{$request.id}</td></tr>
-                            <tr><th>Submitted:</th><td>{$request.date_submitted.datetime}</td></tr>
-                            <tr><th>Status:</th><td>{$request.status.name}</td></tr>
+                            <tr><th class="glm-reg-c1">E-Mail Address:</th><td>{$account.email}</td></tr>                            
+                            <tr><th class="glm-reg-c1">Request #:</th><td>{$request.id}</td></tr>
+                            <tr><th class="glm-reg-c1">Submitted:</th><td>{$request.date_submitted.datetime}</td></tr>
+                            <tr><th class="glm-reg-c1">Status:</th><td>{$request.status.name}</td></tr>
                         </tbody>
                     </table>
                 </td>
                 <td valign="top">
                     <table class="info-table" width="100%">
                         <thead>
-                            <tr><th colspan="2">Billing</th></tr>
+                            <tr><th colspan="2" class="glm-reg-c1">Billing</th></tr>
                         </thead>
                         <tbody>
                             <tr>
-                                <th valign="top">Contact:</th>
+                                <th valign="top" class="glm-reg-c1">Contact:</th>
                                 <td>
                                     {$request.bill_fname} {$request.bill_lname}{if $request.bill_title}, {$request.bill_title}{/if}<br>
                                     {if $request.bill_org}{$request.bill_org}<br>{/if}
                                 </td>
                             </tr>
                     {if $request.bill_phone}
-                            <tr><th>Phone:</th><td>{$request.bill_phone}</td></tr>
+                            <tr><th class="glm-reg-c1">Phone:</th><td>{$request.bill_phone}</td></tr>
                     {/if}
                     {if $request.bill_email}
-                            <tr><th>E-Mail Address:</th><td>{$request.bill_email}</td></tr>
+                            <tr><th class="glm-reg-c1">E-Mail Address:</th><td>{$request.bill_email}</td></tr>
                     {/if}
                         </tbody>
                     </table>
                     <table class="info-table" width="100%">
                         <tbody>
                     {if $request.pay_method.value == $payMethodsNumb.CreditCard}
-                            <tr><th>Payment Method:</th><td>{$request.pay_method.name}</td></tr>
-                            <tr><th>Credit Card:</th><td>{$request.cc_type.name}</td></tr>
-                            <tr><th>Name on Card:</th><td>{$request.cc_name}</td></tr>
-                            <tr><th>Card Number:</th><td>{$request.cc_numb}</td></tr>
-                            <tr><th>Expiration:</th><td>{$request.cc_exp}</td></tr>
-                            <tr><th>Confirmation Code:</th><td>{$request.cc_conf}</td></tr>
-                            <tr><th>Total Charged:</th><td>{$request.total}</td></tr>
+                            <tr><th class="glm-reg-c1">Payment Method:</th><td>{$request.pay_method.name}</td></tr>
+                            <tr><th class="glm-reg-c1">Credit Card:</th><td>{$request.cc_type.name}</td></tr>
+                            <tr><th class="glm-reg-c1">Name on Card:</th><td>{$request.cc_name}</td></tr>
+                            <tr><th class="glm-reg-c1">Card Number:</th><td>{$request.cc_numb}</td></tr>
+                            <tr><th class="glm-reg-c1">Expiration:</th><td>{$request.cc_exp}</td></tr>
+                            <tr><th class="glm-reg-c1">Confirmation Code:</th><td>{$request.cc_conf}</td></tr>
+                            <tr><th class="glm-reg-c1">Total Charged:</th><td>{$request.total}</td></tr>
                     {/if}
                     {if $request.pay_method.value == $payMethodsNumb.Check}
-                            <tr><th>Payment Method:</th><td>{$request.pay_method.name}</td></tr>
-                            <tr><th>Name on Check:</th><td>{$request.cc_name}</td></tr>
-                            <tr><th>Check Number:</th><td>{$request.cc_numb}</td></tr>
-                            <tr><th>Total Paid:</th><td>{$request.total}</td></tr>
+                            <tr><th class="glm-reg-c1">Payment Method:</th><td>{$request.pay_method.name}</td></tr>
+                            <tr><th class="glm-reg-c1">Name on Check:</th><td>{$request.cc_name}</td></tr>
+                            <tr><th class="glm-reg-c1">Check Number:</th><td>{$request.cc_numb}</td></tr>
+                            <tr><th class="glm-reg-c1">Total Paid:</th><td>{$request.total}</td></tr>
                     {/if}
                     {if $request.pay_method.value == $payMethodsNumb.Cash}
-                            <tr><th>Payment Method:</th><td>{$request.pay_method.name}</td></tr>
-                            <tr><th>Total Paid:</th><td>{$request.total}</td></tr>
+                            <tr><th class="glm-reg-c1">Payment Method:</th><td>{$request.pay_method.name}</td></tr>
+                            <tr><th class="glm-reg-c1">Total Paid:</th><td>{$request.total}</td></tr>
                     {/if}
                     {if $request.pay_method.value == $payMethodsNumb.OnArrival}
-                            <tr><th>Payment Method:</th><td>{$request.pay_method.name}</td></tr>
-                            <tr><th>To be paid on arrival:</th><td>{$request.total}</td></tr>
+                            <tr><th class="glm-reg-c1">Payment Method:</th><td>{$request.pay_method.name}</td></tr>
+                            <tr><th class="glm-reg-c1">To be paid on arrival:</th><td>{$request.total}</td></tr>
                     {/if}
                     {if $request.pay_method.value == $payMethodsNumb.Pending}
-                            <tr><th>Payment Method:</th><td>{$request.pay_method.name}</td></tr>
-                            <tr><th>Amount Pending:</th><td>{$request.total}</td></tr>
+                            <tr><th class="glm-reg-c1">Payment Method:</th><td>{$request.pay_method.name}</td></tr>
+                            <tr><th class="glm-reg-c1">Amount Pending:</th><td>{$request.total}</td></tr>
                     {/if}
                         </tbody>
                     </table>
                 </td>
         </table>
         <h3>{$terms.reg_term_registration_plur_cap}</h3>
-        <div class="container-table">
-
-    {assign var="summaryType" value="store"}
-    {include file='front/registrations/cartSummary.html'}
-        </div>
+        
+        <!-- Registrations -->
+        
+        <table class="container-table">
+{foreach $cart.events as $event}
+            <thead>
+                <tr><td colspan="3">{$event.event_name}</td></tr>
+            </thead>
+            <tbody>
+  {foreach $event.classes as $class}
+    {foreach $class.rates as $rate}
+                <tr>
+                    <td colspan="2" class="glm-reg-c1"><b>{$terms.reg_term_registration_cap} {$terms.reg_term_level_cap}:&nbsp;&nbsp;</b>{$class.class_name}</td>
+                    <td class="glm-reg-c3">{if $rate.rateBaseCharge > 0}{$rate.base_rate_money}{/if}</td>
+                </tr>
+      {foreach $rate.registrants as $registrant}
+                <tr>
+                    <td colspan="2" class="glm-reg-c1">&nbsp;&nbsp;&nbsp;&nbsp;<b>{$terms.reg_term_attendee_cap}:</b>&nbsp;&nbsp;{$registrant.fname} {$registrant.lname}</td>
+                    <td class="glm-reg-c3">
+        {if $registrant.registrantRate > 0}
+                        ${$registrant.registrantRate|number_format:2}
+        {else}
+                        (included)
+        {/if}
+                </tr>
+        {if $registrant.event_attendee_custom_form && is_array($registrant.event_attendee_custom_form.form)}
+          {foreach $registrant.event_attendee_custom_form.form as $customField}
+            {if !$customField.displayOnly}
+              {if $customField.priority_display.value || $customField.cost > 0}
+                <tr>
+                    <th class="glm-reg-c1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{$customField.field_name}:</th>
+                    <td>{$customField.stored}</td>
+                    <td class="glm-reg-c3">
+                {if $customField.cost > 0} 
+                        ${$customField.cost|number_format:2}
+                {/if}
+                    </td>               
+                </tr>
+              {else}
+                <tr>
+                    <th class="glm-reg-c1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{$customField.field_name}:</th>
+                    <td>{$customField.stored}</td>
+                    <td class="glm-reg-c3">
+                {if $customField.cost > 0} 
+                        ${$customField.cost|number_format:2}
+                {/if}
+                    </td>               
+                </tr>
+              {/if}
+            {/if}
+          {/foreach}
+        {/if}
+        {if $registrant.event_attendee_custom_form_level && is_array($registrant.event_attendee_custom_form_level.form)}
+          {foreach $registrant.event_attendee_custom_form_level.form as $customField}
+            {if !$customField.displayOnly}
+              {if $customField.priority_display.value || $customField.cost > 0}
+                <tr>
+                    <th class="glm-reg-c1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{$customField.field_name}:</th>
+                    <td>{$customField.stored}</td>
+                    <td class="glm-reg-c3">
+                {if $customField.cost > 0} 
+                        ${$customField.cost|number_format:2}
+                {/if}
+                    </td>               
+                </tr>
+              {else}
+                <tr>
+                    <th class="glm-reg-c1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{$customField.field_name}:argh</th>
+                    <td>{$customField.stored}</td>
+                    <td class="glm-reg-c3">
+                {if $customField.cost > 0} 
+                        ${$customField.cost|number_format:2}
+                {/if}
+                    </td>               
+                </tr>
+              {/if}
+            {/if}
+          {/foreach}
+        {/if}                    
+        {if $registrant.registrantDiscounts > 0}
+                <tr>
+                    <th colspan="2" class="glm-reg-c1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{$terms.reg_term_attendee_cap} Discount</th>
+                    <td class="glm-reg-c3">${$registrant.registrantDiscounts|number_format:2}</td>
+                </tr>
+        {/if}
+      {/foreach}  {* Registrant *}
+    {/foreach}  {* Rate *}
+                <tr><td colspan="3">&nbsp;</td></tr>
+  {/foreach}  {* Class *}    
+  {foreach $event.payCodes as $payCode}
+                <tr>
+                    <td>&nbsp;</td>
+                    <td class="glm-reg-c1">
+                        <b>Event {$terms.reg_term_payment_code_cap}:</b> {$payCode.code}                 
+                    </td>
+                    <td class="glm-reg-c3">-${$payCode.thisDiscount|number_format:2}</td>
+                </tr>
+   {/foreach}
+                <tr>
+                    <th>&nbsp;</th>
+                    <th class="glm-reg-c2 glm-reg-text-right">Subtotal:</th>
+                    <td class="glm-reg-c3">${$event.eventCharges|number_format:2}</td>
+                </tr>
+{/foreach} {* events *}
+            </tbody>
+            <thead>
+                <tr><td colspan="3">{$terms.reg_term_registration_cap} Request Totals</td></tr>
+            </thead>
+            <tbody>
+{if $cart.globalPayCodes}
+  {foreach $cart.globalPayCodes as $payCode}
+                <tr>
+                    <td>&nbsp;</td>
+                    <td class="glm-reg-c2">
+                        <b>Global {$terms.reg_term_payment_code_cap}:</b> {$payCode.code} 
+                    </td>
+                    <td class="glm-reg-c3">-${$payCode.thisDiscount|number_format:2}</td>
+                </tr>                                    
+  {/foreach}
+{/if}
+                <tr>
+                    <td>&nbsp;</td>
+                    <td class="glm-reg-c2 glm-reg-text-right">Total {$terms.reg_term_attendee_plur}:</td>
+                    <td class="glm-reg-c3">{$cart.totalRegistrants}</td>
+                </tr>
+                <tr>
+                    <td>&nbsp;</td>
+                    <th class="glm-reg-c2 glm-reg-text-right">Total Cost:</th>
+                    <th class="glm-reg-c3">${$cart.grandTotal|number_format:2}</th>
+                </tr>
+            </tbody>
+        </table>        
     </body>
-</html>
\ No newline at end of file
+</html>