diff --git a/language/functions.xml b/language/functions.xml index 5a8df8d6dc42..05d9241520cf 100644 --- a/language/functions.xml +++ b/language/functions.xml @@ -1258,7 +1258,7 @@ class Cart public function add($product, $quantity) { - $this->products[$product] = $quantity; + $this->products[$product] = (isset($this->products[$product]) ? $this->products[$product] : 0) + $quantity; } public function getQuantity($product)