So i got it working, i hope i used the right approach. Here is my code:
I only altered html_output.php:
Line 96, from:
$rewrite_page_product = short_name(constant('PRODUCT_NAME_'.$p2[1])) . '-p-' . $p2[1] . '.html';
to:
// Addition to write the manufacturers name into the static link too
$manufac_query = tep_db_query("SELECT " . TABLE_MANUFACTURERS . ".manufacturers_name FROM " . TABLE_MANUFACTURERS . " INNER JOIN " . TABLE_PRODUCTS . " ON " . TABLE_MANUFACTURERS . ".manufacturers_id = " . TABLE_PRODUCTS . ".manufacturers_id WHERE " . TABLE_PRODUCTS . ".products_id = " . $p2[1]);
$manufac_name = "";
while ($manufac = tep_db_fetch_array($manufac_query)) {
$manufac_name = $manufac['manufacturers_name'];
}
if ($manufac_name != '') {
$rewrite_page_product = short_name($manufac_name) . "-" . short_name(constant('PRODUCT_NAME_'.$p2[1])) . '-p-' . $p2[1] . '.html';
} else {
$rewrite_page_product = short_name(constant('PRODUCT_NAME_'.$p2[1])) . '-p-' . $p2[1] . '.html';
}
I also did some changes to the short_name function, to replace some umlauts, but this is just for the german speaking people. I just added these lines directly after the function declaration:
$str = str_replace("?", "ae", $str);
$str = str_replace("?", "oe", $str);
$str = str_replace("?", "ue", $str);
$str = str_replace(" ", "-", $str);
Im just writing this because i think i read someones post asking about this.