I have one table that hold all products by users were added to cart I need to know how can I delete items in the cart table when a user clear its browser cookies just delete its items already added to the cart ! I used AnonymousID identifier for anonymous users and store AnonymousID value in the cookie when user click ( Add To Cart ) button then populate cart table in the database with AnonymousID (AID) column, but the problem is that when user clear its browser cookies AnonymousID property will change to a new value that already not exist in the cart table So records not matching to delete what is the best solution to do that.
here is cart table ID = cart ID, AID = Anonymous-ID, and Item ID