What would be the best way of saving and loading cart items?
Currently what I did is when the user adds a product, the product ID will be saved in the DB. Then on my cart page I am fetching all of the product ID to get the details of each product.
Or should I save all the details of the product that has been added to the cart?
I’m using MongoDB as my database, and I’m working on a mobile app.