BunStackDocs

Products

Discount codes

Create discount codes in percent or amount, with a minimum subtotal, validity, a maximum number of uses and the rule that a code skips sale items.

Last updated · 7 min read

A discount code gives the customer a deduction in the checkout. Here you create, edit and turn off codes.

Where: Discount codes in the sidebar.

Create a code

  1. Press New code.
  2. Fill in the fields in the table below.
  3. Press Create code.
SettingWhat it doesDefaultLimits
CodeThe code the customer types. Stored in capitals–A–Z, 0–9, - and _. Max 64 characters. Unique in the workspace
KindPercent off or Fixed amount offPercent off–
ValuePercent or amount–Percent max 100
CurrencyThe currency of a fixed amount. Shown only for Fixed amount offThe base currencyThe base currency and the storefronts' currencies
StorefrontWorkspace-wide or one storefrontWorkspace-wide–
Max usesHow many times the code can be usedEmpty = unlimited–
Minimum subtotalThe cart value before shipping that is neededEmpty = no minimum–
StartsThe first day, from 00:00 Stockholm timeEmpty–
EndsThe last day, until 23:59 Stockholm timeEmpty–
EnabledOff turns the code offOn–
Not on reduced itemsThe code does not apply to items on sale or items a pricing rule has lowered, see belowOff–
Combines with other codes and gift cardsSaved with the code but changes nothing yet, see belowOff–

BunStack counts Minimum subtotal in the code's currency for a fixed amount and in the base currency for percent. It converts a cart in another currency at today's rate, and a fixed amount the same way. With Not on reduced items only the items the code applies to count, not the sale items.

Codes that skip sale items

With Not on reduced items the code only applies to items at full price. An item counts as reduced when:

  • it has a compare-at price above its price, or
  • a pricing rule has lowered its price.

BunStack decides this with the price the checkout charges, in the cart's currency. The customer cannot change it.

  • Percent is worked out on the full-price items. A fixed amount is never larger than those items.
  • The discount is spread over those lines only. The order lines show the deduction per line, so the order shows which items got the discount.
  • When the cart has both sale items and full-price items, the discount shows with "The discount does not apply to sale items or items with a promotional price." under the code.
  • When the cart has only sale items, the customer gets no discount and "The code does not apply to sale items or items with a promotional price."

Example: 10 % with Not on reduced items. The cart has a racket for 1,000 kr and a rubber on sale for 400 kr (compare-at price 500 kr). The discount is 100 kr, on the racket only.

Combining codes

Combines with other codes and gift cards is saved with the code and shown in the list, but changes nothing yet. An order takes one discount code, and there are no gift cards. The rule applies when an order can carry more than one code or a gift card.

The list

The tabs split the codes by status, with counts:

StatusMeans
ActiveThe code works in the checkout
UpcomingThe start day has not come
DisabledEnabled is off
ExpiredThe end day has passed
Used upMax uses is reached

All shows every code. The line above the list counts loaded codes and how many times they have been used. The Uses column shows, for example, "3 / 10" or "3 / ∞". The search field searches by code. The Value column shows NOT ON REDUCED and COMBINES when the rule is on.

On the row are the copy button, the pencil (Edit) and ⋯:

  • Enable or Disable turns the code on or off.
  • Duplicate opens the form with the code plus "-COPY". The copy is off until you turn it on.
  • Delete asks you to confirm. If the code has been used, the dialog says how many times, for example It has been used 3 times. Prefer turning the code off: the history then stays.

What the customer sees

The storefront shows these texts in Swedish when its language is Swedish, otherwise in English. The English text is quoted here.

The customer types the code under "Discount code" in the checkout's order summary and presses "Apply". The field is also on the cart page when the storefront shows the cart as a page, see The checkout as the customer sees it.

  • Upper and lower case do not matter. "summer10" and "SUMMER10" are the same code.
  • The order and the emails show the code as it is stored.
  • The deduction shows at once.
  • The customer can change or remove the code while the checkout window shows.

The code applies to the cart after pricing rules, before shipping. A fixed amount is never larger than the cart. BunStack spreads the discount over the order lines before it works out VAT, so the VAT per line is right. A code with Not on reduced items is worked out and spread over the full-price items only.

Codes from loyalty programme rewards apply to every item, sale items included, and cannot be combined.

Limits

  • The storefront must be live for the code to work.
  • A code for one storefront works only there.
  • A visitor can try 30 codes per minute.

Errors

MessageCauseDo this
… already exists in this workspace. Codes are the same whatever the case.The code already exists, with other capitals or lower caseChoose another code
Use A–Z, 0–9, - or _, at most 64 characters.A character that is not allowed, or the code is too longChange the code
Nothing was saved — your role may not allow editing discount codes.The Editor or Viewer role cannot edit codesAsk an Admin or Owner
"Code not valid for this cart." (in the storefront)The code is off, expired, used up or for another storefrontCheck the code in the list
"The code does not apply to sale items or items with a promotional price." (in the storefront)The code has Not on reduced items and the cart has only reduced itemsNothing. The customer adds a full-price item or continues without a code
"The code applies to purchases of at least 500 kr." (in the storefront)The cart is under Minimum subtotal. With Not on reduced items it goes on "Sale items and items with a promotional price do not count."Nothing. The customer adds items or continues without a code
"That discount code is not valid for this order — it has been removed. Continue without it or enter another code." (in the storefront)The code stopped being valid before the order was createdThe customer continues without a code or enters another

Roles

Admin and Owner create, edit and delete codes. Editor and Viewer see the list.