chrometweaks.org

Whats the best domain iPage hosting service?

Click Here To View All Answers...


Quick question: Whats the best domain iPage hosting service? Thanks in advance for any answer or 2. Second question of mine... When I installed the os-commerce United States came up as default ... I must of changed something and now the country comes up as "please select" anyone know how to make United States the default?.

Thanx..

Comments (128)

Hmm... I need to find out myself. I don't know what is the answer to that question. I'll do some research in Google and get back to you if I find an useful answer. You should email the people at iPage as they probably can help you..

Comment #1

Yes when a customer clicks to create an account I would like it to be by default united states..

This post has been edited by.

Gersh_ny.

: 25 August 2004, 15:24..

Comment #2

I did this, but for UK. I learnt how to with a previous thread but I don't have the thread at hand I'm afraid so perhaps use the search feature and hope you find it !..

Comment #3

This wasn't THE thread that I used, but this guy has posted a series of instructions. Don't know if they work but hope it puts you in the right direction..

Tutorial..

Comment #4

Catalog/create_account.php.

Locate code.

<td class="main"><?php echo tep_get_country_list('country')'&nbsp;'(tep_not_null(ENTRY_COUNTRY_TEXT) ? '<span class="inputRequirement">'ENTRY_COUNTRY_TEXT'</span>': ''); ?></td>.

And change to.

<td class="main"><?php echo tep_get_country_list('country', '223')'&nbsp;'(tep_not_null(ENTRY_COUNTRY_TEXT) ? '<span class="inputRequirement">'ENTRY_COUNTRY_TEXT'</span>': ''); ?></td>.

This post has been edited by.

241.

: 25 August 2004, 15:54..

Comment #5

Hi thanx 241, Ian_, and Modom,.

Changed it and it works great..

Would anyone know how to change it so that also the state list displays by default?..

Comment #6

Are you using a pull down for this part as well..

Comment #7

There is a contribution for it. It works pretty good!..

Comment #8

Catalog/create_account.php.

Locate code.

<?php.

 if (ACCOUNT_STATE == 'true') {.

?>.

             <tr>.

               <td class="main"><?php echo ENTRY_STATE; ?></td>.

               <td class="main">.

<?php.

   if ($process == true) {.

     if ($entry_state_has_zones == true) {.

       $zones_array = array();.

       $zones_query = tep_db_query("select zone_name from "TABLE_ZONES" where zone_country_id = '"(int)$country"' order by zone_name");.

       while ($zones_values = tep_db_fetch_array($zones_query)) {.

         $zones_array[] = array('id' => $zones_values['zone_name'], 'text' => $zones_values['zone_name']);.

       }.

       echo tep_draw_pull_down_menu('state', $zones_array);.

     } else {.

       echo tep_draw_input_field('state');.

     }.

   } else {.

     echo tep_draw_input_field('state');.

   }.

   if (tep_not_null(ENTRY_STATE_TEXT)) echo '&nbsp;<span class="inputRequirement">'ENTRY_STATE_TEXT;.

?>.

               </td>.

             </tr>.

<?php.

 }.

?>.

Change to.

<?php.

 if (ACCOUNT_STATE == 'true') {.

?>.

             <tr>.

               <td class="main"><?php echo ENTRY_STATE; ?></td>.

               <td class="main">.

<?php.

   if ($process == true) {.

     if ($entry_state_has_zones == true) {.

       $zones_array = array();.

       $zones_query = tep_db_query("select zone_name from "TABLE_ZONES" where zone_country_id = '"(int)$country"' order by zone_name");.

       while ($zones_values = tep_db_fetch_array($zones_query)) {.

         $zones_array[] = array('id' => $zones_values['zone_name'], 'text' => $zones_values['zone_name']);.

       }.

       echo tep_draw_pull_down_menu('state', $zones_array);.

     } else {.

       $zones_array = array();      .

       $zones_query = tep_db_query("select zone_name from "TABLE_ZONES" order by zone_name");.

       while ($zones_values = tep_db_fetch_array($zones_query)) {.

       $zones_array[] = array('id' => $zones_values['zone_name'], 'text' => $zones_values['zone_name']);.

       }.

       echo tep_draw_pull_down_menu('state', $zones_array);.

     }.

   } else {.

       $zones_array = array();      .

       $zones_query = tep_db_query("select zone_name from "TABLE_ZONES" order by zone_name");.

       while ($zones_values = tep_db_fetch_array($zones_query)) {.

       $zones_array[] = array('id' => $zones_values['zone_name'], 'text' => $zones_values['zone_name']);.

       }.

       echo tep_draw_pull_down_menu('state', $zones_array);.

   }.

   if (tep_not_null(ENTRY_STATE_TEXT)) echo '&nbsp;<span class="inputRequirement">'ENTRY_STATE_TEXT;.

?>.

               </td>.

             </tr>.

<?php.

 }.

?>..

Comment #9

I figured out how to bring up the state drop down list, I am sure there is a better way of doing it but it works.....

In the file catalog/create_account.php around line 415.

Change.

If ($process == true) {.

If ($entry_state_has_zones == true) {.

$zones_array = array();.

$zones_query = tep_db_query("select zone_name from "TABLE_ZONES" where zone_country_id = '"(int)$country"' order by zone_name");.

To.

If (1) {.

If (1) {.

$zones_array = array();.

$zones_query = tep_db_query("select zone_name from "TABLE_ZONES" where zone_country_id = '223' order by zone_name");.

This modification will display a dropdown list of the states instead of an input field for state..

223 is the number for the United States country code so change that to what ever country you are located in..

This post has been edited by.

Gersh_ny.

: 25 August 2004, 16:44..

Comment #10

Hi 241,.

I only noticed your code after I posted mine thanx for the help...

Comment #11

For people who need to list only states of a particular country, you need to further edit the code like below: (I have broken it up to hopefully make it a bit easier to spot the changes).

<?php.

If (ACCOUNT_STATE == 'true') {.

?>.

            <tr>.

              <td class="main"><?php echo ENTRY_STATE; ?></td>.

              <td class="main">.

<?php.

  if ($process == true) {.

    if ($entry_state_has_zones == true) {.

      $zones_array = array();.

      $zones_query = tep_db_query("select zone_name from "TABLE_ZONES".

Where zone_country_id = 200 order by zone_name");.

      while ($zones_values = tep_db_fetch_array($zones_query)) {.

        $zones_array[] = array('id' => $zones_values['zone_name'], 'text' => $zones_values['zone_name']);.

      }.

      echo tep_draw_pull_down_menu('state', $zones_array);.

    } else {.

      $zones_array = array();      .

$zones_query = tep_db_query("select zone_name from "TABLE_ZONES" where zone_country_id = 200 order by zone_name");.

      while ($zones_values = tep_db_fetch_array($zones_query)) {.

      $zones_array[] = array('id' => $zones_values['zone_name'], 'text' => $zones_values['zone_name']);.

      }.

      echo tep_draw_pull_down_menu('state', $zones_array);.

    }.

  } else {.

      $zones_array = array();      .

$zones_query = tep_db_query("select zone_name from "TABLE_ZONES" where zone_country_id = 200 order by zone_name");.

      while ($zones_values = tep_db_fetch_array($zones_query)) {.

      $zones_array[] = array('id' => $zones_values['zone_name'], 'text' => $zones_values['zone_name']);.

      }.

      echo tep_draw_pull_down_menu('state', $zones_array);.

  }.

  if (tep_not_null(ENTRY_STATE_TEXT)) echo '&nbsp;<span class="inputRequirement">'ENTRY_STATE_TEXT;.

?>.

              </td>.

            </tr>.

<?php.

}.

?>.

Where 200 is your desired country code..

Worked for me anyway...

Comment #12

When I installed the os-commerce United States came up as default ... I must of changed something and now the country comes up as "please select" anyone know how to make United States the default?.

Thanx..

Comment #13

Would this be when creating an account, as you do not state where...

Comment #14


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