Ok guys... i think i've found a fix...
After some analisys i think i found it... well.. if this "add address" process is ok when creating a new account this would mean that the code is already implemented. So the problem was that this wasn't being checked when adding a new address from on other page besides the initial "new account".
I found that the code in question is :
PHP Code:if (ACCOUNT_STATE == 'true' && ACCOUNT_STATE_DRAW_INITIAL_DROPDOWN == 'true') {
$zone_id = 0;
$check_query = "select count(*) as total
from " . TABLE_ZONES . "
where zone_country_id = '" . (int)SHOW_CREATE_ACCOUNT_DEFAULT_COUNTRY . "'";
$check = $db->Execute($check_query);
$entry_state_has_zones = ($check->fields['total'] > 0);
if ($entry_state_has_zones == true) {
$zones_array = array();
$zones_array[] = array('id' => PULL_DOWN_ALL, 'text' => PULL_DOWN_ALL);
$zones_values = $db->Execute("select zone_name
from " . TABLE_ZONES . "
where zone_country_id = '" . (int)SHOW_CREATE_ACCOUNT_DEFAULT_COUNTRY . "'
order by zone_name");
while (!$zones_values->EOF) {
$zones_array[] = array('id' => $zones_values->fields['zone_name'], 'text' => $zones_values->fields['zone_name']);
$zones_values->MoveNext();
}
}
}
wherewould be the dropdown checking that wasn't being checked.PHP Code:ACCOUNT_STATE_DRAW_INITIAL_DROPDOWN == 'true'
So.. my advise is always to backup before doing what i am going to explain next.
Hey.. BACKUP!!
Just insert this piece of code on the includes/modules/checkout_new_address.php so it becomes like this :
(comented code is new to the file)
PHP Code:<?php
/**
* checkout_new_address.php
*
* @package modules
* @copyright Copyright 2003-2006 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: checkout_new_address.php 3777 2006-06-15 07:03:03Z drbyte $
*/
if (!defined('IS_ADMIN_FLAG')) {
die('Illegal Access');
}
/**
* NEW CODE FROM THIS POINT ON
*/
if (ACCOUNT_STATE == 'true' && ACCOUNT_STATE_DRAW_INITIAL_DROPDOWN == 'true') {
$zone_id = 0;
$check_query = "select count(*) as total
from " . TABLE_ZONES . "
where zone_country_id = '" . (int)SHOW_CREATE_ACCOUNT_DEFAULT_COUNTRY . "'";
$check = $db->Execute($check_query);
$entry_state_has_zones = ($check->fields['total'] > 0);
if ($entry_state_has_zones == true) {
$zones_array = array();
$zones_array[] = array('id' => PULL_DOWN_ALL, 'text' => PULL_DOWN_ALL);
$zones_values = $db->Execute("select zone_name
from " . TABLE_ZONES . "
where zone_country_id = '" . (int)SHOW_CREATE_ACCOUNT_DEFAULT_COUNTRY . "'
order by zone_name");
while (!$zones_values->EOF) {
$zones_array[] = array('id' => $zones_values->fields['zone_name'], 'text' => $zones_values->fields['zone_name']);
$zones_values->MoveNext();
}
}
}[/B]
/**
* NEW CODE ENDED HERE
*/
/**
* determine pulldown menu contents if appropriate
*/
Give it a try... and post some feedback. Hope i got it... and remember.. always backup!! ;)![]()




