[ic] Sorting Options

Mike Heins interchange-users@icdevgroup.org
Wed Jul 3 11:26:01 2002


Quoting Mike Heins (mike@valuemedia.com):
> Quoting Cameron (lists@cameroncorda.com):
> > Kevin Walsh wrote:
> > 
> > >>What do I need to add to make the options sorted by their sort field?
> > >>
> > >>    
> > >>
> > >You need "tf=sort" in your original search parameter list.  The "tf"
> > >parameter specifies the column(s) by which the search results should
> > >be sorted.
> > >
> > >For more information, see the "The Search Engine" section of the
> > >"Interchange Database" manual.
> > >
> > >  
> > >
> > I already have a tf in the original search, that sorts the search so 
> > that the products form in the right way.  I'm talking about the options 
> > table.  If I want a product to list the options in the order color, then 
> > size, then price, what do I do?  Currently I have the values 01, 02, and 
> > 03 for the options in the order I want.  The problem is that sometimes 
> > options will get listed in different orders, e.g. size, then color, then 
> > price.
> 
> That is actually a deficiency in the code. Matrix options sort by the
> o_sort field (or whatever MV_OPTION_TABLE_MAP defines that to be). That
> should also be done for simple options if the field is present, I think.
> 
> Certainly it should be done with an option.
> 
> I will put this in the todo list.

I have this in the DEVEL branch of CVS -- you can pass a sort=1 to
get them sorted. I don't know whether I will put it in stable...
probably so but I have to think about it.

-- 
Mike Heins
Perusion -- Expert Interchange Consulting    http://www.perusion.com/
phone +1.513.523.7621      <mike@perusion.com>

Fast, reliable, cheap.  Pick two and we'll talk.  -- unknown