Skip to content

ShopCurrency: Scaffold Numeric Fields for Price etc... #818

@wernerkrauss

Description

@wernerkrauss

I changed in #812 in Product to use a NumericField instead of a TextField to allow other decimal separators etc. for better internationalisation.

Unfortunately we need to hard code the number of decimals in code when we create a numeric field. That's bad when a shop overwrites those numbers cause it needs more decimals for some reasons. Currently I found no way to read out the decimals from DBCurrency, as it's a private value in in those cases we'd need to overwrite all Fields

As we already have ShopCurrency as a subclass replacement for DBCurrency I suppose we add our own scaffoldFormField method, that returns a NumericField with setScale set to the decimals set in Currency.

Furthermore, we could add the current decimals for Nice.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions