From 31eb694d1bebff06f7a7b3eb5a1dca9af2819b6b Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Mon, 18 Dec 2017 10:24:01 -0500 Subject: [PATCH] Get rid of php notices for undefined variables. Adding needed variables to the account Header template. --- models/admin/ajax/regFront/registrant.php | 4 ++-- models/front/registrations/cartLinkWidget.php | 10 +++++++--- models/front/registrations/registration.php | 3 --- views/front/registrations/accountHeader.html | 4 ++-- views/front/registrations/registration.html | 15 ++------------- 5 files changed, 13 insertions(+), 23 deletions(-) diff --git a/models/admin/ajax/regFront/registrant.php b/models/admin/ajax/regFront/registrant.php index 37b16ea..1086866 100644 --- a/models/admin/ajax/regFront/registrant.php +++ b/models/admin/ajax/regFront/registrant.php @@ -82,7 +82,7 @@ class GlmMembersAdmin_registrations_ajax_registrant extends GlmDataRegistrations { $validated = false; - trigger_error(print_r($modelData,1)); + // trigger_error(print_r($modelData,1)); if ( !isset( $modelData['option'] ) ) { $option = null; @@ -500,7 +500,7 @@ class GlmMembersAdmin_registrations_ajax_registrant extends GlmDataRegistrations // Store the custom field data $_REQUEST = $queryParams; - trigger_error(print_r($_REQUEST,1)); + // trigger_error(print_r($_REQUEST,1)); apply_filters( 'glm-members-customfields-form-submit', '', diff --git a/models/front/registrations/cartLinkWidget.php b/models/front/registrations/cartLinkWidget.php index d322db9..beddaa0 100644 --- a/models/front/registrations/cartLinkWidget.php +++ b/models/front/registrations/cartLinkWidget.php @@ -91,9 +91,13 @@ class GlmMembersFront_registrations_cartLinkWidget // Compile template data $templateData = $cartData; - $templateData['haveCart'] = $haveCart; - $templateData['assetUrl'] = GLM_MEMBERS_REGISTRATIONS_PLUGIN_ASSETS_URL; - $templateData['regUrl'] = GLM_MEMBERS_REGISTRATIONS_SITE_BASE_URL.$this->config['settings']['canonical_reg_page'].'/'; + $templateData = array_merge( $cartData, array( + 'haveCart' => $haveCart, + 'assetUrl' => GLM_MEMBERS_REGISTRATIONS_PLUGIN_ASSETS_URL, + 'regUrl' => GLM_MEMBERS_REGISTRATIONS_SITE_BASE_URL.$this->config['settings']['canonical_reg_page'].'/', + 'page' => 'registration', + 'loggedIn' => ( isset( $_SESSION['LoginAccount'] ) ) ? $_SESSION['LoginAccount']: false, + ) ); // echo "
".print_r($templateData,1)."
"; if($viewAttr){ diff --git a/models/front/registrations/registration.php b/models/front/registrations/registration.php index 7dd2a36..6df0f3d 100644 --- a/models/front/registrations/registration.php +++ b/models/front/registrations/registration.php @@ -354,7 +354,6 @@ 'thisJsUrl' => GLM_MEMBERS_REGISTRATIONS_PLUGIN_URL . '/js', 'regEventJSON' => json_encode( $event, JSON_NUMERIC_CHECK ), 'regClassesJSON' => $regClassJSON, - // 'regTimesJSON' => $regTimesJSON, 'regCartJSON' => $regCartJSON, 'imgBaseUrl' => GLM_MEMBERS_PLUGIN_MEDIA_URL ."/images/", 'regRequestJSON' => $regRequestJSON, @@ -367,8 +366,6 @@ 'reg_bulletin' => $misc['reg_bulletin'] ); - // echo '
$registrants: ' . print_r( $templateData, true ) . '
'; - // Return status, any suggested view, and any data to controller return array( 'status' => true, diff --git a/views/front/registrations/accountHeader.html b/views/front/registrations/accountHeader.html index 96fc21d..4b46d1a 100644 --- a/views/front/registrations/accountHeader.html +++ b/views/front/registrations/accountHeader.html @@ -1,5 +1,5 @@
- + {/literal} @@ -214,7 +206,6 @@
{/literal}{if $regEvent.time_specific.value} - {/if}{literal} @@ -279,7 +270,6 @@ {/literal}{if $regEvent.time_specific.value}
-
{/if}{literal} @@ -293,7 +283,6 @@ {/literal}

{$terms.reg_term_registrations_name}

- {apply_filters('glm_members_registrations_header', 'accountHeader')}
@@ -436,7 +425,7 @@ jQuery(function($){ position: new google.maps.LatLng({$regEvent.locations.lat}, {$regEvent.locations.lon}), draggable: false, animation: google.maps.Animation.DROP, - title: '{$member.member|escape}' + title: '' }); {/if} -- 2.17.1