I haven't tested this, so make a backup first:
In html_catalog.php, replace {productid} with {productcode} everywhere it appears. For example, you would replace this:
Code:
"product" => "{product_name}-p-{productid}.html",
with this:
Code:
"product" => "{product_name}-p-{productcode}.html",
Let me know if it works for you.....