[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[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
_/ _/ _/_/_/_/ _/ _/_/_/ _/ _/