Coroico / AdvSearch

Dynamic content search add-on for MODx Revolution that supports results highlighting, faceted search and search in custom packages
21 stars 14 forks source link

I have 5 tables MIGX - what can I find. I can manual - but no working #52

Closed xxx1285 closed 10 years ago

xxx1285 commented 10 years ago

I have 5 tables - in MIGX - MODX REVO. What can i do, thets work - and searching to 5 tables. Seaching working - only to 'package' => 'shop'

<?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' => 'ShopContent.pagetitle ASC' );

$joined = array( array( 'tablePrefix' => 'shop_', 'package' => 'matras', 'packagePath' => '{core_path}components/matras/model/', 'class' => 'MatrasContent', 'fields' => 'pagetitle, id, alias, price, image', // displayed 'withFields' => 'pagetitle, id, alias, price', // where we do the search 'joinCriteria' => 'MatrasContent.pagetitle = ShopContent.pagetitle' ) );

// 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;

Please HELP.

xxx1285 commented 10 years ago

Not working

$main = array( 'tablePrefix' => 'shop_', //prefix for modx tables 'package' => 'shop','matras', 'packagePath' => '{core_path}components/shop/model/','{core_path}components/matras/model/', 'class' => 'ShopContent','MatrasContent', 'fields' => 'pagetitle, id, alias, price, image', // displayed 'withFields' => 'pagetitle, id, alias, price', // where we do the search 'sortby' => 'pagetitle ASC' );