I'm writing a modification where I add products to the shoppingCart with add_cart function. However, in a case where there is already one product with the same id, the product is not added, but the amount remains 1.

Debugging the code it seems that add_cart calls update_quatity, which updates the quantity to 1.

Is the correct way to use add_cart when adding the new product really add_cart($products_id, $number_of_exising+1) ?

To me this is not logical and not in line with the comments in the source file...