[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] Need help accessing variables via embeded perl in checkout.html....
- Subject: [ic] Need help accessing variables via embeded perl in checkout.html....
- From: interchange-users@icdevgroup.org (Scott Wares)
- Date: Fri Sep 6 22:55:02 2002
The only info returned seems to be a array reference to the cart and the
number of line items in the order. Could some one tell me what I'm doing
wrong?
Cat: Item: A_Cat: Cart:ARRAY(0x90c22d8) Ord_Lns:2 Shipping:0
[perl tables=products failure="Perl code error shipping calc failed<BR>"]
my $cart = $Carts->{main};
my $item;
my $shipping=0.00;
my $t_order_lines=@$cart;
foreach $item (@cart) {
my $category = tag_data('products', 'category', $item->{code});
my $x_items = $x_items . " " . $category;
if ($category =~ m/TV/){
$shiping=$shipping + 9.95;
}else{
$shiping=$shipping + 1.00;
}
}
$shipping_msg="Cat:$category Item:$item A_Cat:$x_items Cart:$cart
Ord_Lns:$t_order_lines Shipping:$shipping";
return $shipping_msg;
[/perl]