Forums / Templates, Stylesheets, Page Layout / "Please select a state from the States pull down menu."

"Please select a state from the States pull down menu."

Locked

Started by multichild on 18 Oct 2007, 8:15 AM · Views: 4,901

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
18 Oct 2007, 8:15 AM
#1
multichild avatar

multichild

Zen Follower

Join Date:
Sep 2007
Location:
Chepstow, SE Wales
Posts:
101
Plugin Contributions:
0

"Please select a state from the States pull down menu."

I've just successfully changed how my drop down works in the 'Change Shipping Address' page, by only allowing 13 countries from the full list to appear.

I have a problem though when changing the address with the 'State' section. When I select a country, sometimes it allows me to go straight through without a specific state to that country, but other times if it doesnt recognise the state it brings up an error to chose a state from the pull down menu, but there nothing in there.

I would rather that the state is left up to the client to enter, rather than it being safe guarded by a certain list.

I had a look around and found what i think im looking for in 'Zones', so to allow the country selected to be not affected by the state, do I just delete all those zones from that area, and if i do will it affect any other country select lists?

cheers

Lee

Are we there yet?

Just one more line of code and im done...

18 Oct 2007, 2:10 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: "Please select a state from the States pull down menu."

multichild:

I had a look around and found what i think im looking for in 'Zones', so to allow the country selected to be not affected by the state, do I just delete all those zones from that area, and if i do will it affect any other country select lists?Selecting an appropriate State also causes the customer's address to be linked to a related Zone.
Zones are used to handle taxation and to help limit shipping modules to allowed locations.

If you start hacking things out you're going to find other things will stop working.

Were these same problems happening before you changed the pulldown contents?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

18 Oct 2007, 3:00 PM
#3
multichild avatar

multichild

Zen Follower

Join Date:
Sep 2007
Location:
Chepstow, SE Wales
Posts:
101
Plugin Contributions:
0

Re: "Please select a state from the States pull down menu."

Hi DrByte,

To be honest I didnt notice, but what I have noticed is that there are only a few zones set up, and its only if I pick one of those zones in the drop down that I get the problem.

Such as if I choose Germany it asks for the state as an error, but if I choose Egypt which hasnt the states setup it doesnt and allows it to pass through.

Thats why i wondered if I could easily get rid of the other zones, without any problems anywhere else in the site.

But I wanted to check first.

Lee

Are we there yet?

Just one more line of code and im done...

18 Oct 2007, 3:50 PM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: "Please select a state from the States pull down menu."

Normally, on a fresh unaltered install of Zen Cart, if someone chooses a country for which there are no zones defined, and if the States Pulldown field is enabled, another input field will show up next to the pulldown menu for the customer to manually key in their state/zone/province name. This hinges on some javascript and stylesheet components in order to work properly.

If the States Pulldown is disabled by default, then if the customer types in a state name that cannot be matched in the Zones for the selected country, they are asked to choose from the list of valid zones via the pulldown that appears along with the error message.

Perhaps just enabling the States Pulldown by default would help you get around some of your confusion. Granted, this requires that you're using a template that contains the default functionality for javascript and stylesheets components.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

14 Nov 2007, 12:20 PM
#5
markrs avatar

markrs

New Zenner

Join Date:
Jul 2006
Location:
Wiltshire, England
Posts:
69
Plugin Contributions:
0

Re: "Please select a state from the States pull down menu."

Whilst my (1.3.7) installation is neither fresh nor unadulterated, I'm having a problem with the zones dropdown.

When creating an account (in order to buy something) if my customer selects a country for which there are no zones listed, even if s/he types in a "zone", a dialog box appears complaining that there is a problem, but there's no text next to the asterisk. It's only by a sequence of trials that I've found that this is the problem. :lookaroun

What to do? :blink:

TIA
Mark

14 Nov 2007, 12:50 PM
#6
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: "Please select a state from the States pull down menu."

Check if this needs the setting to Company changed to 0 vs 2 ...

Also be sure that your stylesheet has added the classes:

.hiddenField {
	display: none;
}
.visibleField {
	display: inline;
}

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

14 Nov 2007, 1:32 PM
#7
markrs avatar

markrs

New Zenner

Join Date:
Jul 2006
Location:
Wiltshire, England
Posts:
69
Plugin Contributions:
0

Re: "Please select a state from the States pull down menu."

Ajeh:

Check if this needs the setting to Company changed to 0 vs 2 ...
That fixed that part! Thank you. It seems a little odd since the company name field is not marked a necessary, but hey ho.

Ajeh:

Also be sure that your stylesheet has added the classes:
It didn't, but it does now, thanx.

However...
It now has the "Sorry, we are not accepting payments from your region at this time" problem.
This seems to be that the payment module gets upset if the cart total is zero.
Or is there something different that needs tweaking?

"Almost there... we're almost there..." :cool:

14 Nov 2007, 1:40 PM
#8
markrs avatar

markrs

New Zenner

Join Date:
Jul 2006
Location:
Wiltshire, England
Posts:
69
Plugin Contributions:
0

Re: "Please select a state from the States pull down menu."

Ok, it turns out that this isn't a problem, just an annoyance :wink:

Yes, the payment part of screen two of the checkout procedure makes that complaint, but since there's nothing to pay, it doesn't really matter.

Doesn't look nice though.

:(