How can I prevent a customer from adding a specific product to their shopping cart if they already have another specific product in their cart.

Products are member cards with different privileges. if one is already in their cart they should be blocked from adding another member card in it.

I searched on the forum but can't find any discussion discussions on this.