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) {
 
             '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']
 
 <?php
+use PayPal\Api\Address;
+use net\authorize\api\contract\v1\LineItemType;
+
 /**
  * Gaslight Media Associate
  * Registrations Plugin support class
                                     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']);
                                         // 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
                                                 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
                                                 }
 
                                                 // 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
 
      *
      * @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);
          */
         $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);
+                }
             }
         }
 
                     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(
                             } 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);
+                                }
                             }
                         }
 
                 $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
      *
 
  * @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);
 
             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;
     }
 // 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;
 
 $regEvent = $this->getEntry($regEventID);
 
+
 $view = 'eventPaymentCodes';
 
         /*
          * 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);
             )
         );
 
+        // 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,
             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);
          * Remove cart from session
          *
          */
-        if ($billing['addr2'] != '*** DO NOT CLEAR ***') {
+        if (!$doNotClear) {
             unset($_SESSION['glm_reg_cart_id']);
         }
 
             'guestAccount'   => $guestAccount,
             'requestId'      => $requestId,
             'summaryCheck'   => $summaryCheck,
+            'summary'        => $summary,
             'misc'           => $misc,
             'reg_account_id' => $accountId,
             'states_list'    => $this->config['states'],
             'passwordError'  => $passwordError,
         );
 
+        // echo "<pre>".print_r($this->cart,1)."</pre>";
+
         // Return status, any suggested view, and any data to controller
         return array(
             'status'        => true,
 
                 <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>
             <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>
 
 {/if}
 </div>
 
-<div> </div>ssss
+<div> </div>
 
 <table class="glm-admin-table glm-settings-table" style="width: 99%;">
     <tr><td colspan="2">
 
                   ${$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">
 
                                     <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">
 
 
 <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;
                 text-align: left;
                 padding: .2rem;
             }
-            .td-right {
-                text-align: right;
-            }
             .event-line {
                 padding-top: 1rem;
             }
             .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}:  </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">    <b>{$terms.reg_term_attendee_cap}:</b>  {$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">        {$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">        {$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">        {$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">        {$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">        {$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"> </td></tr>
+  {/foreach}  {* Class *}    
+  {foreach $event.payCodes as $payCode}
+                <tr>
+                    <td> </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> </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> </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> </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> </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>