30/09/2021 Franck Bugnet How to

How to link an orphan product to a category?

This technique makes it possible to repair all the orphan products of your PrestaShop at the same time (all products without default category)

Applicable to : Merlin Backoffice ™ and PrestaCategorie addons (tuto and screen shots made with PrestaCategories)


What is an orphan product?


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 :

Qu'est ce qu'un produit orphelin dans PrestaCatégories

Reminder of the usual method to move one or more products:


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.


Comment rattacher un produit orphelin dans une catégorie dans PrestaCatégories

The problem, this method only works for products with a well-defined default category. It does not focus on orphan products.


The solution for recovering orphaned 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"


Comment rattacher un produit orphelin dans une catégorie dans PrestaCatégories

It can be seen that the 2 orphan products have been classified in category 12:

Before repair:


Comment rattacher un produit orphelin dans une catégorie dans PrestaCatégories

After repair:


Comment rattacher un produit orphelin dans une catégorie dans PrestaCatégories

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.


Category's other articles Mass management of PrestaShop products

Settings
  • Login
    • £ GBP
    • $ USD
Menu