From: Chuck Scott Date: Mon, 11 Dec 2017 19:09:23 +0000 (-0500) Subject: Reorganized cart summaries into grid responsive format. X-Git-Tag: v1.0.0^2~229 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=e8b2ee126f0b2eded466b4eecaa08346538d79ea;p=WP-Plugins%2Fglm-member-db-registrations.git Reorganized cart summaries into grid responsive format. Added cartSummary.html which now contains the only copy of the cart display. Removed cart display from all other areas and now including cartSummary.html Added some Front CSS to deal with the new layout. The summaryStore.html needs to be tested to make sure the CSS bundled with that is correct. --- diff --git a/classes/regCartSupport.php b/classes/regCartSupport.php index ff8744a..56e4af0 100644 --- a/classes/regCartSupport.php +++ b/classes/regCartSupport.php @@ -239,7 +239,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('l 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 g:i A', strtotime($registrant['event_time'])); // Add registrant account to accounts table if needed $this->addAccountToCart($registrant['account']); @@ -515,7 +515,7 @@ 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'])); + $this->cart['events'][$eventKey]['classes'][$classKey]['rates'][$rateKey]['registrants'][$registrantKey]['timeReformatted'] = date('m/d/Y g:i A', strtotime($registrant['event_time'])); } // Each registrant diff --git a/css/front.css b/css/front.css index f0fe467..331daee 100644 --- a/css/front.css +++ b/css/front.css @@ -6,7 +6,32 @@ margin-left: auto; margin-right: auto; width: 100%; - min-height: 3rem; + min-height: 1.5rem; + white-space: nowrap; +} +.glm-reg-indent-1 { + padding-left: .5rem; +} +.glm-reg-indent-2 { + padding-left: 1rem; +} +.glm-reg-indent-3 { + padding-left: 1.5rem; +} +.glm-reg-space-left { + padding-left: 1.25rem; +} +.glm-reg-right { + text-align: right; +} +.glm-reg-row-bold { + font-weight: bold; +} +.glm-reg-headder-row { + clear: both; + background-color: #eee; + height: 2rem; + padding-top: .2rem; } .glm-reg-nowrap { white-space: nowrap; @@ -19,6 +44,15 @@ } /*}}} end of tampering */ +.glm-reg-cart-container { + clear: both; + border: solid 1px black; + background-color: white; + margin-top: 1rem; + margin-bottom: 1rem; + font-size: 0.875rem; +} + /*{{{ Event Registration List */ #glm-reg-list h3 a { text-transform: uppercase; diff --git a/views/front/registrations/cart.html b/views/front/registrations/cart.html index 36b29dd..f3d0420 100644 --- a/views/front/registrations/cart.html +++ b/views/front/registrations/cart.html @@ -22,135 +22,19 @@

Selected Registrations

+ {assign var="summaryType" value="cart"} + {include file='front/registrations/cartSummary.html'} - - - - - - - - - - - - - - - -{if $haveCart && $cart.haveEvents} - - {foreach $cart.events as $event} - - - - {foreach $event.classes as $class} - - - - {foreach $class.rates as $rate} - - - - - {foreach $rate.registrants as $registrant} - - - - - - - - {assign var="acct" value=$cart.accounts.{$registrant.account}} - {if $acct.validated.value} - - - - - {else} - {if $acct.addr1 != '' || $acct.phone != '' || $acct.email != ''} - - - - - {/if} - {/if} - {/foreach} {* registrants *} - {/foreach} {* rates *} - {/foreach} {* classes *} - - - - - {if $event.eventDiscounts > 0} - - {else} - - {/if} - - - - - {/foreach} {* events *} - - - - - - - -{else} - - -{/if} - -
RegisteringRegistrantEvent Date/TimeDiscountRate
Event: {$event.event_name}
    {$class.class_name}
-         {$rate.rate_name} - - Base Rate ({$rate.registrant_credits} registrants included) - {$rate.rateBaseCharge|number_format:2}
{$registrant.fname} {$registrant.lname}{$registrant.timeReformatted} - {if $registrant.registrantDiscounts > 0} - {$registrant.registrantDiscounts|number_format:2} - {else} -   - {/if} - - {if $registrant.registrantRate > 0} - {$registrant.registrantRate|number_format:2} - {else} - (included) - {/if} -
  - {if $acct.email != ''}E-Mail: {$acct.email}
{/if} - (Account information is restricted) -
  - {if $acct.org != ''} {$acct.title}, {$acct.org}
{/if} - {if $acct.addr1 != ''} {$acct.addr1}
{/if} - {if $acct.addr2 != ''} {$acct.addr2}
{/if} - {if $acct.city != ''} {$acct.city}, {$acct.state.value} {$acct.zip}
{/if} - {if $acct.country.name != ''} {$acct.country.name}
{/if} - {if $acct.phone != ''} Phone: {$acct.phone}
{/if} - {if $acct.fax != ''} Fax: {$acct.fax}
{/if} - {if $acct.email != ''} E-Mail: {$acct.email} {/if} -
 Event registrants: {$event.eventRegistrants} - {$event.eventDiscounts|number_format:2} -  {$event.eventCharges|number_format:2}
 Total registrants: {$cart.totalRegistrants} - {if $cart.totalDiscounts > 0} - ${$cart.totalDiscounts|number_format:2} - {else} -   - {/if} - ${$cart.totalCharges|number_format:2}
Your cart is empty. Please click "Register for Another Event" button above.
- - {if $cart.blockCheckout || !$haveCart || !$cart.haveEvents} + {if $cart.blockCheckout || !$haveCart || !$cart.haveEvents}
You have not yet submitted your registration. See above notes!
- {else} + {else}
You have not yet submitted your registration! Complete Registration
- {/if} + {/if} diff --git a/views/front/registrations/cartSummary.html b/views/front/registrations/cartSummary.html new file mode 100644 index 0000000..a6491cc --- /dev/null +++ b/views/front/registrations/cartSummary.html @@ -0,0 +1,100 @@ +
+{foreach $cart.events as $event} +
+
+ {if $summaryType=="cart"} + + {/if} + {$event.event_name} +
+
+ {foreach $event.classes as $class} +
+
+ {$class.class_name} +
+
+ {foreach $class.rates as $rate} + {if $rate.rateBaseCharge > 0} +
+
+ Base Rate: +
+
+ ${$rate.rateBaseCharge|number_format:2} +
+
+ {/if} + {foreach $rate.registrants as $registrant} +
+
+ {$registrant.fname} {$registrant.lname} +
+
+ {$registrant.timeReformatted} +
+
+ Cookies and Milk (temp test data) +
+
+ {if $registrant.registrantRate > 0} + ${$registrant.registrantRate|number_format:2} + {else} + (included) + {/if} +
+
+ {if $registrant.registrantDiscounts == 0} +
+
+ Registrant Discount +
+
+ -${$registrant.registrantDiscounts|number_format:2} +
+
+ {/if} + {/foreach} {* registrants *} + {/foreach} {* rates *} + {/foreach} {* classes *} +
+
+ Event Discounts +
+
+ ${$event.eventDiscounts|number_format:2} +
+
+
+
+ Registrants: {$event.eventRegistrants} +
+
+ ${$event.eventCharges|number_format:2} +
+
+{/foreach} {* events *} +
+
+ Registration Request Totals +
+
+{if $cart.totalDiscounts == 0} +
+
+ Total Discounts +
+
+ ${$cart.totalDiscounts|number_format:2} +
+
+{/if} +
+
+ Total registrants: {$cart.totalRegistrants} +
+
+ ${$cart.totalCharges|number_format:2} +
+
+
diff --git a/views/front/registrations/checkout.html b/views/front/registrations/checkout.html index 6236262..5d48b75 100644 --- a/views/front/registrations/checkout.html +++ b/views/front/registrations/checkout.html @@ -34,7 +34,7 @@

Checkout

-
+

Account Information

{if $regAccountId == 0} @@ -352,106 +352,11 @@

Registration Summary

- - - - - - - - - - - - - - - - {foreach $cart.events as $event} - - - - {foreach $event.classes as $class} - - - - {foreach $class.rates as $rate} - {if $rate.rateBaseCharge || $rate.registrant_credits} - - - - - {/if} - {foreach $rate.registrants as $registrant} - - - - - - - - {assign var="acct" value=$cart.accounts.{$registrant.account}} - {if $acct.validated.value} - - - - - {else} - {if $acct.addr1 != '' || $acct.phone != '' || $acct.email != ''} - - - - - {/if} - {/if} - {/foreach} - {/foreach} - {/foreach} - {/foreach} - - - - - - - + + {assign var="summaryType" value="checkout"} + {include file='front/registrations/cartSummary.html'} + {/if} {* / if have cart *} -
RegisteringRegistrantDate/TimeDiscountRate
Event: {$event.event_name}
    {$class.class_name}
-         {$rate.rate_name} - - Base Rate ({$rate.registrant_credits} registrants included) - - {if $rate.rateBaseCharge}{$rate.rateBaseCharge|number_format:2}{/if} -
 {$registrant.fname} {$registrant.lname}{$registrant.timeReformatted} - {if $registrant.registrantDiscounts > 0} - {$registrant.registrantDiscounts|number_format:2} - {else} -   - {/if} - - {if $registrant.registrantRate > 0} - {$registrant.registrantRate|number_format:2} - {else} - (included) - {/if} -
  - {if $acct.email != ''}E-Mail: {$acct.email}
{/if} - (Account information is restricted) -
  - {if $acct.org != ''} {$acct.title}, {$acct.org}
{/if} - {if $acct.addr1 != ''} {$acct.addr1}
{/if} - {if $acct.addr2 != ''} {$acct.addr2}
{/if} - {if $acct.city != ''} {$acct.city}, {$acct.state.value} {$acct.zip}
{/if} - {if $acct.country.name != ''} {$acct.country.name}
{/if} - {if $acct.phone != ''} Phone: {$acct.phone}
{/if} - {if $acct.fax != ''} Fax: {$acct.fax}
{/if} - {if $acct.email != ''} E-Mail: {$acct.email} {/if} -
 Total registrants: {$cart.totalRegistrants} - {if $cart.totalDiscounts > 0} - ${$cart.totalDiscounts|number_format:2} - {else} -   - {/if} - ${$cart.totalCharges|number_format:2}