Forums / Managing Customers and Orders / You must select a country from the Countries pull down menu

You must select a country from the Countries pull down menu

Locked

Views: 17,478

Results 1 to 20 of 40
This thread is locked. New replies are disabled.
17 Oct 2006, 10:07 AM
#1
pod166 avatar

pod166

New Zenner

Join Date:
Oct 2006
Posts:
14
Plugin Contributions:
0

You must select a country from the Countries pull down menu

I am trying to get my new site up and running with ZenCart but am hitting problems when trying to create a new customer account. I get the message 'You must select a country from the Countries pull down menu.' when clicking on the submit key. My default country is United Kingdom and this shows when first opening up the page but for some reason it doesn't think that it has been selected. I am running the latest version of zencart (1.3.5) and php 4.4.4. I have noticed a lot of similar posts regarding the state field but no real solutions however I haven't seen anything relating to the countries field - any advice would help me as I have found zencart an excellent product but am increasingly getting frustrated with this problem.

Thanks

Pod166

http://www.ninawagner.com

22 Oct 2006, 8:52 AM
#2
pod166 avatar

pod166

New Zenner

Join Date:
Oct 2006
Posts:
14
Plugin Contributions:
0

Re: You must select a country from the Countries pull down menu

I have spent a lot of time on this particular problem and got extremely frustrated over the situation. In the end I did a complete new installation of the website and database to reset everything. I found when I tested the default template everything worked fine and then I applied my own custom template and found that the same problem occurred with the country error message as before. I then compared the files within the includes/templates/YOUR TEMPLATE/templates with windiff. This showed that there were differences between various files but the most important ones were the following ones:

tpl_modules_address_book_details.php
tpl_modules_checkout_address_book.php
tpl_modules_create_account.php

I then copied these files from the template_default template folder and overwrote my files and tested again. All seemed to work fine after this :)

The only thing I can think of was that I had installed a module previously that had overwritten some files but I can't remember which ones they were.

I know these were extreme measures but it was a process of elimination to get to this result!

Pod166

22 Oct 2006, 10:12 AM
#3
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: You must select a country from the Countries pull down menu

Many thanks for posting how you solved this. Hopefully it will help others to avoid that frustration that you experienced.

Kuroi Web Design and Development | Twitter

(Questions answered in the forum only - so that any forum member can benefit - not by personal message)

25 Oct 2006, 8:10 PM
#4
jeriggs76 avatar

jeriggs76

New Zenner

Join Date:
Jul 2006
Posts:
5
Plugin Contributions:
0

Re: You must select a country from the Countries pull down menu

I've tried this fix as well with no luck. Anyone have any other suggestions?

27 Oct 2006, 4:37 PM
#5
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: You must select a country from the Countries pull down menu

jeriggs76:

I've tried this fix as well with no luck. Anyone have any other suggestions?Upgrade to 1.3.6, out today and containing the official fix for this.

Kuroi Web Design and Development | Twitter

(Questions answered in the forum only - so that any forum member can benefit - not by personal message)

20 Jan 2007, 1:24 AM
#6
tjthecat3 avatar

tjthecat3

New Zenner

Join Date:
Jan 2007
Posts:
19
Plugin Contributions:
0

Re: You must select a country from the Countries pull down menu

kuroi:

Upgrade to 1.3.6, out today and containing the official fix for this.

i have the latest version of zen cart and i am still having this problem. any ideas?

20 Jan 2007, 1:51 AM
#7
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,684
Plugin Contributions:
0

Re: You must select a country from the Countries pull down menu

Then you missed upgrading some files ...

Please do not PM for support issues: a private solution doesn't benefit the community.

Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

20 Jan 2007, 2:07 AM
#8
kimsonvu avatar

kimsonvu

Zen Follower

Join Date:
Aug 2006
Location:
HCMC
Posts:
263
Plugin Contributions:
0

Re: You must select a country from the Countries pull down menu

I would like to know the folder/file which i missed.I have same problem and dont know how to fix :(

From Hochiminh City - Vietnam !
Call me when you travel here : +840983038939
KIMSON

20 Jan 2007, 2:28 AM
#9
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,684
Plugin Contributions:
0

Re: You must select a country from the Countries pull down menu

Please look at the changelog and use a file comparison utility to find the files in both the default installation and your customized files.

Please do not PM for support issues: a private solution doesn't benefit the community.

Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

20 Jan 2007, 2:33 AM
#10
kimsonvu avatar

kimsonvu

Zen Follower

Join Date:
Aug 2006
Location:
HCMC
Posts:
263
Plugin Contributions:
0

Re: You must select a country from the Countries pull down menu

Kim:

Please look at the changelog and use a file comparison utility to find the files in both the default installation and your customized files.

so i dont creat chagelog when install new modules in my web.That is big problems ....
I was try to compare code current zencart and 1.37 and change file in modules,but it still now work :wacko:

From Hochiminh City - Vietnam !
Call me when you travel here : +840983038939
KIMSON

20 Jan 2007, 5:54 AM
#11
tjthecat3 avatar

tjthecat3

New Zenner

Join Date:
Jan 2007
Posts:
19
Plugin Contributions:
0

Re: You must select a country from the Countries pull down menu

Kim:

Then you missed upgrading some files ...

do you know which files are pertinent to this problem? cause i reuploaded the three that were listed earlier in this thread, no luck.

20 Jan 2007, 6:02 AM
#12
kimsonvu avatar

kimsonvu

Zen Follower

Join Date:
Aug 2006
Location:
HCMC
Posts:
263
Plugin Contributions:
0

Re: You must select a country from the Countries pull down menu

Yes,This is the list file i changed code when compare with 1.37

Searching 1236 files ... for: ENTRY_COUNTRY_ERROR

/home/handicra/public_html/shop/admin/customers.php

Line #144 : $entry_country_error = true;

Line #146 : $entry_country_error = false;

Line #150 : if ($entry_country_error == true) {

Line #741 : if ($entry_country_error == true) {

Line #742 : echo zen_draw_pull_down_menu('entry_country_id', zen_get_countries(), $cInfo->entry_country_id) . ' ' . ENTRY_COUNTRY_ERROR;

/home/handicra/public_html/shop/admin/includes/languages/english.php

Line #249 : define('ENTRY_COUNTRY_ERROR', '');

/home/handicra/public_html/shop/includes/form_check.js.php

Line #118 : check_select("country", "", "<?php echo ENTRY_COUNTRY_ERROR; ?>");

/home/handicra/public_html/shop/includes/languages/english.php

Line #237 : define('ENTRY_COUNTRY_ERROR', 'You must select a country from the Countries pull down menu.');

/home/handicra/public_html/shop/includes/modules/checkout_new_address.php

Line #133 : $messageStack->add('checkout_address', ENTRY_COUNTRY_ERROR);

/home/handicra/public_html/shop/includes/modules/classic/create_account.php

Line #183 : $messageStack->add('create_account', ENTRY_COUNTRY_ERROR);

/home/handicra/public_html/shop/includes/modules/create_account.php

Line #228 : $messageStack->add('create_account', ENTRY_COUNTRY_ERROR);

/home/handicra/public_html/shop/includes/modules/pages/account_edit/jscript_form_check.php

Line #115 : check_select("country", "", "<?php echo ENTRY_COUNTRY_ERROR; ?>");

/home/handicra/public_html/shop/includes/modules/pages/account_password/jscript_form_check.php

Line #115 : check_select("country", "", "<?php echo ENTRY_COUNTRY_ERROR; ?>");

/home/handicra/public_html/shop/includes/modules/pages/address_book_process/header_php.php

Line #163 : $messageStack->add('addressbook', ENTRY_COUNTRY_ERROR);

/home/handicra/public_html/shop/includes/modules/pages/address_book_process/jscript_main.php

Line #117 : check_select("country", "", "<?php echo ENTRY_COUNTRY_ERROR; ?>");

/home/handicra/public_html/shop/includes/modules/pages/checkout_payment_address/jscript_main.php

Line #135 : check_select("country", "", "<?php echo ENTRY_COUNTRY_ERROR; ?>");

/home/handicra/public_html/shop/includes/modules/pages/checkout_shipping_address/jscript_main.php

Line #135 : check_select("country", "", "<?php echo ENTRY_COUNTRY_ERROR; ?>");

/home/handicra/public_html/shop/includes/modules/pages/create_account/jscript_form_check.php

Line #118 : check_select("country", "", "<?php echo ENTRY_COUNTRY_ERROR; ?>");

/home/handicra/public_html/shop/includes/modules/pages/login/jscript_form_check.php

Line #118 : check_select("country", "", "<?php echo ENTRY_COUNTRY_ERROR; ?>");

But still not working ....

From Hochiminh City - Vietnam !
Call me when you travel here : +840983038939
KIMSON

20 Jan 2007, 9:33 AM
#13
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: You must select a country from the Countries pull down menu

This particular function is deceptively complex involving php and javascript to determine whether a field or a pulldown menu is displayed, and then ensuring that the function degrades in a workable fashion when javascript is disabled. However, there is still one way to break it, and what I see on your site, Kimsonvu, suggests that you've found it.

I believe that what you are doing is in Admin > Configuration > Customer Settings
setting "State" to true, "State - Always display as pulldown?" to true and "Create Account Default Country ID" to none (displays in Admin as a blanl space).

However, this doesn't really make sense. You are telling the system to display a pulldown menu, but then not telling it the country whose states are to be used. This is why it has problems and also displays the field into which a state can be typed. If you are going to use the pulldown menu, you must also designate a country as the default. If your store ships internationally, I recommend against using the pulldown menu.

Whilst looking at your site, I noticed a couple of other problems with which you may wish to deal.

  1. The text that you have cut and pasted into your scroller is a complete HTML page including all the heading tages and a </body> and a </html> tag. In some browsers this may cause the page to end at that point.

  2. The links that you have coded into your EZ-Pages header and your Nav Supp footer for "My Account" are incorrect.

Kuroi Web Design and Development | Twitter

(Questions answered in the forum only - so that any forum member can benefit - not by personal message)

20 Jan 2007, 9:35 AM
#14
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: You must select a country from the Countries pull down menu

tjthecat3

The previous post may deal with your issue also. If not, please provide a link to the site where we can see your problem.

Kuroi Web Design and Development | Twitter

(Questions answered in the forum only - so that any forum member can benefit - not by personal message)

20 Jan 2007, 9:41 AM
#15
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: You must select a country from the Countries pull down menu

CORRECTION for kimsonvu

My apologies kimsonvu :blush: your problem is different to that which I said in my post above.

You have added the CAPTACHA add-on. Unfortunately this add-on was built for an earlier version of Zen Cart and although it has been revised for more recent versions, it replaces some of the core programs used in the create account process with code based on older versions and an older strucuture that does not fully account for the more recent fixes.

Kuroi Web Design and Development | Twitter

(Questions answered in the forum only - so that any forum member can benefit - not by personal message)

20 Jan 2007, 9:47 AM
#16
kimsonvu avatar

kimsonvu

Zen Follower

Join Date:
Aug 2006
Location:
HCMC
Posts:
263
Plugin Contributions:
0

Re: You must select a country from the Countries pull down menu

kuroi:

CORRECTION for kimsonvu

My apologies kimsonvu :blush: your problem is different to that which I said in my post above.

You have added the CAPTACHA add-on. Unfortunately this add-on was built for an earlier version of Zen Cart and although it has been revised for more recent versions, it replaces some of the core programs used in the create account process with code based on older versions and an older strucuture that does not fully account for the more recent fixes.

Thanks for help,
I added the CAPTACHA add-on but i tested when add.A few week ago,i installed some module and forget to test ... so i have some customer ask me about this problem-that why i found :D

May be i need to restore and delete CAPTACHA add-on

From Hochiminh City - Vietnam !
Call me when you travel here : +840983038939
KIMSON

21 Jan 2007, 6:51 AM
#17
tjthecat3 avatar

tjthecat3

New Zenner

Join Date:
Jan 2007
Posts:
19
Plugin Contributions:
0

Re: You must select a country from the Countries pull down menu

kuroi:

tjthecat3

The previous post may deal with your issue also. If not, please provide a link to the site where we can see your problem.

fixed it, thanks!

thought i had upgraded all of the files, apparently i missed some.

21 Jan 2007, 4:22 PM
#18
meltdown avatar

meltdown

Totally Zenned

Join Date:
Jun 2006
Location:
My family and I live in Brighton, England
Posts:
947
Plugin Contributions:
0

Re: You must select a country from the Countries pull down menu

In 1.3.6, after having taken care of the country drop-down list issue, I was still unable to create accounts. There was no error message or any other indicator of why I couldn't, I just couldn't. I want to mention the fix here as it was a particularly frustrating problem, the solution for which I just stumbled upon.

In Admin/Configuration/Minimum Values you can set the mandatory minimum number of characters in a field. (City, State, Post Code etc.) This includes not having a minimum number at all. By not having a minimum number it is as though the field is not mandatory, even though the red "x" will remain. However, I found that if a category is left blank with no number in it, it causes a conflict and you are unable to create accounts.
If you are unable to create accounts but not receiving an error message as to why, you might want to confirm that all fields in Admin/Configuration/Minimum Values have at least a "0" in them.

Good luck!

Tim

22 Jan 2007, 6:12 AM
#19
exittheapple avatar

exittheapple

New Zenner

Join Date:
Nov 2005
Posts:
53
Plugin Contributions:
0

Re: You must select a country from the Countries pull down menu

pod166:

I have spent a lot of time on this particular problem and got extremely frustrated over the situation. In the end I did a complete new installation of the website and database to reset everything. I found when I tested the default template everything worked fine and then I applied my own custom template and found that the same problem occurred with the country error message as before. I then compared the files within the includes/templates/YOUR TEMPLATE/templates with windiff. This showed that there were differences between various files but the most important ones were the following ones:

tpl_modules_address_book_details.php
tpl_modules_checkout_address_book.php
tpl_modules_create_account.php

I then copied these files from the template_default template folder and overwrote my files and tested again. All seemed to work fine after this :)

The only thing I can think of was that I had installed a module previously that had overwritten some files but I can't remember which ones they were.

I know these were extreme measures but it was a process of elimination to get to this result!

Pod166

thank you for this!! since i hadn't made any customizations to these files in my template, i just deleted them. anything there's not a replacement for in [yr_template] folder, zencart reverts to the default template to get it.

so, all i did was delete the files you listed above from my templates/mytemplate/templates/ folder, and then i was able to create my test account!!

now i need to go lower my blood pressure again after the stress of discovering, panicing, and finally fixing this bug. ;)

thanks to zencart and the zencart community!!

zencart installation is at http://oyinhandmade.com/shop

22 Jan 2007, 6:41 AM
#20
kimsonvu avatar

kimsonvu

Zen Follower

Join Date:
Aug 2006
Location:
HCMC
Posts:
263
Plugin Contributions:
0

Re: You must select a country from the Countries pull down menu

exittheapple:

thank you for this!! since i hadn't made any customizations to these files in my template, i just deleted them. anything there's not a replacement for in [yr_template] folder, zencart reverts to the default template to get it.

so, all i did was delete the files you listed above from my templates/mytemplate/templates/ folder, and then i was able to create my test account!!

now i need to go lower my blood pressure again after the stress of discovering, panicing, and finally fixing this bug. ;)

thanks to zencart and the zencart community!!

your link have problem... :mellow:

From Hochiminh City - Vietnam !
Call me when you travel here : +840983038939
KIMSON