Here is what I\'m trying to do: - i need a function that when passed as an argument an ID (for a category of things) will provide all the subcategories and the sub-sub categ
Using Prestashop function :
public function getRecursiveChildren() {
$subCategories = $this->recurseLiteCategTree();
//print_r($subCategories);
$my_tab = array();
foreach ($subCategories['children'] as $subc) {
$my_tab[] = $subc['id'];
foreach ($subc['children'] as $subc2) {
$my_tab[] = $subc2['id'];
foreach ($subc2['children'] as $subc3) {
$my_tab[] = $subc3['id'];
foreach ($subc3['children'] as $subc4) {
$my_tab[] = $subc4['id'];
}
}
}
}
$my_tab [] = $this->id;
return $my_tab;
}
this can be ameliorated using recursivity but no time for that today :'(