Zen Cart Logo
Forums / General Questions / Checkout is not accepting the state

Checkout is not accepting the state

Locked

Views: 1,011

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
18 Oct 2006, 3:10 PM
#1
rstamets avatar

rstamets

New Zenner

Join Date:
Mar 2005
Posts:
13
Plugin Contributions:
0

Checkout is not accepting the state

I searched other threads and FAQ for this but didn't turn anything up.

Installed current version of ZenCart and started testing the functions.

Upon checking out, even though the state field is filled, validation returns me to the "choose state dropdown box". When I choose the required state, it returns me again to the "choose state dropdown".

It appears that the state field is not carrying over to validation. All of the other fields appear to be fine.

No mods were made to any of the fields or validation.

Where might I test to find out whether the state variable is carrying over to the validation function? Or any other sugggestions would be appreciated.

18 Oct 2006, 3:44 PM
#3
rstamets avatar

rstamets

New Zenner

Join Date:
Mar 2005
Posts:
13
Plugin Contributions:
0

Re: Checkout is not accepting the state

Thank you. I tried entering the full state name and everything works fine. Since I was using the abbrevation (PA) for Pennsylvania, it crashed. For the time being I will add a red letter format example (ie: Pennsylvania, Nebraska)until I have time to research this problem further.

Thanks again for your timely response. The threads you referred helped greatly.

20 Oct 2006, 11:56 PM
#4
Join Date:
Sep 2006
Location:
Los Angeles, CA
Posts:
4
Plugin Contributions:
0

Re: Checkout is not accepting the state

For what it's worth I solved this issue by hard coding the page's choice of selection list vs field for state:

<?php
  // fix state validation problem by hard coding the select menu as only option
  if (ACCOUNT_STATE == 'true') {    
?>
<label class="inputLabel" for="stateZone"><?php echo ENTRY_STATE; ?></label>
<?php
    echo zen_draw_pull_down_menu('zone_id', zen_prepare_country_zones_pull_down($selected_country), $zone_id, 'id="stateZone"') . '<span class="alert">' . ENTRY_STATE_TEXT . '</span>';
?>
<br class="clearBoth" />
<?php
  }
?>

...otherwise, if I tried to do this through the admin, I got both a select list and a field, which I deemed to be too confusing as an interface. So far it seems to work great.