If a certain product is in the basket no other products can Add

FruitsAS
Visitor
3 0 0

Hi,

I have a little problem and i didn't know how i can fix it or wich app maybe can handle this problem. 

 

When a certain product is in the cart, I want to lock all other products from the shop, so that you can purchase this certain product only.

For example
Product A & B are normal products
Product C is this certain product

I want that all costumers can buy A&B and more but when there get product C in the basket there can only purchase product C without A or B, so its not possible to have C & A or C & B in the basket.

Replies 5 (5)

Julie
Shopify Staff
1109 106 368

Hi, @FruitsAS!

 

Julie, here from Shopify Support. 

 

Setting limits and rules based on specific products being added to the cart sounds like something that may be best handled with an app. We have a few different apps in our Shopify App Store that may be a good fit for you. I recommend checking out: 

 

  • Order Limits - Allows you to define minimum and maximum product and cart quantities for orders, also offering you the ability to create these rules based on specific products. 
  • OrderLogic - You can set limits on how few or how many of each product your customers can order. 
  • Limits - Offers the ability to set maximum and minimum requirements based on price, quantity, weight, and more.

 

These apps will allow you to set rules based on conditional logic, preventing customers from adding certain products to the cart if they purchase specific products or exceed a specific dollar amount. I suggest installing them and taking a look to see which one works best for you. The app developers also offer full support so if you have any questions about them, you can always reach out directly. Their contact information can usually be found on their app page, under the “Support” section.

 

What kind of products are you selling? I’d love to learn more about your business and why you’re looking to limit customers to only purchasing a specific product when it’s been added to their cart. 

 

Julie | Social Care @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

marcd
Excursionist
14 1 4

Hi, @FruitsAS!

Ever found the perfect solution?

We are trying to achieve the same. When ordering a product (pre-order), no other products are allowed to be added to the basket.

Curious to know what solution you found.

GaryVoff
Tourist
3 0 5

Is there a non app way to do this yet? I want to sell something now that wont be available to ship until next year. I do not want customers to be able to add anything else to the cart if this product is in it.

 

Thanks

BhavinDomadiya
Visitor
1 0 0

Hello @FruitsAS  @GaryVoff   @marcd   @Julie 

1]  Add & replace the code based on file comments.
2] Replace the product-form.js code with the new code ( Change the product id based on your product )

https://github.com/Bhavin-Domadiya/If-a-certain-product-is-in-the-cart-no-other-products-can-Add./tr...

FlirtyPineapple
Tourist
4 0 6

Hi there! Wondering if you ever found a non-coding, non-app solution to this?! I have a similar issue with one product and not wanting someone to be able to add more items to their cart with it!