Removing items in a cart after a purchase

Hello bubblers,

I have a shopping cart functionality within my app and everything is working, but I can’t figure out how to remove those items after the purchase has been made. I have tried to clear the list but that didn’t work. I would like to know the most efficient way to do this. DB structure includes Cart, Line Item, and product.

A product is added to a line item and the line items are a part of the cart. When a user has made purchase, the items have to be removed. And I haven’t figured it out.

thanks in advance

your cart display should be in a group of some kind…you could try to reset the data of that group after purchase…but I think ultimately a bit more detail of your set up, including D.B. structure, workflows etc. could help to get a more direct answer to your issue.

It kind of seems like you have a D.B. with a cart as a data type which your shopping cart on page is set to…which would mean it is using that data type as it’s data source, which would not change after purchase is made…although that would be easy enough to change in a conditional

Not sure I understand correctly your situation, but here is my take, when a customer made purchase, you make changes to the Cart, then based on the previous workflow, you delete multiple list of things (Line Item).

I am curious about stock count of the Product. Do you deduct the count? Do your customer able to make purchase of multiple Product? Because I am having trouble to deduct multiple Product stock count once customer made purchase. Let me know how do you it.