Adding Restriction Based on Minimum & Maximum Ranges or Comma-Separated Quantities
To add restrictions based on minimum to maximum ranges or comma-separated quantities in the WooCommerce Cart & Order Restriction plugin, follow these steps:
Install and Activate the Plugin:
Make sure you have already installed and activated the WooCommerce Cart & Order Restriction plugin on your WordPress website.
Access the Plugin Settings:
Go to your WordPress dashboard and navigate to WooCommerce > Order Restriction.
Create or Edit a Restriction Rule:
To set up restrictions based on quantity ranges or comma-separated quantities, you can either create a new cart and order restriction rule by clicking “Add New Rule” or edit an existing rule.
Configure the Quantity Restriction
In the rule settings, you’ll find a section for “Restricting Orders Based on Quantity.”
Minimum Quantity:
Set the minimum product quantity required for the rule. For example, if you want to enforce a minimum purchase of 3 items of a specific product, enter “3” in the “Minimum Quantity” field.
Maximum Quantity:
Set the maximum product quantity allowed for the rule. If you want to limit customers to purchasing no more than 5 items of a specific product, enter “5” in the “Maximum Quantity” field.
Range Option:
Choose the “Range Option” that suits your requirements:
None: This option does not use quantity ranges; it enforces the minimum and maximum quantity restrictions as specified.
Comma Separated: If you select this option, you can enter a comma-separated list of quantities in the “Minimum Quantity” and “Maximum Quantity” fields. For example, you can enter “3,5,7” as the minimum quantities and “10,20,30” as the maximum quantities. This means that customers can purchase 3-10 items, 5-20 items, or 7-30 items within the specified ranges.
Save the Rule:
After configuring the quantity restrictions, click the “Save Changes” button to save the rule.
Test the Restriction:
To verify that the quantity restrictions are working as intended, add products to your cart and proceed to checkout, making sure that the quantities you enter fall within the specified ranges.
By following these steps, you can set up restrictions based on minimum to maximum ranges or comma-separated quantities using the WooCommerce Cart & Order Restriction plugin. This feature allows you to control the quantity of products that customers can purchase based on your specific business rules.