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

Currency format based on country #978

Open
xyz1123581321 opened this issue Dec 7, 2022 · 1 comment
Open

Currency format based on country #978

xyz1123581321 opened this issue Dec 7, 2022 · 1 comment

Comments

@xyz1123581321
Copy link
Contributor

Is there an easy solution for formatting prices based on the country or language code, for example some countries use . in 4.16 some , ex. 4,16?

@tobias-kuendig
Copy link
Member

Currently this is not possible out-of-the-box. You would have to implement your own custom Money class:
https://github.com/OFFLINE-GmbH/oc-mall-plugin/blob/develop/classes/utils/DefaultMoney.php

It would need to have access to the currently logged in user (which you might get from the session) and then you'd have to define a format for each country/state or use something built in to PHP or any existing library.

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

2 participants