Hi
I have installed all the uk counties as zones, and set the default country to UK (222), however, when i try to create a new customer account the field for Sate (which is my County field) is a plain text box. However, if I make a mistake in the form and it refreshes, the State field then becomes the drop down box that I want with all my counties in it as it should be.
Beneath is the code pertaining to 'state' in create_account_tpl.php - can anyone see what is wrong, cos I have spent all day on this and for the life of me cant find it.
ps I have tried the code from here http://forums.oscommerce.com/index.p...53879&st=0 and it works fine, but only really works if you only ship to one country<?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>
cheers for any help
Kim





LinkBack URL
About LinkBacks










Bookmarks