Fixed validation issue in Donation asset.

This commit is contained in:
Martin Kamerbeek 2009-03-18 15:47:17 +00:00
parent be145261e0
commit 1361ecb65a
2 changed files with 8 additions and 3 deletions

View file

@ -169,11 +169,15 @@ Accepts the information from the donation form and adds it to the cart.
=cut
sub www_donate {
my $self = shift;
if ($self->canView) {
my $self = shift;
my $price = $self->session->form->get("price") || $self->getPrice;
if ($self->canView && $price > 0) {
$self->{_hasAddedToCart} = 1;
my $price =
$self->addToCart({price => ($self->session->form->get("price") || $self->getPrice) });
}
return $self->www_view;
}