Better time/date formatting in cart summaries
authorChuck Scott <cscott@gaslightmedia.com>
Mon, 13 Nov 2017 22:00:09 +0000 (17:00 -0500)
committerChuck Scott <cscott@gaslightmedia.com>
Mon, 13 Nov 2017 22:00:09 +0000 (17:00 -0500)
classes/regCartSupport.php
models/front/registrations/cart.php
views/front/registrations/cart.html
views/front/registrations/checkout.html
views/front/registrations/summaryStore.html

index 4b750cb..9d58664 100644 (file)
@@ -468,6 +468,9 @@ class GlmRegCartSupport
 
                                                 }
 
+                                                // Add a more familiar date/time
+                                                $this->cart['events'][$eventKey]['classes'][$classKey]['rates'][$rateKey]['registrants'][$registrantKey]['timeReformatted'] = date('l m/d/Y g:i A', strtotime($registrant['event_time']));
+
                                             } // Each registrant
 
                                         } // Have registrants
index 0027e31..e937097 100644 (file)
@@ -154,7 +154,7 @@ class GlmMembersFront_registrations_cart extends GlmRegCartSupport
             'cartPageText'  => $misc['cart_page_text']
         );
 
-        // echo "<pre>".print_r($templateData,1)."</pre>";
+        echo "<pre>".print_r($templateData,1)."</pre>";
 
         // Return status, any suggested view, and any data to controller
         return array(
index 01ce669..bd455b6 100644 (file)
@@ -30,7 +30,7 @@
             <tr>
                 <th>Registering</th>
                 <th>Registrant</th>
-                <th>Date/Time</th>
+                <th>Event Date/Time</th>
                 <th style="text-align: right;">Discount</th>
                 <th style="text-align: right;">Rate</th>
             </tr>
@@ -61,7 +61,7 @@
             <tr>
                 <td><!-- <a onClick="alert('When I get to it!'); return false;"><img src="{$assetUrl}/throwAwayBlue.svg" style="height: 2em;"></a> --></td>
                 <td>{$registrant.fname} {$registrant.lname}</td>
-                <td>{$registrant.event_time}</td>
+                <td>{$registrant.timeReformatted}</td>
                 <td style="text-align: right;">
                     {if $registrant.registrantDiscounts > 0}
                         {$registrant.registrantDiscounts|number_format:2}
index dc31865..8935254 100644 (file)
                 <tr>
                     <td>&nbsp;</td>
                     <td>{$registrant.fname} {$registrant.lname}</td>
-                    <td>{$registrant.event_time}</td>
+                    <td>{$registrant.timeReformatted}</td>
                     <td style="text-align: right;">
                         {if $registrant.registrantDiscounts > 0}
                             {$registrant.registrantDiscounts|number_format:2}
index c422c97..b5b6dc2 100644 (file)
                 <tr>
                     <th>Registering</th>
                     <th>Registrant</th>
-                    <th>Date/Time</th>
+                    <th>Event Date/Time</th>
                     <th>Discount</th>
                     <th>Rate</th>
                 </tr>
                 <tr>
                     <td>&nbsp;</td>
                     <td>{$registrant.fname} {$registrant.lname}</td>
-                    <td>{$registrant.event_time}</td>
+                    <td>{$registrant.timeReformatted}</td>
                     <td class="td-right">
                         {if $registrant.registrantDiscounts > 0}
                             {$registrant.registrantDiscounts|number_format:2}