From 1aebcdb131ecd563dae4da7112fe22896f95b6d9 Mon Sep 17 00:00:00 2001 From: Chuck Scott Date: Thu, 26 Apr 2018 16:39:47 -0400 Subject: [PATCH] Fixed problem with state and country picklists missing when a single registrant and guest checkout. --- models/front/registrations/checkout.php | 10 ++++++++-- views/front/registrations/checkout.html | 3 +-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/models/front/registrations/checkout.php b/models/front/registrations/checkout.php index f73a339..f03805d 100644 --- a/models/front/registrations/checkout.php +++ b/models/front/registrations/checkout.php @@ -293,6 +293,12 @@ class GlmMembersFront_registrations_checkout extends GlmRegCartSupport $regAccount['fieldData']['bill_fax'] = $regAccount['fieldData']['fax']; // Otherwise if there's only one registrant, use their info, what's there + + /* + * There is a problem with the state and country selectors due to the $acct array + * not having that data. If needed, use the account ID and grab the account record + * for editing then use the data from there for all this instead. + */ } elseif (count($this->cart['accounts']) == 1) { $acct = current($this->cart['accounts']); $regAccount['fieldData']['bill_fname'] = $acct['fname']; @@ -302,9 +308,9 @@ class GlmMembersFront_registrations_checkout extends GlmRegCartSupport $regAccount['fieldData']['bill_addr1'] = $acct['addr1']; $regAccount['fieldData']['bill_addr2'] = $acct['addr2']; $regAccount['fieldData']['bill_city'] = $acct['city']; - $regAccount['fieldData']['bill_state'] = $acct['state']; +// $regAccount['fieldData']['bill_state'] = $acct['state']; $regAccount['fieldData']['bill_zip'] = $acct['zip']; - $regAccount['fieldData']['bill_country'] = $acct['country']; +// $regAccount['fieldData']['bill_country'] = $acct['country']; $regAccount['fieldData']['bill_phone'] = $acct['phone']; $regAccount['fieldData']['bill_fax'] = $acct['fax']; } diff --git a/views/front/registrations/checkout.html b/views/front/registrations/checkout.html index 9f3826a..6afbd98 100644 --- a/views/front/registrations/checkout.html +++ b/views/front/registrations/checkout.html @@ -31,7 +31,6 @@ {/if} - {if $haveCart}
@@ -91,7 +90,7 @@