This is a great contribution - my thanks!
I think I can help with your problem if it is still relevant.
Yeah, I noticed / have been trying to get the products to add into the correct category rather than just some in on top level. Here's a dirty but effective fix. Find the following line which adds the product "corresponding to category" in the relevant database table in account_add.php
-----------------
tep_db_query("insert into " . TABLE_PRODUCTS_TO_CATEGORIES . " (products_id, categories_id) values ('" . (int)$products_id . "', '" . (int)$category_id . "')");
-----------------
Replace this with
-----------------
$chosencategory = $_POST['category_id'];
tep_db_query("insert into " . TABLE_PRODUCTS_TO_CATEGORIES . " (products_id, categories_id) values ('" . (int)$products_id . "', '" . $chosencategory . "')");
-----------------
This will revive the original category posted from the add product form (category_id) which appears to get lost between being posted / reaching the preview page / and being saved. Didnt find out where this happens, but this fix appears to work so didnt bother seaching further. Note there is no validation of this variable here - is there any security risk?
Also going to try to tie in this whole add products contrib with the affiliate sales contrib - so affiliates can add products too. Should be fun : )
Cheers