Hello, I have successfully create the relationships between the users, orders, menuitems, orderitems collections.
When a user completes their order. the cart doesn’t clear off after the transaction or order is completed.
When user returns to make a new order, the order items of the last transaction are still in the cart.
Is there a way to clear this to make sure each time we are moving to a new order?
Your timely help will be greatly appreciated.
Hi @EatAfro ,
If you do action create for new order and order item is linked to new order, you should not see previous order item.
You can simulate this in database editor first, and see how the relationship works for new order and new order item linked to that new order.
I have created the relationships very well i presume.
I will share with your the relationship between the collections.
Users DB:
• Relationship to Order Items:
• An Order Item can only have one User. A User can have multiple Order Items.
• Relationship to an Order:
• An Order can only have one User. A User can have multiple Orders.
Menu Items DB:
• No set Relationship.
• When a user clicks the add to cart button, it creates an Order Item.
Order Items DB:
• Relationship to User:
• A User can have multiple Order Items. An Order Item belongs to one User
• Relationship to Order:
• An Order can have multiple Order Items. An Order Item belongs to one Order.
Orders DB:
• Relationship to User:
• A User can have multiple Orders. An Order belongs to one User.
• Relationship to Order Items:
An Order Item can only have one Order. An Order can have multiple Order Items.
Let me know if the relationship here for the collections seems off.
Hi @EatAfro ,
It would be difficult to examine based on this description.
Better if you can just share your cloneable app and make them very unconfidential for us to see.