0

i had this category structure:

root 1
- sub1
- sub2
root 2
root 3

now i accidentally drag and dropped "root 2" into "root 1":

root 1
- sub1
- sub2
- root 2
root 3

How can i undo this?
Drag and drop seems not to work. I also tried to change the db fields catalog_category_entity.parent_id to 1 and catalog_category_entity.level to 1 directly. No effect (cache was rebuilt).

0

The information for the categories is stored in the database table catalog_category_entity and you need to update the following three column to set an item as a root category:

  1. parent_id - this should be set to the id of the true root category, this true root normally have the columns level and parent_id set to 0,
  2. level - this should be set to 1 which is the first visible level in the admin section, this level contains all the root categories,
  3. path - this should be set to the following true_root_id/current_category_id

Normally I would tell you to stay away from changes being made directly in the database but in this case the admin interface will not allow you to drag a current category and make it a root category.

Please note that change the database directly is bad and you should always work locally first and make a back-up before hand

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.