Back to PhocacartCategory class

Method getChildren

public static
getChildren
(mixed $id)

Method getChildren - Source code

public static function getChildren($id)
{
    $db = Factory::getDBO();
    $query = 'SELECT a.title, a.alias, a.id' . ' FROM #__phocacart_categories AS a' . ' WHERE a.parent_id = ' . (int) $id . ' ORDER BY a.ordering';
    $db->setQuery($query);
    $categories = $db->loadObjectList();
    return $categories;
}