From: Chuck Scott Date: Mon, 13 Nov 2017 22:00:09 +0000 (-0500) Subject: Better time/date formatting in cart summaries X-Git-Tag: v1.0.0^2~279 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=0c5d245710a361487188dd727f27ca7b152131f7;p=WP-Plugins%2Fglm-member-db-registrations.git Better time/date formatting in cart summaries --- diff --git a/classes/regCartSupport.php b/classes/regCartSupport.php index 4b750cb..9d58664 100644 --- a/classes/regCartSupport.php +++ b/classes/regCartSupport.php @@ -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 diff --git a/models/front/registrations/cart.php b/models/front/registrations/cart.php index 0027e31..e937097 100644 --- a/models/front/registrations/cart.php +++ b/models/front/registrations/cart.php @@ -154,7 +154,7 @@ class GlmMembersFront_registrations_cart extends GlmRegCartSupport 'cartPageText' => $misc['cart_page_text'] ); - // echo "
".print_r($templateData,1)."
"; + echo "
".print_r($templateData,1)."
"; // Return status, any suggested view, and any data to controller return array( diff --git a/views/front/registrations/cart.html b/views/front/registrations/cart.html index 01ce669..bd455b6 100644 --- a/views/front/registrations/cart.html +++ b/views/front/registrations/cart.html @@ -30,7 +30,7 @@ Registering Registrant - Date/Time + Event Date/Time Discount Rate @@ -61,7 +61,7 @@ {$registrant.fname} {$registrant.lname} - {$registrant.event_time} + {$registrant.timeReformatted} {if $registrant.registrantDiscounts > 0} {$registrant.registrantDiscounts|number_format:2} diff --git a/views/front/registrations/checkout.html b/views/front/registrations/checkout.html index dc31865..8935254 100644 --- a/views/front/registrations/checkout.html +++ b/views/front/registrations/checkout.html @@ -379,7 +379,7 @@   {$registrant.fname} {$registrant.lname} - {$registrant.event_time} + {$registrant.timeReformatted} {if $registrant.registrantDiscounts > 0} {$registrant.registrantDiscounts|number_format:2} diff --git a/views/front/registrations/summaryStore.html b/views/front/registrations/summaryStore.html index c422c97..b5b6dc2 100644 --- a/views/front/registrations/summaryStore.html +++ b/views/front/registrations/summaryStore.html @@ -129,7 +129,7 @@ Registering Registrant - Date/Time + Event Date/Time Discount Rate @@ -155,7 +155,7 @@   {$registrant.fname} {$registrant.lname} - {$registrant.event_time} + {$registrant.timeReformatted} {if $registrant.registrantDiscounts > 0} {$registrant.registrantDiscounts|number_format:2}