chrometweaks.org

What a some good iPage web hosting companys?

Click Here To View All Answers...


First of all What a some good iPage web hosting companys? Thanks in advance for any comment. Another quick question... Ive found a few contributions, but theyre not quite what I'm looking for. Im trying to make the U.S. the only field in country, and trying to get a drop down state list with the US states only..

How can I do this? Do I need to modify the db itself?..

Comments (22)

Good question... I dunno what is the answer. I'll do some Googling and get back to you if I bump into an useful answer. You should email the people at iPage as they probably could assist you..

Comment #1

Okee, so a sql script could be written as a contrib to replace old country file and modify the states..

That's a fairly simple contrib, wonder why no one has done it yet..

Comment #2

Do you want to have the US as the default or as the only country? If as the default then look in the tips section of the knowledge base and follow the instructions. If you want it to be the only one you need to remove the other countries from the database. The easiest way to do this is to go to phpmyadmin and bring up the countries table and write down the info for the US and the empty the talble and add the US back in..

For the state dropdown when they create an account go to your create_account.php file at or about line 130 and find.

If (ACCOUNT_STATE == 'true') {.

$zone_id = 0;.

$check_query = tep_db_query("select count(*) as total from "TABLE_ZONES" where zone_country_id = '"(int)$country"'");.

$check = tep_db_fetch_array($check_query);.

$entry_state_has_zones = ($check['total'] > 0);.

If ($entry_state_has_zones == true) {.

$zone_query = tep_db_query("select distinct zone_id from "TABLE_ZONES" where zone_country_id = '"(int)$country"' and (zone_name like '"tep_db_input($state)"%' or zone_code like '%"tep_db_input($state)"%')");.

If (tep_db_num_rows($zone_query) == 1) {.

$zone = tep_db_fetch_array($zone_query);.

$zone_id = $zone['zone_id'];.

} else {.

$error = true;.

And change it to.

If (ACCOUNT_STATE == 'true') {.

$zone_id = 0;.

$check_query = tep_db_query("select count(*) as total from "TABLE_ZONES" where zone_country_id = '223"(int)$country"'");.

$check = tep_db_fetch_array($check_query);.

$entry_state_has_zones = ($check['total'] > 0);.

If ($entry_state_has_zones == true) {.

$zone_query = tep_db_query("select distinct zone_id from "TABLE_ZONES" where zone_country_id = '223"(int)$country"' and (zone_name like '"tep_db_input($state)"%' or zone_code like '%"tep_db_input($state)"%')");.

If (tep_db_num_rows($zone_query) == 1) {.

$zone = tep_db_fetch_array($zone_query);.

$zone_id = $zone['zone_id'];.

} else {.

$error = true;.

This should give the customer a dropdown of states to choose from..

Comment #3

Thanks man, as soon as my stupid server is back online I'll try it out...

Comment #4

It's all good and working now. Except the sql query didnt quite work. It should have worked by selecting "223" from zones, giving you only US states, but it kept giving the whole table for zones. So I just went in and deleted everything != 223 and it works. Thanks for both your help...

Comment #5

Ive found a few contributions, but theyre not quite what I'm looking for. Im trying to make the U.S. the only field in country, and trying to get a drop down state list with the US states only..

How can I do this? Do I need to modify the db itself?..

Comment #6

Hi.

I wanted UK only and had to create a new countries file in the db. I renamed the original countries_old and copied the UK line over..

Julian..

Comment #7


This question was taken from a support group/message board and re-posted here so others can learn from it.