Skip to content

Commit

Permalink
[Ecommerce] Do not allow negative amounts in cart
Browse files Browse the repository at this point in the history
  • Loading branch information
brusch committed Jul 27, 2021
1 parent 6a75ea6 commit f515953
Showing 1 changed file with 4 additions and 0 deletions.
Expand Up @@ -78,6 +78,10 @@ public function __construct()

public function setCount($count, bool $fireModified = true)
{
if($count < 0) {
$count = 0;
}

if ($this->count != $count && $this->getCart() && !$this->isLoading && $fireModified) {
$this->getCart()->modified();
}
Expand Down

0 comments on commit f515953

Please sign in to comment.