Coroico,
here’s the call
<p>[!AjaxSearch? &language=`english-utf8`&whereSearch=`products,stocks,providers` &documents=`1,2,3,4,5,6,7,8,9,10,11,12` &filter=`name,iphone,10|pvd_name,Nokia,10` &order=`name`&extract=`99:description` &config=`owntables-2` &searchWordList=`owntables-2WordList` &stripOutput=`saveHtml` &tplLayout=`@FILE:assets/snippets/ajaxSearch/templates/optionMultipleList/layout.tpl.html` &tplAjaxResult=`@FILE:assets/snippets/AjaxSearch/templates/owntables-2AjaxResult.tpl.html`!]</p><p><br></p>
It’s actually been awhile since I set this up, but I pretty much tried to follow the tute on your site to the letter.
I even recreated the data in my db..
Here’s the config file. I don’t think I changed anything.
<?php
function saveHtml($results){
// replace line Breaking by space
$results = stripLineBreaking($results);
// strip javascript tags
$results = stripJscripts($results);
return $results;
}
function owntablesWordList(){
$list = "GPS,phone,Nokia,HTC,i-mate,Palm,Iphone,Blackberry";
return $list;
}
function products(& $main,& $joined, $listIDs){
$main = array(
'tb_name' => "ext_products",
'tb_alias' => 'pdt',
'id' => 'id',
'searcheable' => array('name','image','description'),
'date' =>array(),
'filters' => array(),
'jfilters' => array()
);
$main['filters'][]= array(
'field' => 'available',
'oper' => '=',
'value' => '1'
);
$main['filters'][]= array(
'field' => 'id',
'oper' => 'in',
'value' => $listIDs
);
$joined = NULL;
}
function stocks(& $main,& $joined, $listIDs){
$main = NULL;
$joined = array(
'tb_name' => "ext_stocks",
'tb_alias' => 'stk',
'main' => 'id',
'join' => 'product',
'concat' => array('name'),
'concat_alias' => array('stk_name'),
'concat_separator' => ', ',
'filters' => array()
);
$joined['filters'][]= array(
'field' => 'nb',
'oper' => '>',
'value' => '0'
);
}
function providers(& $main,& $joined, $listIDs){
$main = NULL;
$joined = array(
'tb_name' => "ext_providers",
'tb_alias' => 'pvd',
'main' => 'provider',
'join' => 'id',
'concat' => array('name','web'),
'concat_alias' => array('pvd_name','pvd_web'),
'concat_separator' => ', ',
'filters' => array()
);
}
?>
OK, It’s late down here, time to sign off till the morning.