This recipe sells a product by the pack with Dynamic Pricing: socks at $10 a pair, a 6-pack for $50 and a 12-pack for $90. The cart totals below were measured on a real cart.
The cart builds the packs for the customer. A customer who adds 8 pairs pays for one 6-pack and 2 single pairs.
What you need
↑ Back to top- Dynamic Pricing, activated
- The product sold by the single unit, with its single price set
Set up the rule
↑ Back to top- Go to WooCommerce › Dynamic Pricing and choose Add rule on the Rules tab.
- Choose Custom, then Packs.
- Enter a Name, such as Sock packs.
- In the first row, leave Size at 6 and enter 50 in Total.
- Choose Add row, then enter 12 in Size and 90 in Total.
- Under Applies to, choose Add filter. Leave Category and Is, and pick Socks under Which.
- Leave Count on Each product, so each product makes its own packs.
- Choose Save rule.
The Rules tab shows the rule as Packs: 6 for $50.00, 12 for $90.00 · Socks.
What each field does
↑ Back to top| Field | What it does |
|---|---|
| Size | How many units make a pack. |
| Total | The price of the whole pack. |
| Label | Optional. Names the pack in the pricing table on the product page, such as Value pack. |
What the customer is charged
↑ Back to topMeasured on $10 socks with the two packs above:
| In cart | Made up of | Full price | Charged |
|---|---|---|---|
| 5 | 5 singles | $50.00 | $50.00 |
| 6 | One 6-pack | $60.00 | $50.00 |
| 8 | One 6-pack and 2 singles | $80.00 | $70.00 |
| 12 | One 12-pack | $120.00 | $90.00 |
| 13 | One 12-pack and 1 single | $130.00 | $100.00 |
| 18 | One 12-pack and one 6-pack | $180.00 | $140.00 |
The pack price is spread across the units on the cart line. Eight pairs show as $8.75 each.
At 5 pairs the cart costs the same as the 6-pack, so a customer gets the sixth pair free by reaching the pack. Price the pack against the singles with that in mind.
Variations on the same rule
↑ Back to top| You want | Change |
|---|---|
| One pack size only | Remove the second row. |
| Packs on one product | Under Applies to, set Filter by to Product and pick the product. |
| Any 3 from a category for one price, repeating | See Any 3 for a set price. |
The Dynamic Pricing documentation shows how rules work together.