PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Help needed please with minimum order quantity

  1. Hi,

    A client wishes to sell wines via a website checkout form. They have a large wine selection but the minimum order is 6 bottles. This is fine if they require a single wine product (of 6 bottles of the same type), but a purchaser can also buy a mixed case (from the range of 10 wines ) totalling a minimum of 6 bottles and of variety and quantity of their choosing.
    Is there a way that l can set Gravity to a minimum order number within a quantity totals field? Lastly, if a customer wishes to purchase a magnum (or larger) then the min order of 6 goes out of the window as they then can purchase a minimum of 1.

    Thanks in advance,
    Colin

    Posted 12 years ago on Thursday March 29, 2012 | Permalink
  2. There is no built in way to do this. Gravity Forms does not currently have a built in feature that allows you to set minimums on the quantity that is ordered that also takes into account other Product Fields on the form.

    What you describe is possible, however it would have to be implemented as a customization using available API hooks.

    You would use the gform_validation hook to write custom validation that suits your clients needs. You would have to write code that checks the quantities that were entered by the user and if it does not meet the minimum amount it would trigger an error and display the form for the user to change their order.

    Writing custom validation would also allow you to take into account products that consist of multiple bottles (ex. purchasing a magnum) because it would give you complete control over the validation itself.

    There is a tutorial on how to use the gform_validation hook here:

    http://www.gravityhelp.com/documentation/page/Using_the_Gravity_Forms_%22gform_validation%22_Hook

    The example on that page is just an example of how to use the hook. You have a custom use case so you (or a developer you hire) would have to write the code necessary to implement the functionality you want.

    But Gravity Forms provides the hooks to make customizations like this possible.

    Posted 12 years ago on Monday April 2, 2012 | Permalink

This topic has been resolved and has been closed to new replies.