Jump to content

Archived

This topic is now archived and is closed to further replies.

sackling

automatic state selection not working

Recommended Posts

I believe in the version of oscommerce I just installed there is automatic state selection based on country when on create_accout.php or checkout_new_address.php.

 

It however does not seem to be working. Here is the code on checkout_new_address.php for instance:

 

<?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','','class="input_normal"');
     }
   } else {
     echo tep_draw_input_field('state','','class="input_normal"');
   }

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

 

To me that looks like it should work. Is there something I need to do in admin to activate it?

Share this post


Link to post
Share on other sites

×