I have lot of categories and subcategories, so in this case if i select parent category it should list all the subcategories. Just for testing i edited file
administrator/components/com_phocadownload/models/phocadownloadcats.php.
Added category parent id to the sql, resulting sql shows me all the subcategories if i run it through phpmyadmin but the actual page does not list any sub category, the list is empty. Here is the query
Code: Select all
SELECT a.*,l.title AS language_title,uc.name AS editor,ag.title AS access_level,c.title AS parentcat_title, c.id AS parentcat_id,cc.countid AS countid
FROM `wpgx9_phocadownload_categories` AS a
LEFT JOIN `wpgx9_languages` AS l ON l.lang_code = a.language
LEFT JOIN wpgx9_users AS uc ON uc.id=a.checked_out
LEFT JOIN wpgx9_viewlevels AS ag ON ag.id = a.access
LEFT JOIN wpgx9_phocadownload_categories AS c ON c.id = a.parent_id
LEFT JOIN (SELECT cc.parent_id, count(*) AS countid FROM wpgx9_phocadownload_categories AS cc GROUP BY cc.parent_id ) AS cc ON a.parent_id = cc.parent_id
WHERE (a.published IN (0, 1))
AND a.parent_id = 13 =====> this is the parent id with few subcategories
GROUP BY a.id
ORDER BY parentcat_title asc
Joomla 3 with latest build of phoca downloads.