rivercity Posted September 28, 2008 Share Posted September 28, 2008 I noticed that when creating an account, I enter B.C. as my province. (Select State/Province) (Canada is selected as my country), I am kicked back to create account page with a new drop down menu for "province". I also have to re-enter password to continue. Is it possible to have drop down menu with all states and provinces on first page so customer can select state/province to avoid being kicked back for entering an abbrieviated version of the state or province? Thanks In Advance Link to comment Share on other sites More sharing options...
BryceJr Posted September 28, 2008 Share Posted September 28, 2008 This thread might help Link to comment Share on other sites More sharing options...
rivercity Posted October 1, 2008 Author Share Posted October 1, 2008 Thanks Bryce, just what I was looking for! BryceJr View Member Profile Add as Friend Send Message Find Member's Topics Find Member's Posts Aug 8 2008, 04:59 AM Post #7 Bryce Group: Community Member Posts: 555 Joined: 13-December 07 Member No.: 191,989 QUOTE Have a drop down to select a State. Important: Backup before attempting this. Based on country-state selector addon. Look for this block of code in create_account.php <td class="main"><?php echo ENTRY_CITY; ?></td> <td class="main"><?php echo tep_draw_input_field('city') . ' ' . (tep_not_null(ENTRY_CITY_TEXT) ? '<span class="inputRequirement">' . ENTRY_CITY_TEXT . '</span>': ''); ?></td> </tr> <?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 ' <span class="inputRequirement">' . ENTRY_STATE_TEXT; ?> Replace with this <td class="main"><?php echo ENTRY_CITY; ?></td> <td class="main"><?php echo tep_draw_input_field('city') . ' ' . (tep_not_null(ENTRY_CITY_TEXT) ? '<span class="inputRequirement">' . ENTRY_CITY_TEXT . '</span>': ''); ?></td> </tr> <?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_array = array(array('id' => '', 'text' => PULL_DOWN_DEFAULT)); $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_array = array(array('id' => '', 'text' => PULL_DOWN_DEFAULT)); $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_array = array(array('id' => '', 'text' => PULL_DOWN_DEFAULT)); $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 ' <span class="inputRequirement">' . ENTRY_STATE_TEXT; ?> This post has been edited by BryceJr: Aug 8 2008, 04:59 AM Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.