Around line 143 it should read like this:
// create an array of products on special, which will be excluded from the pull down menu of products
// (when creating a new product on special)
$specials_array = array();
$specials_query = tep_db_query("select p.products_id, s.customers_group_id from " . TABLE_PRODUCTS . " p, " . TABLE_SPECIALS . " s where s.products_id = p.products_id");
while ($specials = tep_db_fetch_array($specials_query)) {
$specials_array[] = (int)$specials['products_id'].":".(int)$specials['customers_group_id'];
}
if(isset($HTTP_GET_VARS['sID']) && $sInfo->customers_group_id!=0){
$customer_group_price_query = tep_db_query("select customers_group_price from " . TABLE_PRODUCTS_GROUPS . " where products_id = '" . $sInfo->products_id . "' and customers_group_id = '" . $sInfo->customers_group_id . "'");
if ($customer_group_price = tep_db_fetch_array($customer_group_price_query)) {
$sInfo->products_price = $customer_group_price['customers_group_price'];
}
}
}
$customers_groups_query = tep_db_query("select distinct customers_group_name, customers_group_id from " . TABLE_CUSTOMERS . " order by customers_group_id ");
$input_groups=array();
$all_groups=array();
$sde=0;
while ($existing_groups = tep_db_fetch_array($customers_groups_query)) {
$input_groups[$sde++]=array("id"=>$existing_groups['customers_group_id'], "text"=> $existing_groups['customers_group_name']);
$all_groups[$existing_groups['customers_group_id']]=$existing_groups['customers_group_name'];
}
?>
<tr><form name="new_special" <?php echo 'action="' . tep_href_link(FILENAME_SPECIALS, tep_get_all_get_params(array('action', 'info', 'sID')) . 'action=' . $form_action, 'NONSSL') . '"'; ?> method="post"><?php if ($form_action == 'update') echo tep_draw_hidden_field('specials_id', $HTTP_GET_VARS['sID']); ?>
<td><br><table border="0" cellspacing="0" cellpadding="2">
<tr>
<td class="main"><?php echo TEXT_SPECIALS_PRODUCT; ?> </td>
<td class="main"><?php echo (isset($sInfo->products_name)) ? $sInfo->products_name . ' <small>(' . $currencies->format($sInfo->products_price) . ')</small>' : tep_draw_products_pull_down('products_id', 'style="font-size:10px"', $specials_array); echo tep_draw_hidden_field('products_price', (isset($sInfo->products_price) ? $sInfo->products_price : '')); ?></td>
</tr>
<tr>
<td class="main"><?php echo TEXT_SPECIALS_GROUPS; ?> </td>
<td class="main"><?php echo tep_draw_pull_down_menu('customers_group', $input_groups, (isset($sInfo->customers_group_id)?$sInfo->customers_group_id:''));?> </td>
</tr>