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
[Documentation] Concepts: Currencies #5527
Conversation
CoderMaggie
commented
Jul 18, 2016
•
edited
edited
Q | A |
---|---|
Doc fix? | yes |
New docs? | yes |
BC breaks? | no |
Related tickets | partially #5275 |
License | MIT |
Will be quite outdated after #5497 🎉 |
@pamil not everything, but yes. Some parts are waiting for its merge :) |
96bb691
to
b61aac8
Compare
@TheMadeleine I think we are missing example of switching the currency, hm? |
There's So |
@pamil What do you think about switching the currency on the context itself? That would be of course separate interface and implementation. Because using storage for that sounds weird. Storage should probably be a private service. |
This would require additional type checks before any call to that context. Moreover, creating decorators for contexts would be nearly impossible. Let's say we've got I don't like those storage mess too much, but it seems much simplier for now. |
9390f55
to
c16180a
Compare
|
||
Available Currencies Provider | ||
----------------------------- | ||
|
||
The default menu for selecting currency is using a special service called ``sylius.currency_provider``, which returns all enabled currencies. | ||
The default menu for selecting currency is using a service - **CurrencyProvider** - with the ``sylius.currency_provider`` id, which returns all enabled currencies. | ||
This is your entry point if you would like override this logic and return different currencies for various scenarios. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to override
?
Thanks Magda and Kamil! |