Discount rules
A discount rule gives every product it matches a sale price, for as long as the rule is in force. Rules live on the Discounts tab of Super Speedy > Ajax. This article covers every setting on a rule.
Available since 0.1.0.
The discount
| Discount | Amount | Example on a 100.00 product |
|---|---|---|
| Percentage off | A percentage, up to 100 | 12 gives 88.00 |
| Fixed amount off | Money, in the store’s base currency | 15 gives 85.00 |
| Fixed price | Money, in the store’s base currency | 79 gives 79.00 |
The result is rounded to the number of decimals the store’s currency uses.
A discount never raises a price. A fixed price above a product’s regular price is ignored for that product, and a fixed amount larger than the price stops at zero. A product with no regular price is never discounted.
What a rule applies to
All products. Every published product in the store.
Categories, brands, tags or attributes. The first condition is added for you on Product categories. Choose another taxonomy from its list if you need one, then search for one or more terms. Click Add a condition for more. Product categories, tags, brands and global attributes such as Colour or Size are offered.
- Within one condition, a product matches if it has any one of the terms.
- With more than one condition, a product must match every condition. “Brand is Apex” plus “Category is Jackets” covers Apex jackets only.
- Sub-categories are included. A rule on Jackets covers a product filed only under Winter jackets.
Chosen products. Search by name or SKU and pick products. Choosing a variable product covers all of its variations. Each search shows the results for what you last typed, however fast you type.
Variations always follow their parent product: a variation matches a rule when its parent does. Grouped products have no price of their own and are skipped.
The line under Applies to counts what the rule covers before you save, for example “Covers 11 products (19 including variations); 1 keeps its own sale price.” It counts this rule on its own; a rule above it in the list can claim some of those products first (see “One rule per product” below).
Dates
From and To are optional, set to the minute, and use the site’s timezone (Settings > General). A rule with a From date shows Scheduled until it starts, and Ended after its To date. A rule with no dates runs until you switch it off or delete it.
When a From or To time arrives, a scheduled task writes the sale prices or puts the products back. The task runs on WP-Cron, through WooCommerce’s scheduled actions, so on a quiet site it can run a little after the time you set. Running the sale price updates explains what shoppers see in the meantime.
Products that have their own sale price
Each rule has a setting, If a product has its own sale price:
| Choice | What a product with its own sale price gets |
|---|---|
| Keep the product’s own sale price (default) | Its own sale price. The rule leaves it alone. |
| Use whichever is lower: this rule or the product’s own sale price | The rule is worked out from the regular price, and the shopper pays the lower of the rule’s price and the product’s own sale price. |
| Take the discount off the sale price as well | A percentage or amount comes off the product’s own sale price. A fixed-price rule acts as “whichever is lower”. |
A product counts as having its own sale price while that sale is running. A product whose own sale starts on a later date gets the rule until then.
“Use whichever is lower” compares this rule with the product’s own sale price. It does not compare two rules with each other: only one rule ever applies to a product.
One rule per product
Rules are tried from the top of the list. The first rule that matches a product is the one used for it, and every rule below is ignored for that product, even one with a bigger discount. Rules never stack.
The first rule that matches a product keeps it even when that rule leaves the price alone. A rule set to keep the product’s own sale price, or a fixed-price rule above the product’s regular price, still stops a rule lower down from discounting that product.
Put specific rules above general ones: “50% off this one bag” above “10% off everything”. Use the arrows on a rule to move it up or down, and save.
For a store-wide sale with a deeper cut on one category, make two rules: the category rule first, the “All products” rule second.
Exclusions
Open Exclusions on a rule.
- Never discount these products. Named products the rule skips.
- Never discount products in. Terms the rule skips, sub-categories included.
An excluded product is not claimed by the rule, so a rule further down the list can still discount it.
How the discount is applied
Change each product’s sale price (recommended) writes the discounted price into each product, so price sorting, the price filter and filter plugins see the sale, and puts every product back when the rule ends. Display only: change no product shows the discount without writing anything. Real sale prices or display only compares the two.
For a rule that changes sale prices, When the sale ends chooses what each product gets back. When a sale ends covers it.
Sale countdown
Tick Show the theme’s sale countdown (needs a To date) for themes that count down to a sale’s end, such as Woodmart. See Theme sale countdowns.
Rule status
| Status | Meaning |
|---|---|
| Not saved | A new rule that has not been saved yet. |
| Scheduled | Its From time has not arrived. |
| In force | Shoppers see the discount. |
| TEST mode | It would be in force, but Super Speedy Ajax is in TEST mode, so only the test link sees it. |
| Ended | Its To time has passed. |
| Off | The rule’s switch is off. |
A rule you switch off keeps all its settings. Switch it on again and save to restart it.
Where shoppers see the discount
The shop, category pages, the product page, the basket, the checkout and the order all use the discounted price. Shoppers see the regular price struck through, the discounted price, and the theme’s sale badge. Products a rule discounts also appear on WooCommerce’s sale listings; see Sale pages and on-sale listings.
A price a theme or another plugin sets on an item in the basket, such as a free gift at 0, is kept. A rule never overrides it.
What rules do not do
Quantity tiers, role discounts, buy-one-get-one offers, free gifts and basket-level discounts are not part of this add-on.
Further reading
Written for Super Speedy Ajax – Price Discounts 0.4.3.
Comments