[ic] Advanced Sort Question

John Delaney interchange-users@icdevgroup.org
Tue Jan 21 06:40:01 2003


Two questions in two days, I think I'm starting to push my luck a little
now!!

Anyway. Here goes. 

I have a results page, from which I read in a variable called [cgi
name=browse_cat], where you can select to re-sort results (in a drop-down
list) by certain criteria such as "Price High-Low, Price Low-High..etc". You
get the idea. Very Amazon-esq.

What I'm hoping to do is have a second drop-down box that lists the
different manufactures together with the number of matches found. E.g.
Stellar (4), Le Creuset (15), All-Clad (19).

To be totally honest with you I have an idea of how it should work in my
mind, but implementing it is another matter all together!!! Has anyone done
anything like this before or come across it somewhere in the mailing lists.
All pointers in the right direction are much appreciated.

For those of you who are interested here is a copy of my first "sort-by"
drop down list.

<form action="[process]" method=post> 
		<input type=hidden name=mv_todo value=return>
		<input type=hidden name=mv_nextpage value=@@MV_PAGE@@>
		<select name=sort_field onChange="this.form.submit()">
		<b>Sort Results By</b>
		<option  value="" [selected name=sort_field value=""]>Sort
By:
		<option  value="Price Low to High" [selected name=sort_field
value="price"]> Price (low-high)
		<option  value="Price High to Low" [selected name=sort_field
value="price"]> Price (high-low)
		<option  value="Manufacturer A-Z" [selected name=sort_field
value="manufacturer"]> Manufacturer (a-z)
		<option  value="Manufacturer Z-A" [selected name=sort_field
value="manufacturer"]> Manufacturer (z-a)
		</select>
		<input type=submit value="GO!">
</form>

John D