So, I already have a plugin (“Advanced Product Quantities”) installed that allows me to set minimum quantities for categories and products. However, what I’m trying to do is set a minimum quantity for an overall product/category rather than a minimum for each of its individual variations. To put this into context, I have a baked goods business where I sell bagels. A customer needs to order a minimum of 12 bagels. They can order however many bagels of each kind that they want (for ex: 4 poppy seed, 5 plain, 3 onion, etc.), so long as they order a minimum of 12 bagels total.
When I set a category minimum for the bagel category, it makes each product variation in the shopping cart increase its quantity to 12 to fulfill checkout, rather than recognize that they are all a type of bagel and therefore fulfill the overall bagel minimum of 12 bagels.
Does anyone have any ideas on how I can get this minimum quantity concept working for my situation?
Try out this code:
EDITED:
New EDITED