mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
- Add method `processUnitPrice` which is responsible for computing the right unit price, that depends on `price`, `variant_unit_scale`, `variant_unit`, `unit_value` and `variant_unit_name` - Watch the needed model to compute the unit price: `product.price` and `product.variant_unit_name` - Add dependencies : UnitPrices and localizeCurrencyFilter - Add currencyconfig to spec, as it's needed by localizeCurrencyFilter - Put `'ng-controller' => 'unitsCtrl'` to the relevant node. - Add new ng-model, as it's needed to watch it in order to compute unit price : `product.price` - Finally display the needed information: `product.unit_price_value` and `product.unit_price_unit`