Minimum order quantity by product?

Created on 7 October 2024, about 2 months ago

Is it possible to set the minimum order quantity by product rather than product variation type? I have a site that allows users to order personalised hoodies. They must order a minimum of 5, however the order of 5 can be a mix of sizes. If it is not possible with this module, do you know if there is an alternative module that will allow it.

Thanks

Feature request
Status

Active

Version

1.0

Component

Documentation

Created by

🇮🇪Ireland frankdesign

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • 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.

Production build 0.71.5 2024