Forums


Marketplace (en)

Forum for Marketplace, a Joomla! 1.0 classified ads component. Posts in english language.
Last post
Forums  » Marketplace (en)  » main categories not shown in search dropdownlist
e-citizen

e-citizen
13 posts
---
Location:
n.a.
26.02.2010 15:31

main categories not shown in search dropdownlist

Hi


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

cro24all
35 posts
---
Location:
Croatia
27.02.2010 00:51

Re: main categories not shown in search dropdownlist

sometimes 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

e-citizen
13 posts
---
Location:
n.a.
28.02.2010 06:17

Re: main categories not shown in search dropdownlist

Hi

thanks for your replies

in which file is this?




 
e-citizen

e-citizen
13 posts
---
Location:
n.a.
28.02.2010 06:33

Re: main categories not shown in search dropdownlist

search.php ofcourse hehe...



 
sybn

sybn
9 posts
---
Location:
Turkey
18.03.2010 02:00

Re: main categories not shown in search dropdownlist

Where do I put or replace this code in search.php?



 
Forums  » Marketplace (en)  » main categories not shown in search dropdownlist

Codingfish operates

italobikes.com
Community for friends of italian motorcycles

fuldany.de
Das soziale Netzwerk für Fulda (im Aufbau)

kiwinity.co.nz
The New Zealand Community (in preparation)

Login