We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 32396
    • 56 Posts
    Hello from Russia smiley and request for help

    I’m trying to make filter for Real Estate site. Something like here http://www.modx2.wangba.fr/index.php?id=267

    TV’s for filter:
    * category(<select> Дома(id10), Виллы(id11), Квартиры (id12)...) / House,Villa,Apartment,Land...
    * status(<select> Вторичная, Новостройка) / Used, New
    * price (<input> цена)
    * type (<radio> продажа, аренда) (Rent/Sale)

    Snippet call on result page:
    [!AjaxSearch? &ajaxSearch=`0` &tplInput=`realEstateInput` &parents=`10,11,12,13,14` &grabMax=`5` &showInputForm=`0` &debug=`2`!]
    


    Snippet call in site template, only form:
    [!AjaxSearch? &ajaxSearch=`0` &tplInput=`realEstateInput` &grabMax=`5` &parents=`10,11,12,13,14` &showResults=`0` &landingPage=`34` &debug=`2`!]
    


    Form template realEstateInput:
    [+as.showInputForm:is=`1`:then=`
    <form id="[+as.formId+]" action="[+as.formAction+]" method="post">
        <fieldset class="inputAS">[+as.showAsId:is=`1`:then=`<input type="hidden" name="[+as.asName+]" value="[+as.asId+]" />`+]
        <input type="hidden" name="asf" value="re" />
        <label>Тип недвижимости:<br />
        [[AsSelectTv? &name=`category` &tvName=`category` &tplName=`Catalog` &first=``]]
        </label>
        <br /><br />
        <label>Статус:<br />
        [[AsSelectTv? &name=`status` &tvName=`status` &tplName=`Catalog` &first=``]]
        </label>
        <br /><br />
        
        <input name="rent" value="" checked="checked" class="checkbox" type="radio"> Продажа <span class="space"></span> <input name="rent" value="" class="checkbox" type="radio"> Аренда
        <br /><br />
        
        <label>
            <input id="[+as.submitId+]" type="submit" name="sub" value="[+as.submitText+]" />
        </label>  
        </fieldset>
    </form>
    `+]
    


    The problem:
    1) The filter form doesn’t work. When I click search button, on result page no matter what a select I get all "items".
    2) Pagination link "next" has href="/search/?aso=0,5" and doesn’t waork.
    For testing I changed form method to GET, and typed in url: /search/?asf=re&category=Дома&status=Вторичная&rent=&sub=Найти!&aso=0,5 and on the page displayed the correct result (second page).

    error log:
    [15-Oct-10 03:57:46]  0.0011s  5.80Mb > AjaxSearch  - Php5.2.9-2 - MySql 5.0.51a-community-nt
    [15-Oct-10 03:57:46]  0.0018s  5.80Mb > displayConfig - Config before parameter checking : Array
    (
        [config] => 
        [debug] => 2
        [timeLimit] => 60
        [language] => russian-UTF8
        [ajaxSearch] => 0
        [advSearch] => oneword
        [asId] => 
        [whereSearch] => content|tv
        [sites] => 
        [subSearch] => 
        [category] => 
        [display] => unmixed
        [init] => none
        [withTvs] => 
        [order] => publishedon,pagetitle
        [rank] => 
        [maxWords] => 5
        [minChars] => 3
        [showInputForm] => 1
        [showIntro] => 1
        [grabMax] => 5
        [extract] => 1:content,description,introtext,tv_value
        [extractLength] => 200
        [extractEllips] => ...
        [extractSeparator] => <br />
        [formatDate] => d/m/y : H:i:s
        [highlightResult] => 1
        [pagingType] => 1
        [pageLinkSeparator] =>  | 
        [showPagingAlways] => 0
        [landingPage] => 34
        [showResults] => 0
        [parents] => 10,11,12,13,14
        [documents] => 
        [depth] => 10
        [hideMenu] => 2
        [hideLink] => 0
        [filter] => 
        [output] => 0
        [tplInput] => realEstateInput
        [tplResults] => @FILE:assets/snippets/ajaxSearch/templates/results.tpl.html
        [tplGrpResult] => @FILE:assets/snippets/ajaxSearch/templates/grpResult.tpl.html
        [tplResult] => @FILE:assets/snippets/ajaxSearch/templates/result.tpl.html
        [tplComment] => @FILE:assets/snippets/ajaxSearch/templates/comment.tpl.html
        [tplPaging0] => @FILE:assets/snippets/ajaxSearch/templates/paging0.tpl.html
        [tplPaging1] => @FILE:assets/snippets/ajaxSearch/templates/paging1.tpl.html
        [tplPaging2] => @FILE:assets/snippets/ajaxSearch/templates/paging2.tpl.html
        [stripInput] => defaultStripInput
        [stripOutput] => defaultStripOutput
        [breadcrumbs] => 
        [tvPhx] => 
        [clearDefault] => 0
        [jsClearDefault] => assets/snippets/ajaxSearch/js/clearDefault/clearDefault.js
        [mbstring] => 1
        [asLog] => 0:0:200
    )
    
    [15-Oct-10 03:57:46]  0.0021s  5.81Mb > getSearchString - searchString : 
    [15-Oct-10 03:57:46]  0.0022s  5.81Mb > getSearchString - advSearch : oneword
    [15-Oct-10 03:57:46]  0.0022s  5.81Mb > getEvents - subsearch : 
    [15-Oct-10 03:57:46]  0.0023s  5.81Mb > getEvents - asf : 
    [15-Oct-10 03:57:46]  0.0024s  5.81Mb > getEvents - offset : 0,0
    [15-Oct-10 03:57:46]  0.0025s  5.81Mb > getEvents - pgn : 
    [15-Oct-10 03:57:46]  0.0026s  5.81Mb > checkSearchString - searchString : 
    [15-Oct-10 03:57:46]  0.0027s  5.81Mb > checkSearchString - searchSubmitted : 
    [15-Oct-10 03:57:46]  0.0028s  5.81Mb > checkSearchString - asfSubmitted : 1
    [15-Oct-10 03:57:46]  0.0029s  5.81Mb > checkSearchString - checkString : 
    [15-Oct-10 03:57:46]  0.0030s  5.81Mb > checkSearchString - searchString used : 
    [15-Oct-10 03:57:46]  0.0031s  5.81Mb > displayInputForm - searchString : 
    [15-Oct-10 03:57:46]  0.0032s  5.81Mb > displayInputForm - searchString : 
    [15-Oct-10 03:57:46]  0.0093s  5.85Mb > pgCharset : UTF-8
    [15-Oct-10 03:57:46]  0.0094s  5.85Mb > getSiteList - siteList : Array
    (
        [0] => defsite
    )
    
    [15-Oct-10 03:57:46]  0.0095s  5.85Mb > getSubsiteList - subsiteList : Array
    (
        [0] => site_wide
    )
    
    [15-Oct-10 03:57:46]  0.0098s  5.85Mb > AjaxSearch - scfg : Array
    (
        [defsite] => Array
            (
                [site_wide] => Array
                    (
                        [docgrp] => 
                    )
    
            )
    
    )
    
    [15-Oct-10 03:57:46]  0.0099s  5.85Mb > AjaxSearch - group results : Array
    (
    )
    
    [15-Oct-10 03:57:46]  0.0100s  5.85Mb > AjaxSearch - group mixed results : Array
    (
    )
    
    [15-Oct-10 03:57:46]  0.0103s  5.85Mb > AjaxSearch - Elapsed Time : 0.0102s
    
    


    Please help ... huh
      Using: MODx Evo 1.0.6 / Revo 2.2.5