sub display_cart { my ($cgi, $session) = @_; # getting the cart's contents my $cart = $session->param("CART") || []; my $total_price = 0; my $RV = q~~; if ( $cart ) { for my $product ( @{$cart} ) { $total_price += $product->{price}; $RV = qq~ ~; }
TitlePrice
$product->{name} $product->{price}