[ic] Accessing modifer value in perl

Mike Heins interchange-users@icdevgroup.org
Thu Dec 19 10:51:01 2002


Quoting Ron Phipps (rphipps@reliant-solutions.com):
> > From: Ron Phipps
> > 
> > Hello,
> > 
> > I'm trying to access the value of a modifier from within a perl sub.
> I
> > know that I can access the modifier like this in ITL:
> > 
> > [item-modifier modifiername]
> > 
> > How would I do the same from within a perl sub?  More importantly can
> I
> > do this from within a sub called from Common Adjust?
> > 
> > Thanks,
> > -Ron
> 
> Interestingly enough I can access all my modifiers like this:
> 
> $item->{modifiername}
> 
> This works even if the modifier is pulled from the options table.  The
> documentation mentioned that any attributes besides the ones mentioned
> (mv_ip, price_group, mv_ib, code, size, color, quantity) would need to
> be displayed using [item-modifier modifiername].
> 
> If all modifiers can be accessed using the $item hash without a call to
> item-modifier then I will add a note to the docs.

I don't know what part of the docs you are referring to, but $item is
always set to the value of the current item's hash reference. Any
modifier that is set would by definition be available, no matter how
it was set.

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

Be patient. God isn't finished with me yet.  -- unknown