Thanks Charlie , it now works great.
I added prod_listid tag to make it perfect when
there is a need to remove a cart item.
best of all . i have learn the way of adding new tag when
using GT-T from the sample code.
for my $product ( @{$session->param('CART')} ) {
$idx++;
$product->{prod_subtotal} = $product->{price} * $product->{quantity};
$product->{prod_listid} = $idx;
$vars->{total_price} += $product->{prod_subtotal};
push @{$vars->{cart_loop}}, $product;
}
so now it seems that i have a basic funcational script for cart function.
Thanks again Charlie for all the helps.
I added prod_listid tag to make it perfect when
there is a need to remove a cart item.
best of all . i have learn the way of adding new tag when
using GT-T from the sample code.
for my $product ( @{$session->param('CART')} ) {
$idx++;
$product->{prod_subtotal} = $product->{price} * $product->{quantity};
$product->{prod_listid} = $idx;
$vars->{total_price} += $product->{prod_subtotal};
push @{$vars->{cart_loop}}, $product;
}
so now it seems that i have a basic funcational script for cart function.
Thanks again Charlie for all the helps.