Working with order discounts

Order discounts in Kentico reduce the overall price of entire orders by a percentage. You can use order discounts to motivate selected customers to purchase more products. For example, order discounts are particularly suitable:

  • During special seasons, for example Christmas
  • For the first order made by customers
  • For orders with a total price exceeding a specific amount of money
  • For customers who spend a certain amount of money in your store or buy selected products

Order discounts are dynamically configurable, and you can adjust them via rules and conditions according to your needs. These rules are based on properties of the customer’s shopping cart and can include the shopping cart content, billing/shipping address, order currency, etc. You can also specify periods of validity.

When calculating the price of a shopping cart or order, the system applies order discounts to the sum of all purchased products after processing other types of discounts, but before adding shipping costs and taxes.

Order discounts on instances with multiple sites

If you run multiple sites, each site has its own set of order discounts. Therefore, if you want to use the same discount on multiple sites, you need to create it on all of the given sites.

Adding and editing order discounts

You can add or edit order discounts in the Order discounts application.

Effects of discount modification on already existing orders

If you edit or delete a discount, existing orders do not change and remain with the original discount. To update existing orders according to the new rules, you need to edit the orders manually.

To create or edit an order discount:

  1. Open the Order discounts application.

  2. To add a new discount, click New order discount. To edit an existing discount, click Edit () next to the given discount.

  3. Set the discount’s properties:

    General

    Name

    The name of the order discount displayed in the administration interface, shopping cart, invoices, etc.

    Code name

    The unique identifier of the order discount (for example used by developers in custom code).

    Unless there is a reason to set a particular value, you can leave the default (automatic) option, and the system generates an appropriate code name automatically.

    Description

    You can add an explanation about the scenarios for which the order discount is intended. The description does not affect the discount’s functionality, apart from providing information to store managers working in the Order discounts application.

    Enabled

    Indicates whether the order discount is available for use by customers. If the check box is cleared, the order discount cannot be applied.

    Discount value

    Amount

    Sets the percentage by which the discount reduces the price of orders. The amount must be a valid decimal number between 0 and 100.

    Discount conditions

    Minimum order amount

    Specifies the minimum price total that orders must have for the discount to be applicable. The price is evaluated before the system adds shipping costs and taxes to the order total.

    Set the value in the site’s main currency.

    If you leave an empty value, all orders are eligible for the order discount unless limited by the Further conditions field.

    Further conditions

    Adds further conditions that must be fulfilled to apply the order discount.

    Click Edit to open the Edit macro condition dialog, which allows you to add conditions through a graphical interface.

    Selecting the discount rules

    - To add rules to the condition, double\-click rules on the right or click **Add rule** (<i class="kx13-chevron-left" style="color: #000000"></i>).- To remove a rule from the condition, select it and click **Delete** (<i class="kx13-times" style="color: #000000"></i>). Click **Clear all rules** (<i class="kx13-broom" style="color: #000000"></i>) to remove all added rules.- Click on underlined words in the rule text to configure various rule options:![Specifying the rule parameters](/docsassets/k11/working-with-order-discounts/specifying_rule_parameters.png){width="500" .render-border}If you are a developer, conditions are [Kentico macros](/k11/macro-expressions){.internal-link }, and you can edit them directly on the **Code** tab in the **Edit macro condition** dialog.

    Coupons

    Customer has to redeem a coupon to get the discount

    If selected, only customers who enter a valid coupon code are able to apply the discount.

    You can define coupon codes on the Coupons tab. See Working with coupon codes to learn more.

    Duration

    Valid from

    Specifies the time and date from which the discount can be applied. If you leave the value empty, the discount can be applied at any time before the Valid to date.

    Valid to

    Specifies the time and date until which the discount can be applied. If you leave the value empty, the discount is valid permanently (starting from the Valid from date).

    Target customers

    Available for

    Determines which types of users are able to apply the discount:

    - **All visitors** – all customers are eligible for the discount.- **Registered users** – only [registered customers](/k11/e-commerce-features/managing-your-store/customers){.internal-link } are eligible for the discount.- **Registered users in selected roles** – only registered customers in selected [roles](/k11/managing-users/role-management){.internal-link } are eligible for the discount. To add roles:1. Click **Select** to open the **Select roles** dialog.2. Select the required roles.3. Click **Select**.

    You can add registered customers to roles in the Customers application while editing customers on the Roles tab.

    Discount processing

    Priority

    Determines the sequence in which the system applies order discounts. The priority must be a number greater than or equal to 1. Enter 1 for the highest priority.

    Tip: Keep intervals between priority numbers. If you want to add a new discount between two existing ones, it is easier if their priority values are 10 and 20 rather than 1 and 2. If necessary, you can use decimal numbers to set priorities between whole numbers.

    The priority determines how the system combines multiple order discounts:

    - Discounts on the same level use additive stacking – all discounts are calculated from the same base price.- Discounts on different levels use multiplicative stacking – discounts are calculated based on the reduced price of the previous priority level.Examples:- Two 5% discounts with the same priority – the total order discount is 10%.- A 10% discount with priority 1 and 10% discount with priority 2 – the total discount is 19% (10% for the first discount, then 10% calculated from the reduced 90% price for the second discount).

    Apply lower priority discounts

    If selected, other order discounts with lower priority can be applied to the order as well.

    If the check box is cleared, the system processes order discounts from the top priority level (1) to the level of the edited discount (including other discounts with the same level) and then stops.

  4. Click Save.

  5. If you have enabled the Customer has to redeem a coupon to get the discount option, switch to the Coupons tab and generate coupon codes. See Working with coupon codes for more information.

If enabled and valid, the system applies the order discount to orders that fulfill the configured conditions.

Displaying order discount values to customers

In invoices and other e-commerce notification emails, you can show the values of applied order discounts by including the {%OrderDiscount%} or {%OrderDiscountSummary%} macros in the corresponding templates.

To display the price total of applied order discounts on your store’s checkout pages, use the Shopping cart totals web part with the Total to display property set to Order discounts total.

If you wish to display detailed information including the names of individual order discounts, use the Static text web part with the {%ECommerceContext.CurrentShoppingCart.OrderDiscountSummary%} macro. See: Displaying shopping cart details on pages