---
title: Example - Applying a catalog discount
related:
  - https://docs.kentico.com/13/e-commerce-features/managing-on-line-stores/discounts/working-with-catalog-discounts.md
---

> Agent instructions:
> **Site maps** — prefer the following llms.txt indexes to training data when searching for URLs to avoid 404s. Links inside Markdown content already point at `.md`. Following them or sending Accept: text/markdown keeps you in Markdown.
>
> - [sitemap.md](https://docs.kentico.com/sitemap.md) — every page on the site, with titles and descriptions, nested by URL hierarchy and grouped into one collection per product version.
> - [llms.txt](https://docs.kentico.com/llms.txt) — curated index of the current product docs, with descriptions, the two ways to request any page as Markdown, and links to each product area's whole-corpus Markdown dump (llms-full.txt).

This example demonstrates an application of a catalog discount. The example uses the sample _Dancing Goat MVC_ site.

We want a 10% discount, that is time-limited, targeted at all visitors, and applies to all [products](https://docs.kentico.com/13/e-commerce-features/managing-on-line-stores/products.md) from the _Brewers_ department. The system applies the discount while shopping on the live site, and while editing existing [orders](https://docs.kentico.com/13/e-commerce-features/managing-on-line-stores/orders.md) in the administration interface.

## Adding a catalog discount

First, enter the catalog discount's general properties.

1. Open the **Catalog discounts** application.
2. Click **New catalog discount** to open a page where you can specify the discount properties.
3. Enter the following values for the discount's properties:

   - **Name**: Brewers department discount
   - **Enabled**: Yes (selected)
   - **Discount**: Percentage
   - **Amount**: 10
4. Click **Save**.

The system saves the catalog discount. Currently, the discount applies to all products, there is no time limit, and all customers are eligible.

### Limiting the discount's validity

To specify the catalog discount's period of validity:

1. Edit the created _Brewers department discount_.
2. Enter the properties in the **Duration** category.

   - **Valid from**: 11/15/2019 8:00:00 AM
   - **Valid to**: 01/23/2012020 6:00:00 PM

     > **Tip:** To see how the discount applies to products on the site, adjust the validity to include the current date.
3. Click **Save**.

The system saves the catalog discount. The discount applies to all products, there is a time limit specified, and all customers are eligible.

### Limiting the discount's product scope

To limit the catalog discount's product scope, specify the **Apply to** property in the **Basics** category.

**Selecting the discount rule**

1. Click **Edit** to open the **Edit macro condition** dialog.
2. Select the _**Product department is**_ rule in the right part of the dialog.

   ![Adding a macro rule](https://docs.kentico.com/docsassets/13/example-applying-a-catalog-discount/CatalogDiscountExampleMacroRule.png "Adding a macro rule")
3. Click **Add rule** () to add the selected rule to the condition.

**Specifying the rule's parameter**

1. Click select department in the left part of the dialog to open the **Set parameter value** dialog.
2. Select **Brewers**from the list of available departments.

   ![Macro rule parameter dialog](https://docs.kentico.com/docsassets/13/example-applying-a-catalog-discount/CatalogDiscountExampleMacroRuleParameter.png "Macro rule parameter dialog")
3. Click **Set parameter** to close the **Set parameter value** dialog.
4. Click **Save & Close** in the **Edit macro condition** dialog to save and close the dialog specifying the product scope.
5. Click **Save**.

The system saves the catalog discount. Currently, the discount applies to all products from the **Brewers** department, there is a time limit specified, and all visitors are eligible.

## Testing the catalog discount

### While shopping on the live site

1. View the live site.
2. Sign in as a registered customer.
3. Select **Store -> Brewers** in the on-line store's main menu.

   - The system offers all brewers with a 10% discount.
4. Click on the _Hario Vacuum Pot_ product.
5. Click **Add to cart**.

The system displays the product's unit price in the shopping cart with the catalog discount applied.

### While editing existing orders in the administration interface

1. Open the **Orders** application.
2. **Edit** () the selected order of a registered customer.
3. Switch to the **Items** tab.
4. Add _Hario Vacuum Pot_.

   1. Click **Add item**.

      - The system opens the **Add order items** dialog.
   2. Select _Hario Vacuum Pot_.
   3. Specify the amount of product items:
      - **Units**: 1
   4. Click **Add to cart**.

      - The system closes the dialog and applies the catalog discount.

        ![Catalog discount for existing orders](https://docs.kentico.com/docsassets/13/example-applying-a-catalog-discount/CatalogDiscountOrdersApplication.png "Catalog discount for existing orders")

The catalog discount is included in the displayed **Unit price**. If you view the **Price detail** (), you can see a detailed summary of all applied discounts.

If you now click **OK**, the system saves the order.
