Currency display controls. #1

Closed
wants to merge 3 commits into
from

Projects

None yet

2 participants

mykehsd commented Feb 7, 2013

Currently forms are hardcoded to display EUR currency (symfony default), this is now controlled by the application parameter.

Introduced a new twig filter to help drive currency off that same value so that all currency displays are standardized across forms and templates.

Feedback welcome.

mykehsd added some commits Feb 7, 2013
@mykehsd mykehsd Support our currency value in forms so that they can be displayed acc…
…ording to locale configured in project
cb3d638
@mykehsd mykehsd Introduce twig filter "sylius_currency_format" so that we can localize
number formating and currency symbol based on the projects configured settings
Example:
  {{ '6539.49' | sylius_currency_format }}
Displays:
  $6,539.49
OR
  6.539,49 €
096da49
@mykehsd mykehsd Base the form currency value from the paramater list 838cab5
Owner

Hey Myke!

Thanks for your work, that's great addition to sandbox.
The name of this bundle can be misleading, because it does not really contain any Sylius specific settings. :)
It is used to create settings forms, save them and retrieve from database. So you can built any configuration using it. In sandbox you have two examples, one of them are general settings.

Could you please move this code to sandbox itself? Into SyliusSandboxBundle, inside /src dir.
That would be perfect and great feature! Thanks a ton!

We have a bit different plans for handling currencies in main app. (We plan to use php money implementation)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment