ExpandI Know this is an old thread but I've come across it a few times so far so hope this helps someone!
Category Import is a right pain in PS.
It uses a parent category to build the tree, but if the parent doesn't exist, it doesn't create it. Therefore you need to organise your import CSV (excel sheet easiest) by tree level.
I have added a new column in my import sheet and ignore this, but I order by A>Z in this column and it keeps the import in the correct order for PS. (highlighted in green)
Note the Cat ID is all over the place, this is because the categories were initially added manually as we built the store. You need to "manually" work out (could prob do a formula) what the category level is, but PS imports line by line, so it will create HOME, then Accessories and so on. In the end, you'll then end up with an organised tree.
As for product import, I am not sure (as so far we have stayed away from categories with the same name under different parents) but as far as I am aware, you can do one of two things:
1. In Categories (x,y,z...) you can put Parent/Category - so lets say in our case we want Accessories under home, and Accessories under Scenics. We could put Home/Accessories, Scenics/Accessories. I would need to do some testing to see if you need the full tree - ie. Home/Accessories, Home/Scenics/Accessories.
2. We can use ID. I have again not tested this yet as not had the need, but if we can use the ID, its fairly straightforward to setup a formula to pick the IDs. Currently for us, we use 5 category columns in our product import sheet. These are data validated against our Category sheet (in screenshot) to ensure they are valid. They are then Concatenated if they are not empty cells. So it would be very easy to just take the Category ID instead.
I am happy to share the formulas etc we use for this if anyone wants. I've tried to make it as simple as possible for the end user who is actually populating the product imports when new items are announced.
i would like this if you still using prestashop