[-] Installer : Fix country_to_timezone in last step
[+] BO : now AdminProducts and AdminCategories are separated from AdminCatalog [+] FO : new method Category::getAllChildren() (the return value is an array, but can evolve to a collection // Uses of Media:: in header.inc.php git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9097 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -652,6 +652,19 @@ class CategoryCore extends ObjectModel
|
||||
ORDER BY `position` ASC');
|
||||
}
|
||||
|
||||
/** return an array of all children of the current category
|
||||
*
|
||||
* @return array rows of table category
|
||||
* @todo return hydrateCollection
|
||||
*/
|
||||
public function getAllChildren()
|
||||
{
|
||||
return Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
|
||||
SELECT *
|
||||
FROM `'._DB_PREFIX_.'category`
|
||||
WHERE '. $this->nleft . ' < nleft AND nright < '. $this->nright);
|
||||
}
|
||||
|
||||
/**
|
||||
* This method allow to return children categories with the number of sub children selected for a product
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user