Limit purchases to only a single collection?

New Member
2 0 0

Hello! I'm trying to find a way, either through an app or ideally through a simple addition of code, to prevent a customer from adding products from more than one collection to their cart. It must prevent the customer from adding an additional product to their cart if they already have a product in their cart from a different collection, and they must not be able to checkout. 

For example, I have Collection A and Collection B. A customer can add as many products as they want from Collection A. However, as soon as they try to add a product from Collection B - if they still have a product(s) from Collection A in their cart - they are prevented from doing so and receive a message as to why. If they were to remove all product from Collection A from their cart, they could then add product from Collection B.

I'm not a developer but have a basic knowledge of adding code/script. 

I will also note that my current review of apps that limit product totals etc do not offer this type of functionality. 

Any help or recommendations is GREATLY APPRECIATED.