check for mixed recurring and non-recurring items in the cart
This commit is contained in:
parent
a6bd5d0b99
commit
e71946fb94
3 changed files with 39 additions and 3 deletions
|
|
@ -218,13 +218,13 @@ sub getOptions {
|
|||
|
||||
=head2 getMaxAllowedInCart ( )
|
||||
|
||||
Returns getQuantityAvailable(). Should be overriden by subclasses that have a specific value. Subclasses that are unique should return 1. Subclasses that have an inventory count should return the amount in inventory.
|
||||
Returns getQuantityAvailable() or 1 if isRecurring() return 1. Should be overriden by subclasses that have a specific value. Subclasses that are unique should return 1. Subclasses that have an inventory count should return the amount in inventory.
|
||||
|
||||
=cut
|
||||
|
||||
sub getMaxAllowedInCart {
|
||||
my $self = shift;
|
||||
return $self->getQuantityAvailable;
|
||||
return $self->isRecurring || $self->getQuantityAvailable;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue