I have finally figure it out why :D :D .
Here is what you need to change.
1. go to /includes/modules/mfg_categories.php
2. on about line 60 include this reset($category_options);
like so ...
this is the original code
while (list ($key, $val) = each ($category_options)) {
$this_level_option_names = '';
$this_level_option_values = '';
foreach($category_options[$key] as $key2 => $val2) {
$this_level_option_names .= '"' . $val2['text'] . '",';
$this_level_option_values .= $val2['id'] . ',';
}
$this_level_option_names = substr_replace($this_level_option_names,"",-1);
$this_level_option_values = substr_replace($this_level_option_values,"",-1);
if (sizeof($category_options[$key]) == 1) { //add this for single category javascript redirect
$this_level_option_names = $this_level_option_names . ',""';
$this_level_option_values = $this_level_option_values . ',-1';
}
$options .= 'optionsArray[' . $key . '] = new Array(' . $this_level_option_names . ')' . "\n";
$options .= 'valuesArray[' . $key . '] = new Array(' . $this_level_option_values . ')' . "\n";
}
now replace with this
reset($category_options);
while (list ($key, $val) = each ($category_options)) {
$this_level_option_names = '';
$this_level_option_values = '';
foreach($category_options[$key] as $key2 => $val2) {
$this_level_option_names .= '"' . $val2['text'] . '",';
$this_level_option_values .= $val2['id'] . ',';
}
$this_level_option_names = substr_replace($this_level_option_names,"",-1);
$this_level_option_values = substr_replace($this_level_option_values,"",-1);
if (sizeof($category_options[$key]) == 1) { //add this for single category javascript redirect
$this_level_option_names = $this_level_option_names . ',""';
$this_level_option_values = $this_level_option_values . ',-1';
}
$options .= 'optionsArray[' . $key . '] = new Array(' . $this_level_option_names . ')' . "\n";
$options .= 'valuesArray[' . $key . '] = new Array(' . $this_level_option_values . ')' . "\n";
}
The problem was that some servers will think that the array $category_options has already been traversed and it is at the end. with this you force it to be at the beginning every time
hope this helps.