Help ! Shopping Cart? How in the hell?

I having the hardest time trying to figure out how to add something to cart.

This is website like uber eats. A buyer can add food items from a restaurant to their shopping cart. However they can only purchase from 1 restaurant at a time. I’m stuck at “when add to cart” button. For my data type is “Cart item” Fields “buyer:user, fee:number, offering:offering, plate:plate, quantity:number, subtotal:number”. AI is confusing me. I add $2 to the subtotal as me fee like uber eats.

what am I doing wrong ?

What’s ur prompt to AI? Which model do u use?

Hey @dontesams,
The issue is probably that your workflow only searches by buyer and plate, so it doesn’t link each Cart Item to a specific restaurant or active cart session. That’s why the one-restaurant rule breaks.
The clean way is to create a “Cart” data type linked to both Buyer and Restaurant, and connect each Cart Item to that Cart. Then, when an item’s added, check if it matches the restaurant in the active cart, otherwise start a new one.
I’ve built similar delivery-style apps in Bubble and can help you structure this logic fast and efficiently if you’d like.

I just upgraded to Claude and its a HUGE difference ! It fix my cart issues