Applying Rule-based Advanced Product Quantity Settings
Adding A New Rule
1. Title:
Title: Set a title for the rule
2. Rule Priority
Order: Set the order of the rule
3. Advanced Quantity
- Quantity Type: Choose quantity type from four available options
- Default Quantity
- Minimum Quantity: Set the lowest allowable product quantity (Note: Minimum Quantity is mandatory for Maximum)
- Maximum Quantity: Set the highest allowable product quantity (Note: Maximum Quantity is mandatory for Minimum)
- Fixed Quantity
- Fixed Number: Set a specific fixed quantity
- Step Quantity
- Minimum Quantity: Specify the starting quantity
- Maximum Quantity: Specify the ending quantity
- Step Number: Specify the increment value
- Custom Quantities:
- Custom Quantities: Define your own specific quantity options
- Display as dropdown: A checkbox to display values in a select dropdown. If max is not set, 200 values in the dropdown will be displayed
4. Products Restrictions
1. Apply on All Products: A checkbox to set the rule for all or specific products
- ☑ Check: Apply rule to all products
- ☐ Uncheck: Apply rule to selected products
- Select Products: Choose products to which you want this rule to apply
- Select Categories: Choose categories to which you want this rule to apply
5. User Restrictions
Select user roles to which you want to apply the rule settings
- Administrator
- Editor
- Author
- Contributor
- Subscriber
- Customer
- Shop Manager
- Wholesale
- B2B
- Retailer
- Guest
Note: If no role is chosen, the rule will apply to all roles
Click “Publish” to apply the changes
Configuring General Settings and Cart Quantity
1. General Configurations
Navigate to WooCommerce > Settings > Advanced Product Quantity and click the “Configurations” tab. Within this section, you have the ability to enable decimal quantities and determine whether to display quantity fields on listing pages.
- Show/Hide Quantity Box: Mark this checkbox to show the quantity box on the listing pages. Leave it unchecked if you prefer not to display it.
- Enable/Disable Decimal Quantity: Enable to allow Customers to Order in Decimal Quantity. By default, WooCommerce uses integer quantities
Click “Save Changes” to apply the changes you have made.
2. Cart Quantities
a) Cart Quantities Configurations
- Minimum Quantity: Specify the minimum quantity of items that customers can place in cart
- Maximum Quantity: Determine the maximum quantity of items that customers can place in cart
- Multiple of No.: Enable to enforce that the cart quantity should be multiple of a specified number (note: you can enter negative values as well)
- Minimum Amount: Set the minimum total cart amount that customers must reach to initiate the checkout process
- Maximum Amount: Set the maximum total cart amount that customers are not allowed to exceed
b) Exclude Products and Categories
- Select Products: Select products to exclude from the cart limits
- Select Categories: Select categories to exclude from the cart limits
c) Cart Notices
In this section, you can customize the messages that customers receive based on the cart quantity and amount configurations. Filter hooks are provided for message overrides, allowing you to customize the notifications according to your store’s branding and tone.
- Minimum Quantity Message: Displayed when the entered quantity in the cart is below the set minimum, e.g., you can show that the minimum quantity required to proceed the cart is [min-cart-qty]. Add [add-cart-qty] more items in cart)
- Maximum Quantity Message: Shown if the entered quantity exceeds the set maximum, e.g., you can show that the total quantity of carts should not exceed [max-cart-qty] . Remove [rem-cart-qty] items from the cart to place an order)
- Multiple of No. Message: Appears when the cart quantity entered by a visitor isn’t a multiple of [cart-mul-num]; e.g., you can show that your cart quantity should be multiple of [cart-mul-num]. [cart-qty] quantity is not allowed)
- Minimum Amount Message: Displayed when the entered amount is below the set minimum, e.g., you can show that the minimum amount required to proceed with the cart is [min-cart-amnt]
- Maximum Amount Message: Displayed for amounts exceeding the set maximum, e.g., you can show that you are not allowed to place an order of more than [max-cart-amnt] amount
d) Select User Roles: Choose the user roles to which these cart quantity configurations should apply. You can select from the following options:
- Administrator
- Editor
- Author
- Contributor
- Subscriber
- Customer
- Shop Manager
- Wholesale
- B2B
- Retailer
- Guest
Click “Save Changes” when you are done
Enabling Product Level Quantity Restrictions
Apply WooCommerce product quantity settings universally to all customers or tailor them to specific user roles directly from the product level. For those settings, go to WooCommerce > Products > All Products. Identify the product you wish to adjust from your product list, and click on the “Edit” option.
Once in the product editing screen, locate and select the “Advanced Quantity” option. This is where you can fine-tune a variety of Advanced Product Quantity settings:
- Enable/Disable: Toggle this setting to activate or deactivate advanced quantity options for the selected product
- Quantity Type: Specify the Quantity type
- Default Quantity
- Fixed Quantity
- Step Quantity
- Custom Quantity
- Display as Dropdown: Choose whether to display quantity options as a dropdown menu
- Role Restriction: Set restrictions on which user roles can access and utilize these advanced quantity settings
Accessing All Advanced Product Quantity Rules
To access and manage all the rules you’ve created, go to WooCommerce > Product Quantity.
Here, you’ll find an organized grid displaying all the rules you have created. Click “Edit” to make changes to a rule. Click “Trash” to delete a rule you no longer need.
Screen Options
In the upper-right corner of the screen, you’ll find an option labeled “Screen Options.” Click it to configure the following settings:
1. Columns:
- Date: Activate this option to display dates in the grid
2. Pagination:
- Number of items per page: Specify how many items you want to see on each page (default is set to 20)
3. View Mode: Choose between two display modes:
- Compact View
- Extended View
Click “Apply” to save the settings