# 1. Description

The **Margins & Purchase Prices in Product Listing** plugin extends the product list in the Shopware administration with four additional columns that make purchase prices and profit margins visible at a glance — without opening individual products.

![Product listing with margin columns and color-coded indicators](https://459847022-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LtiS3-dzuXFp_IH7yRw-1972196547%2Fuploads%2Fgit-blob-57165e6ea49f1e3eb45b97b2ddd5679d7c4e9a70%2F1.png?alt=media)

## What the plugin does

After installation, you will see four new columns in **Catalogues → Products**:

| Column             | Description                                                                  |
| ------------------ | ---------------------------------------------------------------------------- |
| **Purchase Price** | The stored purchase price of the product                                     |
| **Net Price**      | Automatically calculated from gross price and tax rate                       |
| **Margin**         | Absolute margin (net price − purchase price), formatted in the shop currency |
| **Margin %**       | Percentage margin with color-coded indicators                                |

Products without a stored purchase price display a dash (–) in all margin columns.

## Color-coded margin indicators

The **Margin %** column shows colored badges so you can spot problematic products at a glance:

* **Red** — Margin below the low threshold (default: below 10%)
* **Yellow** — Margin between thresholds (default: 10–30%)
* **Green** — Margin above the high threshold (default: 30% and above)

You can customize the thresholds in the plugin configuration.

## Sorting and filtering

The plugin also adds:

* **Server-side sorting** by purchase price, margin, and margin % — click a column header to sort ASC/DESC across all pages, even for large catalogs.
* **Purchase price filter** in the native Shopware filter panel: "With purchase price" or "Without purchase price" — to quickly find products missing purchase price data.

![Server-side sorting by margin %](https://459847022-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LtiS3-dzuXFp_IH7yRw-1972196547%2Fuploads%2Fgit-blob-adac66f12d73f95058468d6296850709fe6f007d%2F2.png?alt=media)

## Calculation method

The percentage margin can be switched between two methods in the plugin configuration:

* **Gross Margin** (default): `(Net Price − Purchase Price) / Net Price × 100`
* **Markup**: `(Net Price − Purchase Price) / Purchase Price × 100`

## Compatibility

* Shopware 6.6
* Fully translated (German and English)
* No changes to the checkout process or storefront
