Login | Sign up | Toll-Free: 1-800-752-0455
 
 

Forum

 

2 posts by 2 authors in: Forums > Classic Products - Community Support Forum
Last Post: June 18, 2014

I am looking for a way to sort by two fields.  For example, I want to sort by Status (1 New, 2 Reduced,3  Active) so that all New listings are together, all Active are together etc.  Then within each of those I want it to sort by Price.

sort of like using sort_order=17,123,forward and then sort_order=5,123,reverse  where lfield17 is Status and it sorts by ascending numbers and then within that each Status it sorts via lfield5 (Price) in descending order.

Hi,

There isn't a built in way to sort by two fields but here is one way it could be done:

Embed search result queries using custom stripped down templates. So for example for New you would have
the New Listings heading then embed this search query:
/cgi-bin/listman/exec/search.cgi?search=1&perpage=10&sort_order=17%2C123%2Cforward&lfield17_keyword=1+New&search=++Search+Listings++

Within the search query you can control the sort options and you can add the custom template to the end:
http://www.interactivetools.com/docs/listingsmanager/doc_page20.html

Then repeat for Reduced:
/cgi-bin/listman/exec/search.cgi?search=1&perpage=10&sort_order=17%2C123%2Cforward&lfield17_keyword=2+Reduced&search=++Search+Listings++

And so on. If you think this method will work for you, reply to the support ticket you sent in with any questions you have so I can provide more details.
Thanks!

---------------------------------------------------
Cheers,
Damon Edis
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/