Defining Parent Category when Importing Categories

I was reading the documentation on importing categories but it is not clear how or where I can define a category's parent category.

Our client's needs requires several categories, each with several children (and subchildren) - so being able to define all of this in a single .csv would save time

The documentation says for the category ID:

"If provided, has to point to existing category. Category will be updated then with the provided data for CSV file.
If ID is empty (or 0), a new category will be created."

Does that mean if I provide an existing category ID, the import will create a child category under that ID?

Any help / clarification is greatly appreciated!


  • Hi,

    Basically if you want to import Categories and at the same time define their structure, you will need to do that by manipulating their "id" and "parent_id" columns.
    So for example you can specify id=1 for category "Parent 1" and then specify value "1" in parent_id column of the "Child 1A" category.
    What you need to pay attention is that when you assign id value to imported category the component will:
    a) Update existing category that uses given ID
    b) Create new category when there's no category assigned to given ID.
    So you need to be careful if you are importing categories to non-empty database.
Sign In or Register to comment.