Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / State Field Showing Below State Dropdown

State Field Showing Below State Dropdown

Views: 4,660

Results 1 to 13 of 13
25 Aug 2010, 18:48
#1
johnfripp avatar

johnfripp

New Zenner

Join Date:
Jul 2010
Posts:
8
Plugin Contributions:
0

State Field Showing Below State Dropdown

I am using ZenCart Version 1.3.9d. Basically, what is happening is that on the Account Create page (as well as when I try to change my address from the 'My Account' section, a State text box is showing right below the State Dropdown and it is greyed out. I know that normally if the dropdown is activated, then the 'manual' state box (meaning the one where you would have to type a state in) would not show.

I cannot for the life of me find what is causing this to occur. I have not modified the tpl_modules_account.php file and both my state attributes for customer are set to 'true'. Can anyone help me here? Here is my website link and screenshot of my problem:
https://www.floatingpokergames.com/index.php?main_page=login&zenid=i1aeiqevv2srsd8cvi2vk3f220

Thanks
MK

25 Aug 2010, 19:08
#2
farhansabir avatar

farhansabir

New Zenner

Join Date:
Feb 2008
Location:
Toronto, Ontario, Canada
Posts:
29
Plugin Contributions:
0

Re: State Field Showing Below State Dropdown

Well, it seems to be almost the default except for Ohio which has counties. The state field that you have mentioned is disabled if you select USA/Canada/Australia etc. But for some, the state isnt in the drop down above. That is where you have a text box to enter it manually. Try selecting the country as Aaland Islands or Burmuda etc and notice it become active so that you type your state or province.

Hope it helps.

25 Aug 2010, 20:12
#3
johnfripp avatar

johnfripp

New Zenner

Join Date:
Jul 2010
Posts:
8
Plugin Contributions:
0

Re: State Field Showing Below State Dropdown

Not sure I understand your reply. Basically, I am wondering why the second state box(below the pulldown) is showing up even though I have the dropdown attribute set to true.

Basically, I just want the pulldown to show without the 'second' state box. Can anyone help here.

25 Aug 2010, 20:29
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: State Field Showing Below State Dropdown

The box shows up because if someone chooses a country which doesn't have states/provinces/zones defined for it, then your customers will have to manually type in the information instead of being able to select from the pulldown.

12 Dec 2010, 11:11
#5
kiwi1066 avatar

kiwi1066

New Zenner

Join Date:
Jan 2009
Posts:
28
Plugin Contributions:
0

Re: State Field Showing Below State Dropdown

Hi, Is it possible to stop the second State field from appearing?
I have it setup to allow customers to select a state from the dropdown list where it is defined. If a country does not have a state defined then I am happy for just the country to be provided.

Thanks

03 Feb 2011, 09:27
#6
oberheimer avatar

oberheimer

Zen Follower

Join Date:
Feb 2009
Posts:
108
Plugin Contributions:
0

Re: State Field Showing Below State Dropdown

Yes this would be great i don't want the extra text flield aswell, or Just a 1 text field if all states is not set up for every country...

03 Feb 2011, 10:16
#7
oberheimer avatar

oberheimer

Zen Follower

Join Date:
Feb 2009
Posts:
108
Plugin Contributions:
0

Re: State Field Showing Below State Dropdown

kiwi1066:

Hi, Is it possible to stop the second State field from appearing?
I have it setup to allow customers to select a state from the dropdown list where it is defined. If a country does not have a state defined then I am happy for just the country to be provided.

Thanks

This is the best thing i could do for sweden

ad this to stylesheet.css in your template folder

#state,#stText,#stBreak{
display:none;
}

and change english.php language file

define('TYPE_BELOW', 'Not available');

09 Feb 2011, 13:12
#8
oberheimer avatar

oberheimer

Zen Follower

Join Date:
Feb 2009
Posts:
108
Plugin Contributions:
0

Re: State Field Showing Below State Dropdown

Yes that works but now i found a new problem when i try to change the billing address it says

"Errors have occurred during the processing of your form.

Please make the following corrections:

  • Your State must contain a minimum of 0 characters."

It does that because sweden has no states so i selected 0 in the minimal values, and there is only one option...

10 Feb 2011, 02:59
#9
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: State Field Showing Below State Dropdown

Here is a link to my web site create_account page, is this what you are trying to accomplish?

If a country with prescribed states is selected, then the state dropdown box appears for selected country. If no country is selected the state dropdown box appears & displays "Choose your Country First" and the state input box never appears below ready for input.

I only accept US & CA residents or businesses to create an account tho. If a Country with no prescribed states is selected you wont have an input field.

In admin > configuration > customer details

you can change
State - Always display as pulldown? to false

this way no matter what country is selected, a state input box is there for input

10 Feb 2011, 03:45
#10
coolcarpartsonline avatar

coolcarpartsonline

Totally Zenned

Join Date:
Feb 2008
Posts:
1,386
Plugin Contributions:
0

Re: State Field Showing Below State Dropdown

This is due to an error in the css file. I don't remember exactly what field in CSS it was. But I seen this posted in this forum like a million time.

Try to do a compare on the default css and the class template css. Look for missing "display:none" line under one of the classes.

No need to edit language files. Just missing class in your current template css. Switch to a different template and see if it will change.

10 Feb 2011, 10:08
#11
oberheimer avatar

oberheimer

Zen Follower

Join Date:
Feb 2009
Posts:
108
Plugin Contributions:
0

Re: State Field Showing Below State Dropdown

Yes but still wrong if i try to change the shipping address it does'nt work with the state, it says i have to select a state with 0 characters even though there are no states in my country
Can anyone help me out here

10 Feb 2011, 11:46
#12
coolcarpartsonline avatar

coolcarpartsonline

Totally Zenned

Join Date:
Feb 2008
Posts:
1,386
Plugin Contributions:
0

Re: State Field Showing Below State Dropdown

Make the state field not required or completely remove the State field by settings it's value to false in admin.

10 Feb 2011, 12:34
#13
oberheimer avatar

oberheimer

Zen Follower

Join Date:
Feb 2009
Posts:
108
Plugin Contributions:
0

Re: State Field Showing Below State Dropdown

CoolCarPartsOnline:

Make the state field not required or completely remove the State field by settings it's value to false in admin.

Thanks i had 0 in the minimal values and removed that now it works