[ic] Re: adding extra information into the shopping cart structure

Jerry Brady interchange-users@icdevgroup.org
Thu Oct 10 10:39:01 2002


John Allman wrote:

>Ok - i'm getting places. i have the following in the page for 
>the quick 
>catalog order:
>
>[set altercart]
>[perl]
>        
>$Session->{carts}->{main}->[$Tag->nitems(main)-1]->{quickorder}=1;
>[/perl]
>[/set]
>
>and later:
><input type=hidden name=mv_check value=altercart>
>
>i found that if i put the code in mv_click it wasn't executed 
>before the 
>item was added to the cart - but this way seems to work. 
>[dump] reveals 
>the following in the  ##### ###### SESSION ##### bit:
>
>'carts' => { 'main' =>  [ { 'spprice' => undef, 'userdiscount' 
>=> undef, 
>'quickorder' => 1, 'mv_ip' => '0', 'code' => '0115163400', 'size' => 
>undef, 'mv_ib' => 'products', 'quantity' => 1, 'color' => undef } ] }
>
>so it looks like quickorder has been added and assigned the value 1. 
>good stuff so far.
>
>however i'm having difficulty getting it back out in the basket page. 
>[item-field quickorder] returns nothing. i added a line AutoModifier 
>quickorder into the catalog.cfg but that doesn't appear to improve 
>matters either...
>

John,

[item-field] is for pulling other attributes (columns) from the products
tables defined in your configuration as ProductFiles.  I would suggest
that you try to use:

[item-modifier quickorder] 

because that specifically is meant to return attributes when running
through hash lists.

To extract the value of your item, because what you are really trying to
do is add a modifier value to items that are ordered in your catalog.
You may have to add the directive:

UseModifier quickorder 

to your catalog.cfg.

Regards,
Jerry 
Blue Circle Technologies