|
e-citizen
13 posts Location: n.a. |
26.02.2010 15:31main categories not shown in search dropdownlistHi
when i am on search section, the dropdown list is working for the subcategories (ex computers/tv/dvd)and they are shown, thats great but main categoris for ex(electronics) is not displayed . when you want to add a new ad in write ad section, there the categories and the subcateories are separated and shown and maincategory is highlighted.
Where do you change this?
//reards
|
|
|
|
cro24all
35 posts Location: Croatia |
27.02.2010 00:51Re: main categories not shown in search dropdownlistsometimes lack the magic word please if someone knows
Code------->
$database->setQuery("SELECT id, name FROM #__marketplace_categories WHERE published='1' AND has_entries>'0' ORDER BY sort_order");
$rows = $database->loadObjectList();
//upit na bazu za roditelj kategoriju
$database->setQuery("SELECT id, parent, name FROM #__marketplace_categories WHERE has_entries > 0 ORDER BY parent ASC, sort_order ASC");
$rows = $database->loadObjectList();
echo "";
echo "".JOO_FORM_ALL."";
//varijabla za upin na roditelj kategoriju
$OptGroup = 0; // Preset Optgroup
$afCounter=0;
foreach($rows as $row) {
//Roditelj kategorija
if ( $row->parent != 0 AND $row->parent != $OptGroup) {
// get container name
$database->setQuery("SELECT name FROM #__marketplace_categories WHERE id='".$row->parent."' AND published='1' LIMIT 1");
$container = $database->loadObjectList();
$container_name = $container[0]->name;
echo "";
}
//kraj kontenjer name
if ( $afCounter==0) {
echo "id."'>".$row->name;
}
else {
echo "id."'>".$row->name;
}
//Roditelj kategorija 2
if ( $row->parent != 0 AND $row->parent != $OptGroup) {
$OptGroup = $row->parent;
echo "";
}
//kraj kontenjer name
$afCounter++;
}
echo "";
code------>
|
|
|
|
e-citizen
13 posts Location: n.a. |
28.02.2010 06:17Re: main categories not shown in search dropdownlistHi
thanks for your replies 
in which file is this?
|
|
|
|
e-citizen
13 posts Location: n.a. |
28.02.2010 06:33Re: main categories not shown in search dropdownlistsearch.php ofcourse hehe...
|
|
|
|
sybn
9 posts Location: Turkey |
18.03.2010 02:00Re: main categories not shown in search dropdownlistWhere do I put or replace this code in search.php?
|
|
|