Published : 03/12/2017 12:47:58
Categories : Sitolog tips
Modules : PrestaCategories
Level : advanced
Any product has one and only one category by default.
Sometimes you can have one or more orphaned products, ie no default category defined or existing. This is a default that you can repair very easily thanks to PrestaCategories. Without this tool the only way is to go hack in the database.
In the example below, you have 2 orphaned products:
The one belonging to category 15 which is non-existent (see table of the existing source categories in the table at the top left of the screenshot) and that belonging to the category 0 that is to say which is not attached to any category :
The traditional method of selecting products:
1. To move them to another category by having selected in the target categories, the place where you want to put them here for example in category 12 "skirts"
2. Then clicking on the button "Move the selected products in ..."
This method does not work for orphaned products.
The problem, this method only works for products with a well-defined default category. It does not focus on orphan products.
There is a comprehensive solution that repairs all orphaned products at the same time:
To do this go into the side control panel,
1. Then in "Calculation Options and Scripts"
2. Click on the "Repair tree" tool: this opens the repair window of the tree and of the missing links. This window contains a set of tools that make it possible to repair things full. Here we see only one tool:
3. Make sure to uncheck everything (by clicking 1 or 2 times on All check / uncheck)
4. Then go to "repair orphan products"
5. Then click on "attach" them: by default it will link the orphaned products to the root of the shop.
6. But it is also possible to indicate the number of the category in which the products are to be attached, for example 12.
7. Click Repair and answer "Yes Continue"
It can be seen that the 2 orphan products have been classified in category 12:
As you may have guessed, this tree repair tool and missing links is capable of many other things, and especially to repair a completely broken tree. You will see this on other tutorials.
Next week we will see how to define the order of display of declinations in your product pages, thanks to PrestaPricing.