lozaria Posted July 5, 2011 Posted July 5, 2011 Hi,I'm working on a free app that should be able to add new categories.I'm investigating the ps_category table. I know that level_depth, nleft and nright fields are used for quicker building of the nested hierarchy structure of the Categories. However when adding new category with blank level_depth, nleft and nright it is still visible inside the Categories Block and inside BackOffice.My question is - are level_depth, nleft and nright in Category table required and used at all?Many thanks! Share this post Link to post Share on other sites More sharing options...
MahmutGulerce Posted July 7, 2011 Posted July 7, 2011 Hi;level_depth used in getCategories(..... $order = true ... ) for ordinating. So its important for a lot of modules/functions use it.nleft and nright is required too. Eg: its used in breadcrumb, navigation etc. But i advice thatyou can ınsert as blank/Null them while adding a new row. than execute Category::regenerateEntireNtree() This function Re-calculates the values of all branches of the nested tree for all categories. Than updates them less than a second.regards Share this post Link to post Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now