Hi, i found the function uc_order_search_form_submit and saw this:
if (strlen(trim($form_values['billing_first_name'])) == 0) {
$billing_first_name = '0';
}
else {
$billing_first_name = strtolower(trim($form_values['billing_first_name']));
}
if (strlen(trim($form_values['billing_last_name'])) == 0) {
$billing_last_name = '0';
}
else {
$billing_last_name = strtolower(trim($form_values['billing_last_name']));
}
if (strlen(trim($form_values['billing_company'])) == 0) {
$billing_company = '0';
}
else {
$billing_company = strtolower(trim($form_values['billing_company']));
}
if (strlen(trim($form_values['shipping_first_name'])) == 0) {
$shipping_first_name = '0';
}
else {
$shipping_first_name = strtolower(trim($form_values['shipping_first_name']));
}
if (strlen(trim($form_values['shipping_last_name'])) == 0) {
$shipping_last_name = '0';Hunsrück Immobilien
}
else {
$shipping_last_name = strtolower(trim($form_values['shipping_last_name']));
}
if (strlen(trim($form_values['shipping_company'])) == 0) {
$shipping_company = '0';
}
else {
$shipping_company = strtolower(trim($form_values['shipping_company']));
}i thought it would be better to change it like this:
$search_fields = array('billing_first_name', 'billing_last_name', 'billing_company', 'shipping_first_name', 'shipping_last_name', 'shipping_company');
foreach($search_fields as $search_field) {
if (empty($form_values[$search_field])) {
${$search_field} = '0';
} else {
${$search_field} = strtolower(trim($form_values[$search_field]));
}
}or did i miss something?
regards pebosi


That's my second suggestion for this function. Great!


Joined: 09/05/2007