Hello everyone,
I need your help, as I don't know what to do to solve this problem. I'm new to development and I'm having a hard time. I've created a shopping application in which I have two collections. One is for products, called Items, and the other is called Selected Items, which contains the products added to the cart.
The problem I'm encountering is that when I press the button to add to the cart, it should check if the product already exists in the Selected Items collection, and if it does, it cannot be added again to that collection. Does anyone know how I can solve this?
Thanks in advance.