Delete listing after its sold

Hello everyone! i am relatively new to bubble so i am having a little trouble setting this up.

I am creating a marketplace with products that are inputed by users. I want a product to be deleted after its bought. How can I do this?
I am able to set up the condition to delete thing (current page product) after stripe payment recieved is (yes) but then it asks me to choose which item from my payment data base it should look for. First and Last item wont work because it has to be the current item the user is buying, and not the first or last item it bought.

To do this, personally I would add a field called isArchived to every product & on a successful payment, set the Current page/order Product’s isArchived value to true. Then, you would just make sure that you filter by “isArchived = false” when displaying products on the marketplace.

You could set up a scheduled workflow to daily, weekly, or monthly delete archived products or you could just store them indefinitely for user order history, analytics, etc.

I don’t fully understand this part;

but if you use the method I suggested, this wouldn’t be a problem. If I do understand this part correctly though, storing a unique product ID and then using that for the query could be a solution. Tough to say without knowing exactly how you’ve set things up.

Hope this helps, let me know if you have any questions & I’d be happy to help!

1 Like

thank you so much!
it worked!

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.