Forum Academy Marketplace Showcase Pricing Features

Deleting Store Item from Database without deleting Cart item


I have tried to create an InstaCart Clone. Every Store has a list of Store Items and when user adds those to cart a Cart Item is created.

I am facing problem with deleting Store Items. When Store Item is deleted from Database, all Cart Items are also deleted with it which relate to previously fulfilled orders.

How can a Store Item be Deleted from Database without affecting/deleting previously created Cart Items.

Kindly guide

1 Like

Don’t use ‘Delete a thing’. Instead use ‘Make changes to a thing’ and change a Cart and alter the field items by putting ‘items remove [store item to remove]’

Thank you William. I will try that