- Issue created by @frankdesign
- 🇮🇱Israel jsacksick
Hm... Did you actually try installing the module? The limit is set per product variation... Not per product variation type which wouldn't make sense?
- 🇮🇪Ireland frankdesign
Yes I have installed the module and sorry meant to say 'Product Variation', not 'Product Variation Type'.
I can set a min order qty of 5 for Hoodie Type A Size Small, and/or a min order qty of 5 for Hoodie Type A Size Medium, and/or a min order qty of 5 for Hoodie Type A Size Large, etc.... but I don't see a way to set a min order qty of 5 for Hoodie Type A regardless of size chosen. So, for example, a user may want to buy 3 x Hoodie Type A Size Small, plus 1 x Hoodie Type A Size Medium, plus 1 x Hoodie Type A Size Large - which is a total of 5 Hoodies Type A (which meets our min order qty).
Hope that helps you understand what I am trying to achieve.
Thanks
- 🇮🇱Israel jsacksick
Indeed the module doesn't support that... We'd need to define new traits that are targetting the commerce_product and not the commerce_product_variation entity type.
There would be a UX problem though as an end user wouldn't know which field to fill and wouldn't know what the behavior is going to be in case the limit is specified both at the product level or at the variation level...
Even in the code, we'd need to figure out if we should support both? Or maybe the minimum of the two values entered? Not a straightforward thing.
In any case, you can definitely copy what the module is doing by duplicating the trait and the availability checker into your own module.