Fix the form for the Product. It was returning variants with no quantity.

This commit is contained in:
Colin Kuskie 2009-07-03 16:19:26 +00:00
parent 1bcae0d3bc
commit df51a0d99f
3 changed files with 28 additions and 11 deletions

View file

@ -255,7 +255,8 @@ sub getAddToCartForm {
my $i18n = WebGUI::International->new($session, 'Asset_Product');
my %variants = ();
tie %variants, 'Tie::IxHash';
foreach my $collateral ( @{ $self->getAllCollateral('variantsJSON')} ) {
COLLATERAL: foreach my $collateral ( @{ $self->getAllCollateral('variantsJSON')} ) {
next COLLATERAL unless $collateral->{quantity} > 0;
$variants{$collateral->{variantId}} = join ", ", $collateral->{shortdesc}, sprintf('%.2f',$collateral->{price});
}
return