0

How can i arrange the sort order for subcategories from the database. I noticed that catalog_category_entity table has position column. Can i change the order from there ?

2

absolutley you can, pay attention to the path element, this corresponds to the category id and the 1/64/2467 (example) would correspond to you category tree, with 1 being your root category, just update the position value to see (i have done this quite recently) then do the usual clear caches reindex to reflect on the front end. see below, here the three level 3 categories (id 74,75,76) are ordered so 75 is 1st, 74 is 2nd and 76 is 3rd

enter image description here

2
  • Thanks, but which column i have to update ? The path or postion ? Or you mean that i can reference to path column for the specific category that i want to sort.. ?
    – Djroko
    Aug 18 '16 at 6:39
  • update the position value mate, the path is the category ids of the category tree, eg if path 1 is your root category id (you can see category id when you look at the category in the admin console, its the number up the top) and you have 2 sub categories with ID, 2 and 3 you will see 2 entries in the catalog_category_entity table, with path values of 1/2 and 1/3 respectively if you set the position of 1/2 to 1 and 1/3 to 2 then 1/2 is above the other, if you set 1/3 to 1 and 1/2 to 2 then 1/3 will be higher in the category tree... clear as mud?
    – endozs
    Aug 18 '16 at 6:43

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.