Its no working.
main - work, joined - no work.
<?php
$main = array(
'tablePrefix' => 'shop_', //prefix for modx tables
'package' => 'shop',
'packagePath' => '{core_path}components/shop/model/',
'class' => 'ShopContent',
'fields' => 'pagetitle, id, alias, price, image', // displayed
'withFields' => 'pagetitle, id, alias, price', // where we do the search
'sortby' => 'pagetitle ASC'
);
$joined = array(
array(
'package' => 'matras',
'packagePath' => '{core_path}components/matras/model/',
'class' => 'MatrasContent',
'fields' => 'pagetitle', // displayed
'withFields' => 'pagetitle', // where we do the search
'joinCriteria' => 'ShopContent.id = MatrasContent.id'
)
);
// set the query hook declaration
$qhDeclaration = array(
'qhVersion' => '1.2', // version of queryHook - to manage futures changes
'main' => $main,
'joined' => $joined,
);
$hook->setQueryHook($qhDeclaration);
return true;
Как настроить Advsearch для поиска по 5 таблицам?