Irin Posted August 25, 2006 Posted August 25, 2006 Hello, I've got a small problem here. When a customer creates account at my store, all the information is saved in the database, address_book table except for the entry_state, it's empty for all the customers. Why is this happening? Any help would be appreciated. Thanks.
calebic Posted August 31, 2006 Posted August 31, 2006 I'm currently trying to figure out the same thing. What is strange is that the state is still being displayed correctly on the address pages. Very confusing. If anyone knows how entry_state is being handled, please share your wisdom!!
ferris_bueller Posted September 27, 2006 Posted September 27, 2006 I am getting the same problem. Any help would be appreciated. Calebric or Irin, did you find the problem?
calebic Posted September 27, 2006 Posted September 27, 2006 Hi ferris_bueller, I'm not sure that it is an error necessarily. It seems that when osC is using Zones, the customer's state is not stored in the customer table, but is calculated based on the customer's zones. If you look at the create_account.php page, you can see the logic that is being used to determine the customer's state. It's not totally clear to me yet, but understanding the following code is a step in the right direction. <?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 { echo tep_draw_input_field('state', tep_get_zone_name($entry['entry_country_id'], $entry['entry_zone_id'], $entry['entry_state'])); } if (tep_not_null(ENTRY_STATE_TEXT)) echo '?<span class="inputRequirement">' . ENTRY_STATE_TEXT; ?> Hope this helps!! Caleb
Recommended Posts
Archived
This topic is now archived and is closed to further replies.