Can Not buy from Collection B until product from Collection A is in cart

I have a collection of products that I only want a customer to be able buy once they buy from another collection. Is there a script or edit I can make to my liquid files to do this?

Example: A customer wants to buy a product from Collection B, but first must buy (place in cart) a product from Collection A. If they remove the product from Collection A, then any product from Collection B, is then also removed.

Any help would be great!

I think that a possible approach is to use cart ajax API to check the cart. Detect the item in the cart and remove the unnecessary item

Hi @Steve_Holmquist ,

You can check out ConnectPOS if you are looking for a way to create a specific discount collection. With our POS solution, you can create a Discount Rule to apply to all your product with selected types such as “Buy X Get Y”, “same price”, and “percent of all or specific products”.

If you have any questions, we are more than ready to support you!