How can I validate a minimum order quantity?
The app integrates with the new Shopify checkout to validate an order directly on your Shopify store and prevent orders from being placed that do not meet your requirements.
Setup
The setup requires that you have the following settings enabled:
- Quantity Discount extension enabled
- Checkout extensibility enabled (available on all plans)
In the App > Settings > Checkout settings, enable quantity validation:
Important: the app requires additional permissions to add the validation to your store, simply close the app by navigating to another section in the Shopify Admin and then back to the App to update the additional permissions.
After updating the permissions, visit the Settings page and enable the setting again:
Minimum quantity
To configure the minimum order quantity for a product, you can set up an option of type Quantity discount. The app will automatically use the lowest configured quantity as the minimum quantity for the validation.
If you don't want to offer a discount for the lowest quantity, you can also leave the discount field at zero:
Initial quantity
If you want to preselect a quantity, you can configure the initial quantity in the Advanced tab of the option:
Validation
The validation of the quantity is executed during different phases of the checkout process.
Note: the validation is executed directly on the Shopify store and returned to the theme. How the error message is display is controlled by the theme and not by the app. If on your theme the error message is not showing, it might be that your theme does not correctly handle the error messages.
Add to cart
If the customer tries to add a lower quality than the configured minimum, the add to cart will fail with an error message:
Cart
If the customer tries to lower the quantity in the cart, the update will also fail with an error and the theme should show the error message in the cart:
Checkout
Finally, if the customer was able to reach the checkout directly with a lower quantity than allowed, the validation will run again and show an error message: