[ic] sorting problem

Ed LaFrance (New Media E.M.S.) ic_users at newmediaems.com
Sat Jul 17 10:40:42 EDT 2004


At 04:33 PM 7/16/2004, you wrote:

>I have a problem with sorting when I use the search interchange
>syntax to dig some datas from products database (eg from the main
>menu).
>
>The results page presents the results without any problem, i can
>expose all the datas: price, description, etc...
>
>Now I have the need of sorting the results by price, by available
>quantity and by discount (additional field that I've inserted in
>merchandising table).
>
>I've inserted a link and via cgi (in the url: "&price_sort=1")
>so I try to make 'coditional' sorting:
>
>[search-list]
>[sort products:price:rf]
>   [if cgi price_sort eq'1']
>     [sort products:price:rf]
>   [/if]
>[/search-list]
>
>
>on the browser appear several times: [sort products:price:rf], a
>numerber equal to the extracted items.
>
>Is possibile to make this type of sorting?
>
>Is better to "remake" the search adding or altering the search
>criteria putting sf=price and if so, how is possible?
>
>many thanks in advance!

I have not used it in a long time, but I believe the [sort] tag comes 
immediately after the [search-region] opener, i.e.

         [search-region]
         [if cg price_sort eq '1']
                 [sort products:price:rf]
         [/if]
         ...
         [search-list]


You will find with multi-page results that the scope of [sort] is limited 
to each page as opposed to the entirety of the search results. Performance 
is also slower. It is better to pre-sort within the search parameters 
themselves.

- Ed



===============================================================
New Media E.M.S.              Technology Solutions for Business
11630 Fair Oaks Blvd., #250   eCommerce | Consulting | Hosting
Fair Oaks, CA  95628          Ed.LaFrance at newmediaems.com
(916) 961-0446                http://www.newmediaems.com
(866) 519-4680 Toll-Free      (916) 961-0447 Fax
=============================================================== 



More information about the interchange-users mailing list