[SOLVED] Adv Search Query on Unpublish Categories

Multi-purpose Joomla template including ecommerce features and beautiful design
GK User
Tue May 05, 2009 1:14 am
Hi all

The following instructions will solve the problem with the Advanced Search filter on categories.
Despite the Category is set to unpublished, it would always display on the drop categories list on Advanced Search.

So, open the index.php file on template directory and find this line:

Code: Select all
$query = "SELECT `c`.`category_name` AS `name` , `c`.`category_id` AS `id` FROM `#__vm_category` AS `c` ORDER BY `c`.`category_id`;";

replace it with:

Code: Select all
$query = "SELECT `c`.`category_name` AS `name` , `c`.`category_id` AS `id` FROM `#__vm_category` AS `c` WHERE `c`.`category_publish` = 'Y' ORDER BY `c`.`category_id`;";

This fix will be added on next update version of this template.

Cheers ;)
User avatar
Platinum Boarder

Remember me
Register New Account
If you are old Gavick user, click HERE for steps to retrieve your account.