Thank you again, Zeroic. I opted for your second suggestion about adding a “status” field, and now, after a user clicks to generate an order, the items in the cart are updated to show “Completed” in the status field.
So far, this has helped me calculate the totals per product, but I still can’t get the table to correctly reflect the 3 columns. As you can see in the attached image, the table correctly shows columns 2 and 3, which are the units and revenue per product. However, column 1 should only say 1 item, for example, “Americano” or “Chocolate Ice Cream,” but it shows repeated items.
How could I solve this problem? I think the issue lies in how I’m calling the data rather than in the structure itself.
Thank you again.