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
Ability to switch between different Locales and Currencies in a single Store #10764
Conversation
add multi-locale support to store
This is great - I'm only seeing one problem where :supported_locales is not a valid parameter of the store_attributes. spree/core/lib/spree/permitted_attributes.rb - |
32be721
to
e94b7cd
Compare
Manage this branch in SquashTest this branch here: https://featuresupported-locale-t2bev.squash.io |
1ca939e
to
89c5727
Compare
89c5727
to
fd16f18
Compare
Not sure if related but on admin backend when I try to access store translations I receive this error. Might be related to globalize though. NoMethodError - undefined method `translated_attribute_names' for #Class:0x00007fefa2c5c580: I tracked it down to admin/translations_controller.rb:10 // something in the index action which is very generic. (using master on commit 166b543) |
Alongside this PR I'm preparing PRs for Spree Globalize and Spree I18n ( spree-contrib/spree_i18n#876 ) to ease the migration path, hopefully, I can finish all of it today/Monday. |
@damianlegawiec awesome! thank you |
39fa2fe
to
484e1f1
Compare
fc7b16c
to
69943cc
Compare
Done and done! |
This is the backbone for multi currency inside a single Store
* adds ability to switch locale within scope of current store * endpoint to render dropdown with a list supported currencies * additional tests
To be able to use it in Storefront as well
`params[:currency]` can pass not supported currency in current store.
Most people will use single store with multiple currencies / locales
This is compatible with Spree I18n / Spree Multi Currency behaviour and is best suited for single store installations that want one store on a single domain with multiple currencies / locales
Fallback to `Spree::Config[:currency]` as a last resort
69943cc
to
7a69622
Compare
Screen.Recording.2021-02-12.at.6.56.11.PM.mov