Actually, not as silly as you may think. Normally this will create a linked product (duplicate but not so much a duplicate as it maintains the same products_id).
There currently is no "remove a product from a category" type feature... If a product being processed on import is in the category "assigned", then nothing is done, if it is not in the category that is assigned/determined in the process, then the product is added to the category (if the category didn't exist before, then it is created before this addition).
Removal from a category is somewhat of a two step process. The product's master_categories_id in the products table needs to reflect an existing category and the table products_to_categories needs to have the entry for the products_id removed for the category from which it is leaving and if not already associated with the new category an entry made... I did not find any code that did a delete on the products_to_categories table on import and there is nothing that specifically modifies an existing master_categories_id entry other than a product update with master_categories_id as a user defined field. The only other instance of affecting the master_categories_id is upon initial insert of a product as it must have/maintain a master_categories_id assigned.
So, removal of a product from one category (ie part of a process to move a product from one category to another) is not yet in the code... Perhaps can come up with something like another status switch that would "reassign" the master_categories_id to the chosen category and remove the linked product from the products_to_categories table in relation to the previous master category (status of 9 deletes a product, perhaps a different number could be used to do a move). It would not *directly* resolve issues associated with other linked product, but it would support a move action... Technically if the product were moved through each respective linked category, then there would remain but one category associated with the product (this could be accomplished in a single file upload where each line of the file had the product moved to each linked category and then a final move to the desired end category...)
Perhaps if considered further necessary (large issue with linked product) an additional option (dropdown, link, whatever) to address just bulk linked product changes would help...
I would suggest though in the interim not counting on the above to happen/be implemented quickly... Work on this is generally a free time dependent project, though now that a path is seen, it may not be as long as originally anticipated and there are other factors that could make it go faster. :)
Bookmarks