Promotions

Automatic, no-code discounts — catalog-zone (a product’s own price drops when it matches a rule) and cart-zone (an order-level discount or free shipping). A promotion is a container of ordered tiers, each its own condition scope and discount, so one sale event can have several discount depths without needing a promotion per depth. Coupon codes stay torgash.checkout’s own separate, simpler feature.

Admin section
Marketing
Version
1.0.0 · torgash.promotions
Installed with
Shop
Needs
Catalog, Checkout, Media

Running a sale

A promotion is one sale event: a switch, a date range, and an ordered list of tiers. A tier is its own set of conditions plus its own discount, tiers are tried top to bottom, and the first one that matches wins.

That ordering is the whole idea. “10% off everything, but 50% off Brand X in Electronics” is ONE promotion with two tiers — the narrow one first, the sitewide one last as a fallback — not two promotions guessing priorities against each other. A tier with no conditions matches everything, which is what makes it a fallback.

Use the arrows on the left of each tier to move it. Moving a tier is not cosmetic: the fallback sitting above the narrow discount means every customer gets the small one.

Two zones

Catalog changes what a product costs. The new price is what the storefront prints, what the cart takes, and what a search filter sorts by — there is no separate “sale price” field anywhere.

Cart takes money off the order instead: a discount on the total, free shipping, a gift, or an upgrade to another customer group. Nothing about the product’s own price changes.

The zone is chosen when the promotion is created and cannot be switched afterwards — the two zones ask about genuinely different things (a product on its own page has no cart), so their conditions are different vocabularies.

What a tier can take off

KindMeans
Percent offTake N% off.
Fixed amount offTake a sum off.
A percent of the original priceThe price BECOMES N% of what it was.
A fixed priceThe price BECOMES this — “everything at 999”.

The last two are stated from the other end, which is often how a sale is advertised. A target above the price is never a surcharge: “everything down to 999” leaves an item priced 500 at 500.

Cart-zone promotions have three more: free shipping, a gift product, and give a customer group. The last two are not price lines at all — see “How the money adds up”.

When it runs

The status on the list is the switch and the calendar answered together:

  • running — enabled, and today is inside the dates.
  • scheduled — enabled, but it has not started yet.
  • ended — enabled, and the end date has passed.
  • off — the switch is off.

Leave a date empty for “no limit on that side”. A promotion can be switched on and scheduled from the API too (PATCH /api/v2/admin/promotions/{id}), which is how a sale starts at midnight without anyone being awake for it.

When two promotions want the same thing

That is what Combine answers:

  • Replace — competes with other Replace promotions; the highest-priority match wins and the rest are skipped. The default.
  • Stack (add) — its discount is summed with whatever else applied. “10% + 10%” reads as 20% off.
  • Stack (multiply) — applies to the ALREADY discounted price. A real double discount.

Whatever they add up to, the customer never ends up being owed money: the total discount can bring an order to zero and stops there.

Naming an arbitrary set of products

Sooner or later a sale is “these three hundred, and nothing else” — a list that matches no category and no characteristic anyone thought to record.

Do not list them one by one. Make a category, switch it off, and put them in it. A disabled category has no page, no menu entry and no line in the sitemap, and it never appears in a product’s breadcrumbs — but membership in it is ordinary membership, so a tier condition can say “category is in ⟨that one⟩” exactly as it would for a real one. The products themselves stay as visible as they ever were: what is switched off is the category, not what is inside it.

The same grouping then answers to more than one module. An automation rule conditions on the same category; so does a shipping method, and a price-type markup rule. One hidden category is a set the whole shop can point at, and it costs no new kind of entity to have.

Category pickers mark such a category “hidden from the storefront” so it is not mistaken for a real one.

Limits (cart zone)

Usage limit caps how many orders may take it. Once per customer ties it to the buyer: exact for signed-in accounts, best-effort for guests, because a guest is only recognisable once the order exists.

Both are counted from what orders actually took, which the Usage log (Promotions → Usage log) shows: how much has been given away, on which orders, under the name each order took it under.

How the money adds up

The order of things

A cart is priced in one direction, and each step sees what the one before it left:

  1. The goods, at whatever the catalog-zone promotions already made them cost.
  2. The coupon, if there is one.
  3. Cart-zone promotions, off what is still owed after the coupon.
  4. Delivery, and whatever else the shop adds (tax, a fee).

Step 3 is worth stating plainly: a “50% off” promotion on a cart that already has a 40.00 coupon takes half of what remains, not half of the sticker price. The alternative — both discounts computed from the same untouched subtotal — is how a cart ends up discounted twice over.

Two pools cap all of it. Goods discounts can bring the goods to zero and stop there; a free-shipping tier can cancel the delivery once, however many promotions asked for it. An order can be free. It can never be worth less than nothing.

What a placed order keeps

An order stores what it was actually given, frozen at placement, exactly as it stores its own tax breakdown. Editing or deleting the promotion afterwards does not move a single number on it — a customer agreed to a total, and that total is a fact about the past.

The one thing that rewrites the snapshot is a manager editing the order’s own contents. Then the discount is recomputed for what the order now contains — the promotion did not change, the order did — and no redemption is charged a second time.

Side effects are not discounts

A gift product and a customer group upgrade never happen while a cart is merely being re-priced — only when an order is really placed. A page redraw must not promote anybody or hand out stock.

A gift goes onto the order as an ordinary line at zero, through the same stock deduction as everything else, and is withheld if the shelf cannot cover it: a gift is a bonus, not what the customer came for, and refusing the whole order because a freebie ran out would punish someone who is paying. When it is withheld, nothing is recorded and no redemption is spent.

Where the numbers go afterwards

  • The order screen and the invoice show each promotion as its own line, under the name it was taken under.
  • 1C (CommerceML) receives them as <Скидки> with УчтеноВСумме=Нет, beside the coupon — never as goods with a negative price, which some 1C configurations refuse outright. The document adds up: lines, less discounts, is the total.
  • The API answers with them under adjustments on the order, and the promotions themselves are readable at /api/v2/admin/promotions.
  • The Usage log totals what was given away for whatever the filter selects.

Two limits worth knowing

The usage cap is advisory under simultaneous checkouts. It is read, and the counter raised, just after the order is committed — so two checkouts landing together can both take the last redemption. The counter is then allowed to show 501 of 500 rather than hiding it: the shop sees the truth, one order late. (The coupon has the same property, in the same place.)

“Once per customer” is exact for accounts, best-effort for guests. A guest becomes recognisable only once their order exists, so the check is real at placement and optimistic in the cart preview before it.

The sale’s page and its clock

A promotion can run silently — prices drop and nothing says why — or it can have a page of its own, an address you put in a newsletter, and a countdown. That is the Storefront tab, plus Repeats on the General tab.

Two switches, not one

Enabled decides whether money moves. Give this sale a page decides whether there is something to read. They are deliberately independent:

  • most sales need no page at all — the price simply drops;
  • a page must be able to outlive its sale. The link in last week’s mail lands on a page that says This sale has ended, never on a 404. Switching the sale off does not delete its page either; deleting the promotion does.

The address is made from the name if you leave it empty (a Russian name is transliterated), and two sales with the same name get two different addresses rather than one refusing to save.

What the page shows

  • the banner, the name and your description — write the terms here, in your own words;
  • the countdown, if the sale has a deadline;
  • for a catalog-zone sale, the products it covers — worked out from the same tier conditions that set the price, so the page can never advertise a product the cart then charges full price for. A product hidden from this visitor stays hidden here too;
  • nothing machine-written about the terms. “−50%” without the condition beside it reads as a promise, and the conditions in the admin’s words (“Category — is in 12, 15”) are not a sentence for a customer.

A cart-zone sale (money off the order, free shipping, a gift) has a page but no product list: it applies to an order, not to a set of goods.

The sale also appears on /sale, the list of everything running, and in the sitemap. It is NOT added to the menu automatically — put a link where your shop wants it.

Repeats: the deal of the day

The two dates say when the sale exists. A window says when it is open inside that:

  • no days ticked means every day;
  • an end time at or before the start time crosses midnight — 22:00 → 02:00 is a night sale, listed on the day it starts;
  • the same time twice (00:00 → 00:00) means the whole day;
  • several windows can sit under one sale.

Outside its window the sale is paused: the switch is on, the dates are fine, and the shop is charging full price. The list shows that state in its own colour and says when the sale comes back, because “running” beside full-price goods is the report we would otherwise get as a bug.

Times are the shop’s own clock. Customers see the same number of minutes left wherever they are — the timer counts down, it does not print the shop’s wall clock.

What the countdown counts to

Whichever comes first: the end of the sale, or the close of the current window. A sale that is paused or over counts to nothing at all — a running timer beside goods that are not on offer teaches customers that the timer is decoration.

Turn the countdown off if you would rather not show one; the sale itself is unaffected.

Badges on product cards

There is no separate “sale badge” here. A card already shows the new price with the old one struck through, and Catalog → Labels is where a badge with its own text, colour and rule lives (a label with a discount ≥ 1% rule marks everything any sale has touched). A second badge system inside this module would be a second place to look when a badge is wrong.

The product page is different: under the price it names the sale the price came from and links to its page, with the countdown beside it.

The one exception is the countdown: a product in a running sale that shows a countdown and has an end gets a small timer among the labels on its card’s photo — days, hours and minutes, seconds on the last day. Of several such sales the one that ends first is counted. Switch it off with Countdown on product cards in the module’s settings.