> For the complete documentation index, see [llms.txt](https://docs.premsoft.de/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.premsoft.de/en/plugins/cross-selling-for-cart-and-checkout/discount-badges.md).

# Discount badges

Discounted products can carry their own **badge** in the storefront — a colored hint with the discount percentage and an extra text. That way campaigns stand out instantly.

## Where does the badge show?

The badge appears wherever the product is shown as discounted:

* In the **cross-selling slider** (off-canvas, basket, checkout)
* On the **product detail page**
* In **category listings**
* In **search result pages** and search suggestions

## Activating the badge

Per rule in the admin dashboard you can switch the badge on or off:

1. Open **Cross-selling Checkout → Rule → Tab "Base"**.
2. Turn on **Show badge on discount products**.
3. Save the rule.

When off, matched products receive **no** badge — the discount itself is still applied in the basket.

## Designing the badge

In the tab **Badge** you set the look:

| Field                      | Example                                                                                    |
| -------------------------- | ------------------------------------------------------------------------------------------ |
| **Badge text**             | `Bundle deal`, `Top deal`, `Sale`, `Promo`. Translatable per language.                     |
| **Badge text color**       | Hex code such as `#ffffff` (white), `#ffe600` (yellow), `#000000` (black).                 |
| **Badge background color** | Hex code such as `#d9534f` (red), `#198754` (green), `#0d6efd` (blue), `#fd7e14` (orange). |

The badge is then composed of the **discount percentage** and the **badge text**. Example: with `discount = 15` and `badge text = Sale` you'll see:

> **−15 % Sale**

Leaving colors empty falls back to the defaults defined in the [Configuration](/en/plugins/cross-selling-for-cart-and-checkout/configuration.md).

## Practical examples

| Campaign         | Background | Text color | Text           |
| ---------------- | ---------- | ---------- | -------------- |
| Black Friday     | `#000000`  | `#ffffff`  | `Black Friday` |
| Summer sale      | `#fd7e14`  | `#ffffff`  | `Summer Sale`  |
| Bundle discount  | `#0d6efd`  | `#ffffff`  | `Bundle deal`  |
| Loyalty campaign | `#198754`  | `#ffffff`  | `Loyalty deal` |
| Clearance        | `#d9534f`  | `#ffffff`  | `Clearance`    |

## Multilingual badge texts

Switch the language in the detail screen to maintain different texts per language. Empty translations fall back to the system language automatically.

## Notes

* When the **discount value is 0 %** no badge appears — a 0 % rule acts as a pure recommendation rule without discount.
* One badge is shown per product. If a product is matched by several rules, the rule with the highest discount wins.
* The badge uses simple inline CSS and is therefore compatible with virtually any storefront theme.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.premsoft.de/en/plugins/cross-selling-for-cart-and-checkout/discount-badges.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
