Hi people.
I still can't get it working on a multilanguage website with babel.
Modx 2.2.10-pl , advsearch 1.0.1-pl.
-mbstring is enabled
-zend libraries are installed
-GetIds is installed
-web context is empty, i use rucnt,encnt contexts for ru and en languages. every context have some containers with items i need to do a search between. Not a single container per context but 3 containers in every context 7,8,9 for rucnt , 33,38,39 in encnt.
-i am trying to search according just one TV - bedrooms just for get it working
these are the snippet calls and chunk
[[!AdvSearch
&queryHook=`FilterHook`
&ids=`[[!GetIds? &ids=`c7,c8,c9,c33,c38,c39`]]`
&contexts=`encnt`
&queryHook=`FilterHook`
&includeTVs=`district,price,distance,bedrooms,market,squaremeters,object_id`
&withTVs=`bedrooms`
]]
[[!AdvSearchForm? &landing=`75` &method=`GET` &help=`0` &tpl=`AdvancedSearchForm`]]
FilterHook:
<?php
$andConditions = array(
'tv.bedrooms:=' => 'bedrooms:request:all'
);
$qhDeclaration = array(
‘qhVersion’ => ‘1.2’,
'andConditions' => $andConditions
);
$hook->setQueryHook($qhDeclaration);
return true;
AdvancedSearchForm chunk
<form class="advsea-search-form" id="advancedsearchform" action="[[~[[+landing]]]]" method="[[+method]]">
<input type="hidden" name="id" value="[[+landing]]" />
<input type="hidden" name="asId" value="[[+asId]]" />
<label>Bedrooms
<select name="bedrooms">
<option value="all" selected="selected"></option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select></label>
<input type="submit" name="sub" value="[[%advsearch.search? &namespace=`advsearch` &topic=`default`]]" />
<!-- <input type="submit" id="findbutton" name="findbutton" value="Search"> -->
</form>
[[+resultsWindow]]
It outputs nothing. No matter how i try. With/without &contects, with/without &ids options.
But when i place some items inside an empty 'web' contexts and clear all the snippet options (just use [[!AdvSearch]] and [[!AdvSearchForm]] ). It shows these objects, but without filtering. Just outputs all the objects i placen inside a web context. That's because snippet caals doesn't contain &queryHook option. Whenever i try to use any options on snippet calls, it starts output nothing.
And i cant understand why we should use &ids option. As it mentioned in documentation - it allows to eclude documents from being searchrd. I don't need to exlude any document from search results. Should i list documents from opposite context here and do not list current context documents?
And, for the future use, where i should place the landing page? Should i create an independent landing page for every context?
PS: I saw this example (
http://www.revo.wangba.fr/multi-languages.html). It didn't lead me anywhere. Its mainly about how to traslate the Form. And i need just to get thinks working at first.