1)
Quote
replace
$name = $account['customers_firstname']." ".$account['customers_lastname'] ;
with
$name = $account['customers_firstname'].' '.$account['customers_lastname'] ;
Both the above worked but contrib had this which did not work:
" " (why does this get removed from code snippet in forum? odd)
2)
spooks, on 18 February 2010, 22:51, said:
From what I see of Active Countries this already has all the functionality of that, so ignore/remove all its code.
Ha ha, not so easy for me. Active Countries still frying my brain. In create_account I'm struggling with this as you've moved it to address_fields:
<?php
if (ACCOUNT_STATE == 'true') {
?>
<tr>
<td class="main"><?php echo ENTRY_STATE; ?></td>
<td class="main">
<?php
//-MS- Added Active Countries
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_id, zone_name from " . TABLE_ZONES . " where zone_status='1' and 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_id'], '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_id, zone_name from " . TABLE_ZONES . " where zone_status='1' order by zone_name");
while ($zones_values = tep_db_fetch_array($zones_query)) {
$zones_array[] = array('id' => $zones_values['zone_id'], '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_id, zone_name from " . TABLE_ZONES . " where zone_status='1' and 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_id'], 'text' => $zones_values['zone_name']);
}
echo tep_draw_pull_down_menu('state', $zones_array);
}
//-MS- Added Active Countries EOM
if (tep_not_null(ENTRY_STATE_TEXT)) echo ' <span class="inputRequirement">' . ENTRY_STATE_TEXT;
?>
</td>
</tr>
<?php
}
?>
<tr>
<td class="main"><?php echo ENTRY_POST_CODE; ?></td>
<td class="main"><?php echo tep_draw_input_field('postcode') . ' ' . (tep_not_null(ENTRY_POST_CODE_TEXT) ? '<span class="inputRequirement">' . ENTRY_POST_CODE_TEXT . '</span>': ''); ?></td>
</tr>
<tr>
<td class="main"><?php echo ENTRY_COUNTRY; ?></td>
<td class="main"><b><?php echo ($tmp_object = tep_get_country_active_list('country', $country, 'onChange="this.form.submit();"')) . tep_draw_hidden_field('country_old', $country) . ' ' . (is_array($tmp_object) ? '<span class="inputRequirement">' . ENTRY_COUNTRY_TEXT . '</span>': ''); ?></b></td>
</tr>
</table></td>
How do I integrate it into address_fields?
case 'state':
if (ACCOUNT_STATE == 'true') {
echo sprintf($field, ENTRY_STATE, '<div id="states">' . ajax_get_zones_html($country,($zone_id ? $zone_id : ($entry['entry_zone_id'] ? $entry['entry_zone_id'] : $entry['entry_state'])),false) . '</div>');
}
break;
case 'postcode':
echo sprintf($field, ENTRY_POST_CODE, tep_draw_input_field('postcode', $entry['entry_postcode'], ' maxlength="10"') . ' ' . (tep_not_null(ENTRY_POST_CODE_TEXT) ? '<span class="inputRequirement">' . ENTRY_POST_CODE_TEXT . '</span>': ''));
break;
case 'country':
echo sprintf($field, ENTRY_COUNTRY, tep_get_country_list('country',$country, 'onChange="getStates(this.value, \'states\');"') . ' ' . (tep_not_null(ENTRY_COUNTRY_TEXT) ? '<span class="inputRequirement">' . ENTRY_COUNTRY_TEXT . '</span>': '') . '<a href="javascript:void(0);" title="'.$country.'"> </a>');
break;
3)
I'm thinking I don't need AJAX code as active countries is dealing with state & country, is that right? If I had a towel here I'd be chucking it. And I can't believe I'm wanting to update Active Countries when it's not even supported by original writer.... arrggghhh
4)
no phone number is sent with contact_us, I'm not bothered as I don't phone people, but just for others who may want it to work.