> For the complete documentation index, see [llms.txt](https://docs.momocode.de/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.momocode.de/en/shopware-6/margins-purchase-prices-product-listing/3.-configuration.md).

# 3. Configuration

Plugin settings are located at **Extensions → My Extensions → Margins & Purchase Prices in Product Listing → ... → Configure**.

![Plugin configuration page](/files/v4wO2jPU9i2lyI88x3fp)

## Calculation Method

### Percentage Calculation Method

Determines how the percentage margin in the **Margin %** column is calculated.

| Option                                | Formula                                               | Description                                  |
| ------------------------------------- | ----------------------------------------------------- | -------------------------------------------- |
| **Margin (Gross Margin)** *(default)* | `(Net Price − Purchase Price) / Net Price × 100`      | Profit as a percentage of the selling price  |
| **Markup**                            | `(Net Price − Purchase Price) / Purchase Price × 100` | Profit as a percentage of the purchase price |

**Example:** Purchase price €60, net price €100

* Gross Margin: (100 − 60) / 100 × 100 = **40%**
* Markup: (100 − 60) / 60 × 100 = **66.7%**

The plugin stores both methods pre-computed in the database. Switching the method takes effect immediately in the product listing — no re-index required.

***

## Margin Thresholds

The thresholds control the color coding in the **Margin %** column.

### Low Margin Threshold (%)

**Default: 10**

Margins below this value are shown in **red**. Red indicates that the margin is critically low or even negative (selling below purchase price).

### Medium Margin Threshold (%)

**Default: 30**

* Margins between the low threshold and this value are shown in **yellow**.
* Margins at or above this value are shown in **green**.

**Example with default values:**

* Margin < 10% → Red
* 10% ≤ Margin < 30% → Yellow
* Margin ≥ 30% → Green
