Setup guide · 5 minutes

Setting up Demfilz Quantity Discounts

Create a rule, enter your tiers, and every product it covers gets a pricing table and discounted cart prices straight away. This guide covers the rule options, how tiers and counting work, per-product tiers, the settings, and what to check when a discount does not appear.

1. Install and activate

Upload demfilz-quantity-discounts-for-woocommerce.zip under Plugins → Add New → Upload Plugin and activate it. WooCommerce must be installed and active (WooCommerce 8.0 or later, WordPress 6.2 or later, PHP 7.4 or later). Nothing changes on the store until you create a rule or give a product its own tiers, and your product prices are never rewritten: discounts are worked out in the cart.

2. Create a rule

Open WooCommerce → Quantity Discounts and click Add rule. A new rule shows example tiers (5 at 10% off, 10 at 15% off) as greyed-out placeholders; type your own quantities and amounts.

FieldWhat it does
NameFor your reference in the rule list. Customers see the discount itself, not the name.
StatusUntick to keep the rule without applying it. Rules can also be enabled, disabled and duplicated from the list.
Applies toAll products, products in chosen categories (subcategories are included), or chosen products. Choosing a variation covers only that variation; choosing a variable product covers all of its variations.
Leave out productsProducts or variations the rule never discounts, whatever else it covers.
Discount typePercentage off each item, Amount off each item in your store currency, or Fixed price per item.
TiersEach row is a starting quantity and an amount. Add up to 20; empty rows are ignored and the rows are sorted for you.
Count quantityPer product, per cart line, or mix and match (see section 3).
Customer rolesLeave all unticked for everyone. Tick roles (for example a wholesale role) and, if you like, Guests for visitors who are not signed in.
ScheduleOptional start and end dates, both included, in the site time zone. The list shows Scheduled, Active until or Ended.
PriorityWhen several rules cover the same product, the lowest number wins (ties go to the rule higher in the list), unless Settings says to give the customer the best price.

3. How tiers and counting work

Each tier applies from its quantity up to the next tier, and the whole cart line gets it. With 5 at 10% and 10 at 15%: 4 mugs are full price, 7 mugs are all 10% off, 12 mugs are all 15% off. A tier can start at 1, which makes the fixed price type a complete price list (1+ at $10, 10+ at $9, 50+ at $8). A fixed price above the product's own price is never charged; the product's price stays.

Count quantityExample
Per productAll variations of a product count together: 2 small and 3 large shirts make 5 shirts, so both lines reach the 5+ tier.
Per cart lineEach line counts on its own: 2 small and 3 large shirts stay below a 5+ tier.
Mix and matchEverything the rule covers counts together: with a Stationery rule at 6+, 2 notebooks, 3 pens and a planner make 6.

Discounts never stack: each line gets one tier from one rule. Coupons apply on top of the discounted price, as they would to any price.

4. Give a product its own tiers

Edit the product and open its Quantity discounts tab:

OptionWhat it does
Use the store rulesThe default. The tab lists the rules that currently cover the product.
Use tiers set for this productSet a discount type, how quantities count (per product or per cart line) and tiers for this product only. They always win over rules.
No quantity discounts for this productThe product never gets a quantity discount, even when a rule covers it.

5. Settings

The Settings tab on the same screen:

SettingWhat it does
Products on saleApply the quantity discount to the sale price (default), apply it to the regular price and charge whichever is lower, or give no quantity discount on sale items.
Several rules matchUse the rule with the lowest priority number (default), or give the customer the best price among the matching rules.
Pricing tableShow the table on product pages, and where: above the add to cart button, below it, below the product summary, or only where you place the shortcode.
Table headingThe line above the table, "Buy more, save more" by default. Leave empty for no heading.
Columns and extrasThe Discount column, the Price per item column, and the live total and saving under the table.
Shop badgeA line under products on shop and category pages; {discount} becomes the best saving, such as 20% or $5.00.
CartShow the original price struck through next to the discounted price, and tell customers how many more to add for the next tier.

6. The pricing table and the shortcode

The table lists the quantity ranges, the discount and the price per item, with tax shown the way your shop displays prices. The row for the quantity in the add to cart box is highlighted, and a line under the table shows the total and the saving as the quantity changes. On variable products the prices fill in when a variation is chosen; a variation the rule does not cover hides the table.

ShortcodeWhere
[dqdw_pricing_table]Inside a product template or a product page, for the current product. Useful for block themes and page builders, with the position set to "Only where I place the shortcode".
[dqdw_pricing_table product="123"]Anywhere, for the product with that ID.

7. Cart, checkout and orders

The discount is set on the cart line itself, so the classic cart and checkout, the cart and checkout blocks and the mini cart all show the discounted price, and taxes, coupons, shipping and payment gateways all use it. Under each discounted item customers see the discount ("Quantity discount: 15% off") and, while a better tier is in reach, a hint such as "Add 3 more to pay $8.00 each". Each order line records the discount it received, shown on the order screen, in emails and on invoices, together with the original unit price for your records.

8. For developers

FilterUse
dqdw_sourcesChange the discount sources (product tiers or rules) found for a product, first used first.
dqdw_discounted_priceAdjust the discounted unit price for a product, source, tier and counted quantity.
dqdw_should_applyReturn false to switch quantity discounts off for a whole cart.
dqdw_cart_item_eligibleReturn false for cart lines another plugin prices, such as bundle children or free gifts.
dqdw_customer_rolesChange the roles used to match role-restricted rules.
dqdw_pricing_table_htmlChange the table markup; the result is filtered through an HTML allowlist.

Troubleshooting

No table on a product page: check that an enabled rule covers the product (the product's Quantity discounts tab lists them), that its dates include today, that it is not limited to roles you are not signed in with, that the product is not set to "No quantity discounts", and that the table is switched on with a position other than "Only where I place the shortcode". With "No quantity discount on sale items", products on sale show no table.

The cart shows the full price: the counted quantity has not reached the first tier yet (the hint under the item says how many more), or one of the checks above applies. If another plugin sets the price of that line, for example a bundle or a gift, it may override the discount; return false from dqdw_cart_item_eligible for those lines.

Mix and match does not count two products together: only rules with "Mix and match" count across products, and only products that rule covers. A product with its own tiers counts on its own.

The table and the cart show different prices: the table follows your shop's tax display setting and the cart follows the cart's; set both the same way under WooCommerce → Settings → Tax. With "Give the customer the best price", the table shows the rule with the deepest top tier.

What happens if I deactivate the plugin: carts go back to normal prices on their next update, and orders keep the discount they were placed with. Uninstalling also removes the rules, the settings and the per-product tiers.

Stuck, or want it customised?

We build and customise WooCommerce plugins for a living. If your store needs customer price lists, buy X get Y deals or a trade portal, tell us what and we'll quote it.