PDA

View Full Version : Bugfix 85-checkout_shipping_address checkout_payment_address



kenlyle
12-06-2005, 03:49 PM
As Michael says: "The attached file fixes this problem for both checkout_shipping_address and checkout_payment_address. There was a misplaced brace in the code.

The file to edit is /catalog/includes/modules/checkout_new_address.php"


I couldn't get the fix file from the BugTracker, so here is the fixed code regarding the state field:

<?php
if (ACCOUNT_STATE == 'true') {
?>
<tr>
<td class="main"><?php echo ENTRY_STATE; ?></td>
<td class="main">
<?php
// BOF: MOD - Country-State Selector
$zones_array = array();
$zones_query = tep_db_query("select zone_name from " . TABLE_ZONES . " where zone_country_id = " . $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']); }
if (count($zones_array) > 0) {
echo tep_draw_pull_down_menu('state', $zones_array);
} else {
echo tep_draw_input_field('state');
}
// EOF: MOD - Country-State Selector

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

ishigami
01-05-2006, 07:56 AM
Thank you. This is great.