Thanks for any help,
--------------------------------------------------
my $cart = $Carts->{main};
# loop through the cart items
foreach my $item (@$cart)
{
$price = $Tag->data(
{table => 'products',
field => 'price',
key => $item->{code},}
);
# add the quantity to the total number of items
$totalItems+= $item->{quantity};
# if sku starts with VT (video) or CD then it is an exception
if ( ( $item->{code} =~ /^VT/ ) || ( $item->{code} =~ /^CD/ ) )
{
# add the quantity of the video or cd to the exceptions
$exceptions+= $item->{quantity};
}
else # sub total without the video or cd costs
{
# add the price * quantity to the sub total
$subTot+= ($price * $item->{quantity});
}
}
---------------------------------------------------------------
Jim Boyer
Systems Programmer
Information Dept
College of Agriculture and Home Economics
Washington State University
_______________________________________________
interchange-users mailing list
suppressed
http://www.icdevgroup.org/mailman/listinfo/interchange-users
Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.