Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wernerkrauss opened this issue Mar 5, 2024 · 0 comments
Open

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

wernerkrauss opened this issue Mar 5, 2024 · 0 comments

Comments

@wernerkrauss
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant