[ic] Relational options question

Mike Heins mike at perusion.com
Thu Feb 16 08:53:14 EST 2006


Quoting Sandy Thomson (sandy at scotwebshops.com):
> Daniel Davenport wrote:
> >BTW, you don't have to mangle the core to add a new option type.  Just
> >create a new module in $IC_DIR/lib/Vend/Options, and refer to it in the
> >IC config/meta info.  Your module will need three subs--with specific
> >names--that price, display, and show an edit page for the options.  See
> >$IC_DIR/lib/Vend/Options/Simple.pm for an example.  Better yet, copy it,
> >comment out all the code in the subs, and refer back to it when you need
> >to know where to grab info from.  :)  But it sounds like matrix options
> >will do what you need done, and you won't have to muck around with perl
> >code.
> >  
> 
> Thanks for the insight and the lengthy replies guys, I couldn't find 
> much information about options in the documentation. We have a hacked 
> Simple.pm at the moment, just assumed I would have to change other parts 
> of the core to make this work.
> 
> I had a look at the code and can see the options for the 'variant' 
> table. If I can't get Matrix.pm to work for this use, at least it is 
> something close to start from.
> 

Remember, you should take your hacked Simple.pm and change
it to "Sandy.pm" (renaming Vend::Options::Simple strings
to Vend::Options::Sandy, of course). Then in catalog.cfg:

	OptionsEnable  option_type
	Options Sandy  enable  1

Now just put "Sandy" in the option_type field of products, and
away you go with your custom module.

-- 
Mike Heins
Perusion -- Expert Interchange Consulting    http://www.perusion.com/
phone +1.765.647.1295  tollfree 800-949-1889 <mike at perusion.com>

I don't want to get to the end of my life and find I have just
lived the length of it. I want to have lived the width of it as
well. -- Diane Ackerman


More information about the interchange-users mailing list