[ic] Adding list of items to cart in perl code.

Tim Nelson interchange-users@interchange.redhat.com
Mon Apr 22 14:38:00 2002


----- Original Message -----
From: "Kevin Walsh" <kevin@cursor.biz>
To: <interchange-users@interchange.redhat.com>
Sent: Monday, April 22, 2002 12:18 PM
Subject: RE: [ic] Adding list of items to cart in perl code.


> >
> > I've checked through the list to find a simple example
> > of adding a list of items into the cart using perl...to no avail.
> >
> > Basically, I have a hash of item and qty that I want
> > dump into the cart and then show the basket.
> >
> > Any help would be appreciated.
> >
> How about something like this?
>
>     push @{$Carts->{main}},{
>         code => '00-0010',
>         quantity => 100,
>     };
>
> Or this:
>
>     my %myhash =(
>         code => '00-0010',
>         quantity => 100,
>     );
>     push @{$Carts->{main}},\%myhash;
>
> Of course, both of those will ignore whatever "SeparateItems"
> configuration you have specified.
>
> --
>    _/   _/  _/_/_/_/  _/    _/  _/_/_/  _/    _/
>   _/_/_/   _/_/      _/    _/    _/    _/_/  _/   K e v i n   W a l s h
>  _/ _/    _/          _/ _/     _/    _/  _/_/    kevin@cursor.biz
> _/   _/  _/_/_/_/      _/    _/_/_/  _/    _/
>
> _______________________________________________
> interchange-users mailing list
> interchange-users@interchange.redhat.com
> http://interchange.redhat.com/mailman/listinfo/interchange-users

Cool .... Kevin,
The only problem I see is that the AutoModifiers are not getting picked up
and put into the cart.  Is there a
way to pick them up and toss them into the hash/cart
also?
Thanks.