[ic] Single widget matrix options

Mike Heins interchange-users@icdevgroup.org
Mon Apr 14 11:12:00 2003


Quoting Jamie Neil (jamie@versado.net):
> > -----Original Message-----
> > From: interchange-users-admin@icdevgroup.org
> > [mailto:interchange-users-admin@icdevgroup.org]On Behalf Of Mike Heins
> > Sent: 14 April 2003 14:54
> > To: interchange-users@icdevgroup.org
> > Subject: Re: [ic] Single widget matrix options
> >
> >
> > Quoting Jamie Neil (jamie@versado.net):
> > > I am trying to use matrix options with a single widget selector
> > rather than
> > > separate wigdets as my products do not come in a full set of
> > combinations
> > > e.g. Big and Red, Small and Blue, Big and Blue but not Small
> > and Red. But
> > > when I try to use the [item-options] tag, I get no output at all.
> > >
> > > Change to separate widgets and it works fine, but that allows
> > someone to try
> > > to buy invalid option combinations (e.g. Small Red things).
> > >
> > > Am I misunderstanding the tag/options or is this a bug?
> > >
> > > I am using the 4.9.7-200304010658 snapshot.
> >
> > It works for me. But the question is, are you using "Old48" options
> > or the new Matrix ones? I suspect you are on Old48, and you can tell
> > by the "Change option" page. If you see a choice of Simple, Matrix
> > separate widget, Matrix single widget, and Modular, then you are
> > on Old48-style options.
> 
> I appear to be using the newer options (I see a choice of None, Simple,
> Matrix or Old Interchange 4.8 Options).
> 
> >
> > I guess I don't know quite what I did with that code. I think it
> > should resolve it OK if you set the o_matrix field in the options
> > master record to 2, but looking at the code try this:
> >
> > 	[item-options display_type=single]
> >
> 
> I've had a dig around in Matrix.pm and switched the debugging options on,
> and it seems that when the single widget option is set, the database SELECT
> fails because of the default sort fields that are built into the code:
> 
> /tmp/icdebug
> ------------
> Vend::Options::Matrix:debug: tag_options matrix query: SELECT
> code,description,price FROM variants where sku = '00013' AND code like
> '00013-%' ORDER BY o_sort,o_group
> Vend::Options::Matrix:debug: tag_options matrix ary: []
> 
> Here's the relevent code sections:

Aha. Yes, this bug was fixed a couple of days ago. You can update or
add to catalog.cfg:

	Options Matrix sort ""

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

Being against torture ought to be sort of a bipartisan thing.
-- Karl Lehenbauer