# 2. Installation

## Installing the plugin

### Via the Shopware Store (recommended)

1. Open **Extensions → Store** in the Shopware administration.
2. Search for "Margins & Purchase Prices in Product Listing".
3. Click **Buy** or **Install**.
4. The plugin is downloaded and installed automatically.

### Manual installation via ZIP

1. Download the plugin ZIP file from your Shopware account.
2. Open **Extensions → My Extensions** in the administration.
3. Click **Upload plugin** and select the ZIP file.
4. The plugin will appear in the plugin list.

## Activating the plugin

1. Open **Extensions → My Extensions**.
2. Find **Margins & Purchase Prices in Product Listing** in the list.
3. Toggle the switch to **activate** the plugin.
4. Confirm the cache clear if prompted.

## First steps after installation

Once activated, the new columns are immediately visible in the product list:

1. Open **Catalogues → Products**.
2. Scroll right in the table — you will see four new columns: **Purchase Price**, **Net Price**, **Margin**, and **Margin %**.
3. If products do not have a purchase price set, a dash (–) appears in the margin columns. Add purchase prices directly on the product page under the **List price → Purchase price** field.

## Using the purchase price filter

To quickly find all products without a purchase price:

1. Open **Catalogues → Products**.
2. Click the **Filter** icon (funnel) in the upper right corner.
3. Scroll down in the filter panel to the **Purchase Price** section.
4. Select **Without purchase price**.
5. The product list will show only products without a stored purchase price.

![Filter panel with active purchase price filter](https://459847022-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LtiS3-dzuXFp_IH7yRw-1972196547%2Fuploads%2Fgit-blob-6f89f1dbcd82404fc2a9fddbb6b899ff618f3f9d%2F3.png?alt=media)

## Notes

* The **Margin** and **Margin %** columns are calculated based on the net price in the default currency and the stored purchase price.
* For products with variants, each variant must have its purchase price set individually.
* Sorting by margin and margin % is server-side and uses a precomputed database table that is updated automatically whenever prices change.
