Jump to content

Problems with Category::regenerateEntireNtree()


IgnacioSM

Recommended Posts

Hello,
 
I am trying to add categories, I am using the next code; but it doesn't regenerates the tree and my script doesn't finish
 
-------------------------------------------------------------
 
$cat = new Category();
 
$cat->id_shop_default = $idShopOnline;
$cat->id_parent = $idFatherCategoryOnline;
 
$cat->add();
 
Category::regenerateEntireNtree();
---------------------------------------------------------------
 
 
And if I use the next one, it regenerates the previous categories, not the last one. The script doesn't finish.
 
----------------------------------------------------------------
Category::regenerateEntireNtree();
 
$cat = new Category();
 
$cat->id_shop_default = $idShopOnline;
$cat->id_parent = $idFatherCategoryOnline;
 
$cat->add();
 
 
Any solution?

 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...