Greetings,

The following relates to ZenCart version 1.3.8a.

I believe I found a small bug in modules/create_account.php near the bottom at about line 440.

My system is configured with Configure->Customer Details->State Always Display as pulldown set to false

and

Configure->Customer Details->State set to true

My interpretation of the above it that my store front should never display a pull down menu for states. However, I found it does when someone is setting up a new account and does not enter anything in the state box. The next screen shows a state pulldown and input text box for state. This behavior also happens even though I select a country like Antarctica which has no state zones set up in the configuration.

In troubleshooting the issue, I found that the following line in modules/create_account.php (near the bottom at about line 440) is not setting value of $flag_show_pulldown_states to false. When I replace the line with $flag_show_pulldown_states = false;
everything works fine. Of course this is not an ideal solution as if I later want to re-configure system to show the state pulldown I have to remember I made this change and then reverse it. In any case, here is what I think is the offending line of code:

$flag_show_pulldown_states = ((($process == true || $entry_state_has_zones == true) && $zone_name == '') || ACCOUNT_STATE_DRAW_INITIAL_DROPDOWN == 'true' || $error_state_input) ? true : false;