[ic] Perl Cart Maniuplation
Erik Fantasia
interchange-users@icdevgroup.org
Mon Jul 22 07:58:03 2002
I'm at the moment doing various things on the basket page with some perl,
such as:
my $cart = $Carts->{main};
my $count = 0;
foreach $item (@cart) {
...
}
Now one of the things I would like to do is allow customers to forward order
items not currently in stock by including a separate line in the basket with
the quantity to be ordered. I've worked out that an identical line can be
added in the loop with:
splice (@{$Carts->{main}},$count,1,$item); # NB: $count++ precedes
However, then when i try to adjust any of the properties of this new nested
hash, ie:
$Carts->{main}[$count]{mv_ip} = $count;
The new hash remains unchanged from the original $items hashref!
Any clues?
Thanks,
/Erik
_________________________________________________________________
MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx