twothirds Posted May 20, 2016 Share Posted May 20, 2016 Hi, I have to fix the categories on a prestashop which are displayed in a weird way. When I check the database, the nleft and nright of the categories which are displayed in a wrong way are set to what seems to be a random pair of number or all at 0. So I guessed the problem come from the N-Tree of those categories and wanted to rebuild it. The problem I have is that either I create, delete or modify a category, the N-Tree does not seem to be rebuilt. So I wanted to call the function used to rebuild the N-Tree via a script. i used: include('config/config.inc.php'); include('init.php'); try { Category::regenerateEntireNtree(); } catch (CategoryException $e) { echo $e->getMessage(); } But the problem is that it does not fix anything. The script seems to do nothing at all, given how much time it takes to be executed! What should I do ? Link to comment Share on other sites More sharing options...
twothirds Posted May 23, 2016 Author Share Posted May 23, 2016 Wow this forum is so alive, thank you Prestashop! Link to comment Share on other sites More sharing options...
musicmaster Posted May 24, 2016 Share Posted May 24, 2016 It looks like you don't understand this forum. It is a forum of Prestashop users. The developers of the source code are not on this forum. So the knowledge that we have of the source code is fragmental and restricted to areas that we happened to work on. I am a bit amazed that you came this far and didn't go one step further to place some debug code in regenerateEntireNtree() to see what actually is happening when you execute it. One possible explanation is that your shop is missing the category with id_category=0 that this function needs to start. Link to comment 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