# PricesField

> Panel field with one price per pricing rule

- Read more: <https://merx2.wagnerwagner.de/guide/configuration/currencies.md>
- Source: `src/PricesField.php` <https://github.com/wagnerwagner/merx/blob/2.0.0-alpha.11/src/PricesField.php>

## Description

Shows a number field for every rule in `wagnerwagner.merx.pricingRules`,
so a product cannot have two prices for the same rule. The prices are
stored as a list of `price` and `pricingRule`, which is what
`ProductPage::prices()` reads.

## Pages

- [new PricesField()](https://merx2.wagnerwagner.de/reference/classes/prices-field/__construct.md)
- [$pricesField->fill()](https://merx2.wagnerwagner.de/reference/classes/prices-field/fill.md): Turns the stored list into one price per pricing rule
- [$pricesField->toStoredValue()](https://merx2.wagnerwagner.de/reference/classes/prices-field/to-stored-value.md): Stores a row for every pricing rule that has a price
