Gossamer Forum
Home : General : Databases and SQL :

Re: [courierb] insert hash into db

Quote Reply
Re: [courierb] insert hash into db In reply to
 here it is the code i used it before when i use the way of cgi::session::file



my @partofcookie= @{$session->param('CART')}; ### have to defined here or produce error:undefined value as an ARRAY reference
foreach my $product ( @partofcookie ) { ####tested ok sss

$product->{prod_subtotal} = $product->{price} * $product->{quantity};
$tags->{total_price} += $product->{prod_subtotal};
$tags->{itemmaxtemp}=$itemmaxtemp;
$tags->{itemID}=$itemID;
push @{$tags->{cart_loop}}, $product;
}

print $IN->header();
print Links::SiteHTML::display('8gtcart', $tags);
exit;
}


then it will print the correct cart content and total price.
Subject Author Views Date
Thread insert hash into db courierb 14957 Jul 22, 2009, 2:01 AM
Thread Re: [courierb] insert hash into db
courierb 14797 Jul 22, 2009, 2:51 AM
Thread Re: [courierb] insert hash into db
Andy 14761 Jul 22, 2009, 3:32 AM
Thread Re: [Andy] insert hash into db
courierb 14844 Jul 22, 2009, 4:41 AM
Thread Re: [courierb] insert hash into db
Andy 14750 Jul 22, 2009, 4:44 AM
Thread Re: [Andy] insert hash into db
courierb 14788 Jul 22, 2009, 5:27 AM
Post Re: [courierb] insert hash into db
Andy 14755 Jul 22, 2009, 5:31 AM
Thread Re: [courierb] insert hash into db
courierb 14751 Jul 22, 2009, 5:33 AM
Thread Re: [courierb] insert hash into db
courierb 14741 Jul 22, 2009, 5:36 AM
Thread Re: [courierb] insert hash into db
courierb 14731 Jul 22, 2009, 5:38 AM
Post Re: [courierb] insert hash into db
courierb 14701 Jul 22, 2009, 5:41 AM