How to Setup WooCommerce Quantity Discounts (2024 Guide)
The mobile coupon discount market alone is expected to hit a whopping 1.6 trillion by 2030. You can imagine what the total figure would look like when combined with desktop users.
Well, this is actually not surprising, as almost 100% of online shoppers look for digital discounts, spend 37% more when they find them and believe discounts are the best motivators to not abandon carts.
Therefore, implementing discount strategies is a game changer for any WooCommerce business like yours.
One of the most common discount types is WooCommerce quantity-based pricing.
Quantity-based discounts entice customers to add more items to the cart to save money, which leads to more sales and higher profit for you.
In this article, we will explore different ways to generate and offer WooCommerce discounts based on quantity.
Let’s start with what a WooCommerce quantity discount is in the first place.
What is a WooCommerce Quantity Discount?
In simple words, you offer discounts based on the total number of items a customer purchases or adds to a cart.
For example, you offer a 10% discount when customers add 3 items to the cart.
This is the simplest example. You can set different combinations to cater to customer types and needs. For example, you can apply different conditions to your WooCommerce quantity-based discount, such as quantity discounts for specific products/categories/attributes, etc.
There are 3 types of price based on quantity WooCommerce discounts that are most common.
Let us explain them with examples.
1. Fixed Amount Discount Based On Quantity WooCommerce:
Description: In this WooCommerce quantity discount type, you set a fixed amount of discount money for buying a specific quantity of products.
Example: Buy 3 t-shirts, get $10 off.
Advantages:
- Simple to understand for customers.
- Works well for encouraging larger purchases of low-cost items.
Disadvantages:
- May not incentivize larger purchases for expensive items.
- Can reduce profit margins significantly on high discounts.
2. Percentage WooCommerce Quantity Discount:
Description: You offer a percentage off the cart subtotal when customers add the required quantity of products in this discount type.
Example: Buy 2 or more laptops and get 15% off the total.
Advantages:
- More flexible and scales well with product price.
- Offers a higher perceived value for expensive items.
Disadvantages:
- Requires more calculation for customers compared to a fixed amount discount.
- Might not be as impactful for low-cost items.
3. Tiered Pricing (Discounted Price per Quantity Range):
Description: This type sets different price points based on the quantity purchased. Essentially, the price per unit decreases as the quantity increases. This is the most common practice of SaaS providers or hosting services. The higher tier you buy, the more you save.
Example: Buy 1 cap for $10, buy 2-4 caps for $8 each, buy 5+ caps for $7 each.
Advantages:
- Offers the most flexibility and control over pricing strategy.
- Clearly incentivizes larger purchases with progressively better deals.
Disadvantages:
- Requires more setup compared to other options.
- Might appear complex for customers if not presented clearly.
How to Setup WooCommerce Quantity Discount
There are 2 ways through which you can offer quantity discounts & pricing for WooCommerce.
- Using custom codes
- Using a WooCommerce quantity-based pricing plugin
We will start with the coding option.
Adding WooCommerce Quantity Discount with Custom Codes
To offer WooCommerce product quantity discount, you can use custom codes in combination with WooCommerce hooks. Before attempting this method, you must back up your files or use a child theme.
Here’s a step-by-step process to achieve this:
Access Your WordPress Admin Panel:
- Log in to your WooCommerce WordPress admin panel.
Edit the Theme’s Functions File:
- Navigate to Appearance > Theme File Editor.
- Select the functions.php (Theme Functions) file from the right-hand side.
Add Custom Code:
- Scroll down to the bottom and paste your code to create WooCommerce discount price per quantity and save your changes.
Custom code for WooCommerce discount per quantity
Here’s the code we used –
// Add a discount based on product quantity
function custom_quantity_based_discount() {
global $woocommerce;
// Initialize variables
$discount = 0;
$discount_threshold = 3; // Quantity threshold for discount
$discount_amount = 10; // Discount amount per applicable product
// Loop through the cart items
foreach ( $woocommerce->cart->get_cart() as $cart_item_key => $cart_item ) {
$quantity = $cart_item['quantity'];
// Check if quantity meets or exceeds the threshold
if ( $quantity >= $discount_threshold ) {
// Calculate discount
$discount += $discount_amount * floor($quantity / $discount_threshold);
}
}
// Apply discount if applicable
if ( $discount > 0 ) {
$woocommerce->cart->add_fee( 'Quantity Discount', -$discount );
}
}
add_action( 'woocommerce_cart_calculate_fees', 'custom_quantity_based_discount' );
Explanation of the Code:
- Initialize Variables: The $discount_threshold variable sets the minimum quantity required to trigger the discount. The $discount_amount variable sets the discount amount for each set of products that meets the threshold.
- Loop Through Cart Items: The code loops through each item in the cart to check the quantity.
- Check Quantity: If the quantity of an item meets or exceeds the threshold, the discount is calculated.
- Apply Discount: The calculated discount is applied to the cart as a negative fee, effectively reducing the total cart amount.
Test the WooCommerce quantity discount Code:
Let’s jump to the front end to test our code. Add 3 products or 3 quantities of any specific product in the cart.
As you can see, a WooCommerce discount for quantity is automatically applied when 3 items are added to the cart. The discount will apply to every 3 items added to the cart.
For example –
- If a customer buys 3 items: They get a $10 discount.
- If a customer buys 6 items: They get a $20 discount.
- If a customer buys 9 items: They get a $30 discount.
Custom Code for Percentage off WooCommerce Quantity Discount
Let’s say you want to add a 10% discount when someone adds 3 items to the cart.
Here’s the code for that –
// Apply a 10% discount if the cart contains at least 3 items
function apply_quantity_discount() {
global $woocommerce;
// Initialize the cart item count
$cart_item_count = 0;
// Loop through the cart items and count the total quantity
foreach ( $woocommerce->cart->get_cart() as $cart_item_key => $cart_item ) {
$cart_item_count += $cart_item['quantity'];
}
// Check if the cart contains at least 3 items
if ( $cart_item_count >= 3 ) {
// Calculate the discount (10% of the cart total)
$discount = $woocommerce->cart->subtotal * 0.10;
// Apply the discount
$woocommerce->cart->add_fee( 'Quantity Discount', -$discount );
}
}
add_action( 'woocommerce_cart_calculate_fees', 'apply_quantity_discount' );
Paste the above code in functions.php and update the file.
Now, if you go to your front end, you will see a 10% discount for every 3 items in the cart.
You can also create coupons and add codes to functions.php to auto-apply those discount codes to your customers.
We have a dedicated article on How to Automatically Apply Coupon in WooCommerce
Setup WooCommerce Quantity Discount Using a Plugin
We all know there are plugins for just about anything possible in WooCommerce. Given the significant impact discounts can have on online shops, it’s no surprise that numerous plugins are available to cater to your needs.
In the following segments, we walk you through setting a WooCommerce discount for quantity with a plugin.
The discount quantity WooCommerce plugin we will use is called Discount Rules for WooCommerce. The pro version of the plugin comes packed with a wide range of features to set up all kinds of discounts, be it conditional discounts, bundle discounts, or WooCommerce quantity discounts.
Plugin Walkthrough for WooCommerce quantity discount
After you install the plugin, go to WooCommerce >> Discount Rules and hit the Add New Rule button.
It will take you to the new discount rule generation window.
Let us introduce you to different sections of the discount setup window.
The first empty field is where you input the discount rule name. Other settings include a checkmark to enable the discount and settings for saving your changes.
The Discount Type dropdown allows you to select the primary type of discounts you want to create. For example, WooCommerce bulk discounts, BOGO, bundle discounts, etc.
Different panels will pop up based on the discount type you select. For instance, let’s select Cart Adjustment.
From the Filter tab, you can select assign discount on specific products, categories, SKUs, etc. You can also apply multiple filters.
The Discount tab is where you set the discount amount.
The Rules tab is what makes this plugin noteworthy. The plugin supports a wide range of conditions that allow you to create a wide array of discount types.
For example, you can offer a discount on cart subtotal, payment method, product combination, reward valued customers or first timers, or set discounts for specific dates, times, cities, countries, or user roles.
In the following sections, we will create several quantity-based discounts using this WooCommerce quantity discount plugin.
WooCommerce Quantity Discount Based on Fixed Number of Quantities in the Cart
Previously, we saw how to set up discounts based on quantity using codes. However, that was repetitive or recursive, which means it will repeat endlessly upon adding products (e.g., buy 3 get $10 discount, buy 6 get $20, and so on).
This time we want to offer a fixed discount for the targeted quantity. To achieve that, create a new rule and select Cart Adjustment from the discount type dropdown.
Set the filter to all products and input your discount value. For this example, we want to offer a $10 WooCommerce quantity discount when a customer adds a minimum of 5 items to the cart.
In the Rules tab, add a new condition and select Item Quantity from the condition type dropdown.
Select Greater than or equal and input your quantity, which in our case is 5.
Save your rule, and let’s check it from the front end. Add 5 or more products to the cart.
As you can see, the system applied a $10 discount to 5 or more products. If you double the product quantity, it will remain the same as we mentioned.
However, if you set a percentage discount instead of a fixed amount, the cart will calculate based on the overall cart subtotal.
If you refresh the previous cart, it will display a subtotal with 10% off.
Add more items and it will continue to cut off 10% from the subtotal.
WooCommerce Quantity Discount on Specific Products
Let’s say you want to offer 10% discounts on specific products. You will need to use the Filter tab this time.
Instead of all products, select Products from the dropdown and search and select the products.
Every other setting should be the same as the previous example. Save your rule and check from the front end.
As per our set rule, the discount will only be applied to selected products when the quantity is 5 or more. The discount will not be applied if you add other products and the quantity exceeds 5, as can be seen below.
The system will calculate the WooCommerce quantity discount only when the selected products have 5 or more units in the cart.
Similarly, you can create a WooCommerce quantity discount on specific categories, SKUs, attributes, etc.
Percentage Discount on Fixed Quantity Bundle
This type of WooCommerce quantity discount is also known as WooCommerce bundle discount. Remember what was our discount using the code?
10% discount per 3 items. It was recursive, meaning that for every 3 items customers add to the cart, the 10% discount will repeat.
To achieve this using the plugin, first, you need to select the Bundle (Set) Discount from the Discount Type dropdown.
From the Discount tab, set your quantity, discount value, and type. Check marking the Recursive box will create an endless loop, meaning the discount will apply to every 3 items added to the cart.
Now, if you add 3 products to the cart, the system will automatically cut 10% off of the regular price, and the calculation will repeat for every 3 items.
Now, if you want to stop the loop, uncheck the Recursive box. Let’s say you want to offer different discounts on different quantity ranges.
Here’s how you do it. Hit the Add Range button and input your new values.
The cart will now calculate based on the different WooCommerce quantity discounts you have set.
You can also assign fixed rates for your bundles.
Tiered / Bulk WooCommerce Quantity Discount
Select Bulk discount from the discount type dropdown.
This time, the Discount tab will allow you to set minimum and maximum quantity ranges that enable you to be more precise.
You can add different ranges that suit your discount strategy.
Fixed Tiered Pricing Discount on Specific Product
At the beginning of our article, we mentioned this example – Buy 1 cap for $10, buy 2-4 caps for $8 each, buy 5+ caps for $7 each.
Let’s create this WooCommerce quantity discount using the plugin. After you select the Bulk Discount, select your specific product from the Filter tab.
On the Discount tab, set your quantity and fixed price range. Make sure you select the Fixed Price for Item for the discount type.
Let’s add some caps to the cart now.
As you can see, when the quantity is between 2-4, the cart sets a $8 price for each item. Let’s add more than 5.
Working as per our set rule.
Product Combination Discount
This is the most common discount type regardless of the discount types. Whether you have a technology store, apparel store, or a skincare WooCommerce store, no matter what niche you are, your customers will always value product combination discounts.
In product combination WooCommerce quantity discount, you basically offer a discount when customers purchase some targeted products together. Here’s an example –
Customers will get a discount when they purchase a cleanser, toner, and moisturizer together.
- Regular Price:
- Cleanser: $25
- Toner: $20
- Moisturizer: $30
- Total: $75
- Bundle Discount Price: $65
For this article, the combination we will use is a 20% discount when a customer buys a cap, belt, and T-shirt together. Select Bundle Set and select the products from the filter tab.
From the Discount tab, set your discount value. You can choose recursive if you want to endlessly offer this for increased quantities.
In the Rules tab, add the Product Combination condition.
Make sure you select Combine from the combination type field. Search and add your products again and input their minimum required quantity.
Try this rule from your front end.
It will only work on the selected products as per your set rule.
These are just a few examples of quantity discounts you can create using the plugin. If you keep experimenting with various settings, you can establish a wide range of WooCommerce quantity discount rules tailored to your specific needs.
Why Offer WooCommerce Quantity Discount?
WooCommerce quantity discounts offer a powerful tool for boosting sales and revenue in your online store. Here’s a deeper dive into the key benefits they provide:
Increased Average Order Value (AOV)
This is the sweet spot. By offering discounts for larger purchases, customers are incentivized to add more items to their cart which leads to spending more per order. This translates directly to increased revenue for your store.
Improved Inventory Management
WooCommerce quantity discount can be strategically used to manage inventory levels. Here are a couple of approaches:
- Clearance Sales: For overstocked items, quantity discounts can encourage customers to buy more. This will help you clear out excess inventory and free up storage space for new products.
- Pre-Orders and New Products: Offer quantity discounts for pre-orders of new products. This can not only generate early sales but also gauge customer demand for the upcoming product.
Enhanced Customer Loyalty
Quantity discounts can reward your loyal customers. By offering them better deals for buying in bulk, you create a sense of value and appreciation, potentially increasing customer loyalty and repeat business.
Competitive Advantage
In a crowded online marketplace, quantity discounts can help you stand out from the competition. By offering attractive bulk discounts, you can attract price-conscious customers and increase your market share.
Marketing and Promotions
Quantity discounts can be a powerful marketing tool. Promote them on product pages, banners, and email campaigns to generate excitement and encourage customers to take advantage of the deals.
Improved Cash Flow
By encouraging larger upfront purchases, quantity discounts can lead to a more consistent cash flow for your business. This can improve your financial stability and ability to invest in other areas of your store.
Flexibility and Scalability
WooCommerce offers various ways to implement quantity discounts. This allows you to tailor them to your specific needs and product types.
You can set fixed discounts, percentages, or tiered pricing structures, which give you complete control over your pricing strategy.
Data-Driven Decisions
By tracking the performance of your quantity discounts, you can gain valuable insights into customer behavior and buying patterns. This data can then be used to refine your discount strategies and maximize their effectiveness.
Wrap up
A WooCommerce quantity discount is a versatile and effective way to boost sales, manage inventory, and build customer loyalty in your online store. We hope this article will help you create quantity-based discounts efficiently and increase your conversions.