E
E
ecostmn2017-05-18 13:25:41
MODX
ecostmn, 2017-05-18 13:25:41

Fix search via AjaxSearch on evo?

Through the snippet AjaxSearch, filtering by projects was performed, we decided to implement an additional search through the site through a line with the results displayed on a separate page.
The search works correctly, but the filtering by projects stopped working The
question is how to fix it correctly so that the filtering works correctly. At the moment, it gives the following answer: "Search results for the site
You need at least 3 characters in the search query"
Please help. I will be very grateful.
Search by projects
Filter projects
By cost

< form name="search" action="rezultaty-poiska" method="post"> < p style="margin-top:10px;">от < input class="" type="text" name="min_price" id="min_price" value="123"> до < input class="" type="text" name="max_price" id="max_price" value=""></p>                                                                                
 <p>По площади</p>  <code>< div id="slider2"></div><p style="margin:10px 0;">от < input class="" type="text" name="min_s" id="min_s" > до < input class="" type="text" name="max_s" id="max_s" ></p>  < button class="but" type="submit" >Подобрать</button>   < /form></code>

Вывод результатов стр с id=120<code>[!Ditto?  &tpl=`miniCard` &extenders=`request` &parents=`0` &depth=`5`&filter=`` &diplsay=`all` &orderBy=`min_price ASC`!])</code>

Сам поиск в шапке 
вызов<code>[!AjaxSearch? &ajaxSearch=`0` &tpl=`Search_form` &showIntro=`0` &showResults=`0`&landingPage=`135` !]</code>
с выводом результатов с id=135
<code>[!AjaxSearch? &ajaxSearch=`0`&showInputForm=`0`&pagingType=`0`!])</code>
input.tpl с таким кодом
/ assets / snippets / ajaxSearch / templates / input.tpl.html
<code>[+as.showInputForm:is=`1`:then=`
<form  name="search" action="[~135~]" method="post" >
    [+as.showAsId:is=`1`:then=`<input type="hidden" name="[+as.asName+]" value="[+as.asId+]" />`+]
    <input type="hidden" name="advsearch" value="[+as.advSearch+]" />
    <input id="ajaxSearch_input" class="header__search form input[type="text"]" type="text" name="search" value="[+as.inputValue+]"[+as.inputOptions+] />
    [+as.liveSearch:is=`0`:then=`
        <input id="ajaxSearch_submit" class="header__search form input[type="submit"]" type="submit" name="sub" value="[+as.submitText+]" />
    `+]

`+]</code>

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question