From: Chuck Scott Date: Wed, 18 Oct 2017 19:00:52 +0000 (-0400) Subject: Added some icons for cart and checkout. X-Git-Tag: v1.0.0^2~341 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=8cf2dfbaa21b70f55e95d330993ccfc3d0862ca1;p=WP-Plugins%2Fglm-member-db-registrations.git Added some icons for cart and checkout. Completed formatting cart. Started adding checkout page. --- diff --git a/assets/finberUpBlack.png b/assets/finberUpBlack.png new file mode 100644 index 0000000..ecb5cd1 Binary files /dev/null and b/assets/finberUpBlack.png differ diff --git a/assets/fingerRightBlack.png b/assets/fingerRightBlack.png new file mode 100644 index 0000000..6faed1a Binary files /dev/null and b/assets/fingerRightBlack.png differ diff --git a/assets/fingerRightBlack.svg b/assets/fingerRightBlack.svg new file mode 100644 index 0000000..b80539f --- /dev/null +++ b/assets/fingerRightBlack.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/fingerRightRed.png b/assets/fingerRightRed.png new file mode 100644 index 0000000..59eb28c Binary files /dev/null and b/assets/fingerRightRed.png differ diff --git a/assets/fingerRightRed.svg b/assets/fingerRightRed.svg new file mode 100644 index 0000000..feb512c --- /dev/null +++ b/assets/fingerRightRed.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/fingerUpBlack.svg b/assets/fingerUpBlack.svg new file mode 100644 index 0000000..157caf1 --- /dev/null +++ b/assets/fingerUpBlack.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/fingerUpRed.png b/assets/fingerUpRed.png new file mode 100644 index 0000000..24951a7 Binary files /dev/null and b/assets/fingerUpRed.png differ diff --git a/assets/fingerUpRed.svg b/assets/fingerUpRed.svg new file mode 100644 index 0000000..66a5a90 --- /dev/null +++ b/assets/fingerUpRed.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/throwAway.png b/assets/throwAway.png new file mode 100644 index 0000000..ee2f542 Binary files /dev/null and b/assets/throwAway.png differ diff --git a/assets/throwAway.svg b/assets/throwAway.svg new file mode 100644 index 0000000..ddce62f --- /dev/null +++ b/assets/throwAway.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/throwAwayBlue.png b/assets/throwAwayBlue.png new file mode 100644 index 0000000..63d95fd Binary files /dev/null and b/assets/throwAwayBlue.png differ diff --git a/assets/throwAwayBlue.svg b/assets/throwAwayBlue.svg new file mode 100644 index 0000000..e2da819 --- /dev/null +++ b/assets/throwAwayBlue.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/classes/data/dataRegRequestRegistrant.php b/classes/data/dataRegRequestRegistrant.php index 52e90da..1269ecf 100644 --- a/classes/data/dataRegRequestRegistrant.php +++ b/classes/data/dataRegRequestRegistrant.php @@ -151,14 +151,6 @@ class GlmDataRegistrationsRequestRegistrant extends GlmDataAbstract 'use' => 'lg' ), - // Selected Start Time - 'event_datetime' => array ( - 'field' => 'event_datetime', - 'type' => 'datetime', - 'required' => true, - 'use' => 'lgneud' - ), - // Pointer to reg_request_event table entry 'reg_request_event' => array ( 'field' => 'reg_request_event', diff --git a/classes/regCartSupport.php b/classes/regCartSupport.php index cfe8ac9..7fe25f7 100644 --- a/classes/regCartSupport.php +++ b/classes/regCartSupport.php @@ -234,7 +234,7 @@ class GlmRegCartSupport $this->cart['status'] = true; $this->cart['validated'] = false; -// echo "
getRegistrationCart() Results:
".print_r($this->cart,1)."
"; exit; + // echo "
getRegistrationCart() Results:
".print_r($this->cart,1)."
"; if ($json) { diff --git a/css/front.css b/css/front.css index 8f4d0af..9226510 100644 --- a/css/front.css +++ b/css/front.css @@ -274,3 +274,6 @@ span.glm-error { color: red; font-size: 10px; } +.glm-reg-warning { + color: red; +} diff --git a/models/front/registrations/cart.php b/models/front/registrations/cart.php index c5491ed..477ea08 100644 --- a/models/front/registrations/cart.php +++ b/models/front/registrations/cart.php @@ -121,30 +121,18 @@ class GlmMembersFront_registrations_cart extends GlmRegCartSupport } if ($cartId) { - $this->getRegistrationCart($cartId); + + // Try to get a Validate cart with updated totals + $this->checkRegistrationRequest($cartId); + if ($this->cart) { $haveCart = true; } - } - - $view = 'cart'; - - switch ( $option ) { - - case 'showCart': - default: - - if ($cartId) { - - // Try to get a Validate cart with updated totals - $this->checkRegistrationRequest($cartId); - - } + } - break; - } + $view = 'cart'; // Compile template data $templateData = array( @@ -153,6 +141,7 @@ class GlmMembersFront_registrations_cart extends GlmRegCartSupport 'cart' => $this->cart, 'regUrl' => GLM_MEMBERS_REGISTRATIONS_SITE_BASE_URL.$this->config['settings']['canonical_reg_page'].'/', 'loggedIn' => ( isset( $_SESSION['LoginAccount'] ) ) ? $_SESSION['LoginAccount']: false, + 'assetUrl' => GLM_MEMBERS_REGISTRATIONS_PLUGIN_ASSETS_URL ); // echo "
".print_r($templateData,1)."
"; diff --git a/models/front/registrations/checkout.php b/models/front/registrations/checkout.php index 56cdf74..668ff83 100644 --- a/models/front/registrations/checkout.php +++ b/models/front/registrations/checkout.php @@ -1,7 +1,11 @@ getRegistrationCart($cartId); + + if ($this->cart) { + $haveCart = true; + } + } + $view = 'checkout'; - switch ( $option ) { + if ($cartId) { + + // Try to get a Validate cart with updated totals + $this->checkRegistrationRequest($cartId); } + $view = 'checkout'; + + // Compile template data $templateData = array( - + 'cartId' => $cartId, + 'haveCart' => $haveCart, + 'cart' => $this->cart, + 'checkoutUrl' => GLM_MEMBERS_REGISTRATIONS_SITE_BASE_URL.$this->config['settings']['canonical_reg_page'].'/', + 'loggedIn' => ( isset( $_SESSION['LoginAccount'] ) ) ? $_SESSION['LoginAccount']: false, + 'assetUrl' => GLM_MEMBERS_REGISTRATIONS_PLUGIN_ASSETS_URL ); // 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 730f10f..39aca46 100644 --- a/views/front/registrations/cart.html +++ b/views/front/registrations/cart.html @@ -3,7 +3,7 @@ {if $haveCart}

Selected Registrations

- +
@@ -36,7 +36,7 @@ {foreach $rate.registrants as $registrant} - +
  {$registrant.fname} {$registrant.lname} {$registrant.event_time} @@ -75,7 +75,16 @@
- (if there's no problems the checkout button goes here) + {if $cart.blockCheckout} +
+
You have not yet submitted your registration. See above for issues!
+
+ {else} +
+
You have not yet submitted your registration! Complete Registration
+
+ {/if} + {else} No cart data {/if} diff --git a/views/front/registrations/checkout.html b/views/front/registrations/checkout.html index e69de29..7ac5867 100644 --- a/views/front/registrations/checkout.html +++ b/views/front/registrations/checkout.html @@ -0,0 +1,100 @@ +{include file='front/registrations/header.html'} + +{if $haveCart} +
+ + + + + +
Name:
+ +

Total Charged: ${$cart.totalCharges|number_format:2}

+ + {if $cart.blockCheckout} +
+
You have not yet submitted your registration. See above for issues!
+
+ {else} +
+
You have one more step! Submit Registration
+
+ {/if} + +
+ + + + + + + + + + + + + + + + + {foreach $cart.events as $event} + + + + {foreach $event.classes as $class} + + + + {foreach $class.rates as $rate} + + + + + {foreach $rate.registrants as $registrant} + + + + + + + + {/foreach} + {/foreach} + {/foreach} + {/foreach} + + + + + + + + + +
RegisteringRegistrantDate/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.event_time} + {if $registrant.registrantDiscount > 0} + {$registrant.registrantDiscount|number_format:2} + {else} +   + {/if} + + {if $registrant.registrantRate > 0} + {$registrant.registrantRate|number_format:2} + {else} + (included) + {/if} +
 Total registrants: {$cart.totalRegistrants} + {if $cart.totalDiscounts > 0} + ${$cart.totalDiscounts|number_format:2} + {else} +   + {/if} + ${$cart.totalCharges|number_format:2}
+ +{else} + No cart data +{/if} diff --git a/views/front/registrations/header.html b/views/front/registrations/header.html index c39a2d2..06383fb 100644 --- a/views/front/registrations/header.html +++ b/views/front/registrations/header.html @@ -1,12 +1,12 @@
{if $loggedIn} Logged in as {$loggedIn.fname} {$loggedIn.lname} - Logout + Logout {else} - Login - Register + Login + Register {/if}
- Register for Another Event (should be a button) + Register for Another Event