Multiple ways to do this. I have a LOT of customers who accidentally add two of a product to their cart and do not realize it. Then I end up having it returned and need to issue a refund. One option is to display a message next to the Add to Cart button, like "1 in your cart", or if they try to add the same item to their cart twice inform them to update the quantity while viewing the cart if they want more.