How to Set Product Samples Quantity Limit?
You can limit how many samples a customer can order with the Product Sample for WooCommerce plugin. The limit can apply to each sample product, or to the total number of samples in one order.
Set the global limit in Order Restrictions on the Manage Sample tab. You can also set a per-product maximum with Allow Max Quantity on the product’s Sample Product tab, and you can customize the message customers see when they reach the limit.
In The Article
How to set a quantity limit
Go to Dotstore Plugins > Product Sample and open the Manage Sample tab. Open the Order Restrictions section.
Option 1: Limit quantity per sample
This option limits the quantity of each individual sample product. For example, if you set the limit to 3, a customer can order up to 3 of each sample product.
- In Order Restrictions, set Maximum Quantity Type to Per Sample Quantity.
- Enter the limit in the Per Sample Quantity field.
- Edit the Maximum Quantity Message if you want a custom message. You can use the placeholders
{MAX_QTY}and{CART_QTY}. - Click Save Changes.
Option 2: Set a maximum quantity on the product
You can also set a maximum quantity for one product. This value overrides the global Per Sample Quantity setting for that product. For example, if the global per-sample limit is 3, but you set Allow Max Quantity to 4 on a product, that product follows the limit of 4.
- Add or edit a simple or variable product.
- Open the Sample Product tab.
- Enter the limit in Allow Max Quantity.
- Update the product.
Option 3: Limit quantity per order
This option limits the total number of sample products in a single order. For example, if you set the limit to 5, a customer can include up to 5 sample items in total.
- In Order Restrictions, set Maximum Quantity Type to Per Order Quantity.
- Enter the limit in the Per Order Quantity field.
- Edit the Maximum Quantity Message if you want a custom message. You can use
{MAX_QTY}and{CART_QTY}. - Click Save Changes.
Pro Tips
- Set a quantity limit before you start offering free or low-cost samples, so customers cannot add more than you are willing to fulfill.
- Use
{MAX_QTY}and{CART_QTY}in Maximum Quantity Message so the error shows the allowed limit and the quantity already in the cart. - Use Allow Max Quantity only for products that need a different limit than the global setting.
- Choose Per Sample Quantity when you want to cap each item, and Per Order Quantity when you want to cap the whole cart of samples.
Common Use Cases
Here are some popular ways to use quantity limits:
1. Allow only a few units of each sample
Set Maximum Quantity Type to Per Sample Quantity so a customer can try a product without ordering a large quantity of one sample.
2. Limit the total samples in one order
Set Maximum Quantity Type to Per Order Quantity when you want to restrict how many sample items can go out in a single shipment.
3. Give one product a different limit
Keep a global per-sample limit, then use Allow Max Quantity on a specific product that should allow a higher or lower amount.
FAQs
1. Where do I set the global sample quantity limit?
Go to Dotstore Plugins > Product Sample and open the Manage Sample tab and open Order Restrictions. Choose a Maximum Quantity Type, enter the quantity, and optionally edit the Maximum Quantity Message.
2. What is the difference between Per Sample Quantity and Per Order Quantity?
Per Sample Quantity limits how many units of each sample product a customer can order. Per Order Quantity limits the total number of sample items in one order.
3. Does Allow Max Quantity override the global limit?
Yes. The Allow Max Quantity value on a product’s Sample Product tab overrides the global Per Sample Quantity setting for that product.
4. Can I customize the error message?
Yes. Use the Maximum Quantity Message field. You can include the {MAX_QTY} and {CART_QTY} placeholders.