[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] Accessing modifer value in perl
Ron Phipps [rphipps@reliant-solutions.com] wrote:
> From: Mike Heins
> > Quoting Ron Phipps (rphipps@reliant-solutions.com):
> > > 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.
> >
> The section of the docs I was referring to is here:
>
> http://www.icdevgroup.org/i/dev/docfly.html?mv_arg=icfaq07%2e04
>
> I'll add a note or perhaps I should make the changes in the new Wiki
> docs?
>
"Any attribute besides the above is a product option or modifier, and
can be displayed with [item-modifier attribute_name]."
That's pointing out that arbitrary hash keys are options or modifiers.
Although these can be (not "would need to be") be displayed using
[item-modifier], they are still directly accessible as keys in the
item's hash.
Feel free to modify the WIKI docs to clear up any confusion.
--
_/ _/ _/_/_/_/ _/ _/ _/_/_/ _/ _/
_/_/_/ _/_/ _/ _/ _/ _/_/ _/ K e v i n W a l s h
_/ _/ _/ _/ _/ _/ _/ _/_/ kevin@cursor.biz
_/ _/ _/_/_/_/ _/ _/_/_/ _/ _/