> For the complete documentation index, see [llms.txt](https://docs.themeware.design/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.themeware.design/additional-features/extensions/product-badges/discount-badge.md).

# Discount badge

The **discount badge** points out reduced products – in the product box on listing pages and on the product page (gallery or buybox).

> #### Discount
>
> The "Discount" of a product is calculated from the difference between the "List price" and the "Price". For more information, see the [Shopware documentation](https://docs.shopware.com/en/shopware-6-en/catalogues/products#prices).

***

## Configuration

### **Theme configuration**

#### **Listing pages**

1. Go to the "**Listing pages**" tab
2. Expand the "**Product badges (in the product box)**" block
3. Scroll to the section "**Badge: Discount badge**"
4. Enable the configuration "**Show discount badge**"
5. Save your changes after editing

#### **Product pages**

1. Go to the "**Product pages**" tab
2. Expand the "**Product badges (in the image gallery or buy box)**" block
3. Scroll to the section "**Badge: Discount badge**"
4. Set the configuration "**Show discount badge**" to "**show in the image gallery**" or "**show in the buy box**"
5. Save your changes after editing

{% hint style="info" %}
**Note**: The badge is displayed if the product has a "List price" that results in a discount (not for price ranges or "from" prices) – provided the discount badge is enabled. The ThemeWare® badge only appears if the ThemeWare® mode is selected in the "Discount badge (Product badges)" setting; otherwise Shopware's default badge is used.
{% endhint %}

***

## Options

You control how the discount is displayed in the "**Content**" tab:

> Tab "Content" => Block "Product badges" => Section "Badge: Discount badge"

* **Content**: Defines how the discount is shown – e.g. "% (default)", "-25 %", "25 % saved", "-35 €" or "35 € saved".
* **Round number**: Defines the rounding of the value – "0.12 (default)", "0.1" or "0".

***

## Summary

#### Theme configuration

* Tab "Listing pages" => Block "Product badges (in the product box)" => Section "Badge: Discount badge" => Show discount badge
* Tab "Product pages" => Block "Product badges (in the image gallery or buy box)" => Section "Badge: Discount badge" => Show discount badge
* Tab "Content" => Block "Product badges" => Section "Badge: Discount badge" => Content
* Tab "Content" => Block "Product badges" => Section "Badge: Discount badge" => Round number

#### Snippets

* `twt.extension.discountBadge.discount`
  * `%discount%` is replaced by the discount.
* `twt.extension.discountBadge.discountShort`
  * `%discount%` is replaced by the discount.
  * `%currency%` is replaced by the current currency symbol.
* `twt.extension.discountBadge.percentage`
  * `%discount%` is replaced by the percentage discount.
* `twt.extension.discountBadge.percentageShort`
  * `%discount%` is replaced by the percentage discount.
  * `%currency%` is replaced by the current currency symbol.
