I want to do the following. I have a whole collection of products that will be sold in a special combo. I want to allow customers to choose several products within the collection to sell.
But within the sale, the customer can only buy a maximum of two items of a product. The customer can select all the products within the collection, but can only buy two for each selected product.
On click of add to cart make a ajax call and check Is same products is already in cart having quantity equals to 2, If yes then on return make button disable or change it’s message else leave default code to work as it is.
And again do same process without ajax so In case customer leave page and get back to it then he can find same condition and can’t add same product to cart.
MinMaxify is an easy-to-use, yet sophisticated app designed to streamline the implementation of restrictions on your cart ordering process. You can apply restrictions for an entire cart, specific products or groups of products.
With MinMaxify, it’s easy to define a minimum and maximum product and cart limits for your orders, from the simple to complex.
Limits can be set on:
The total dollar value in cart
Total number of items in cart
Number of individual items
Number of items for a specific product
Number of items within a group of products
Multiples of items in a product group (ie; 6 bottles in a case)
Limits based on customer tag such as wholesale
Total weight of items in the cart
By the way, if you have any trouble while doing your business on Shopify, I’d recommend you read these Shopify guide series.