So, looking at an attributes.php file that was included with a different module (and I believe it is 1.5.1), towards the end of the file, almost like 5 lines from the end, you should see something like:
Code:
// attributes images table
$options_attributes_image[] = trim($tmp_attributes_image) . "\n";
$products_options_names->MoveNext();
}
I would consider adding the custom code as such to just before the $options_attributes_image[] line:
Code:
if (stristr($attributes_values->fields['products_options_name'],'MYFIRSTATTRIBUTENAME')) {
end($options_name);
$last_id=key($options_name);
$options_name[$last_id] = '<div id="MYHIDDENATTRIBUTESDIV">' . $options_name[$last_id];
} elseif (stristr($attributes_values->fields['products_options_name'],'MYLASTATTRIBUTENAME')) {
end($options_name);
$last_id=key($options_name);
$options_name[$last_id] = $options_name[$last_id] . '</div>';
}
This may work...