> 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/1.-description.md).

# 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](/files/48xc5f2ZZRa0Hd3kIjfs)

## 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 %](/files/hoAqMKhAz7BUFgEeVAPu)

## 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`

The plugin stores both values pre-computed in the database. Switching the method takes effect immediately — no re-indexing or waiting required.

## Compatibility

| Plugin version | Shopware version |
| -------------- | ---------------- |
| 1.0.0          | Shopware 6.6     |
| 2.0.0          | Shopware 6.7     |

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