Skip to content
This repository was archived by the owner on Feb 27, 2021. It is now read-only.

Different Currency is added to cart? #44

Open
joshuaadela opened this issue Aug 18, 2015 · 3 comments
Open

Different Currency is added to cart? #44

joshuaadela opened this issue Aug 18, 2015 · 3 comments

Comments

@joshuaadela
Copy link

The extension was added to a recently installed 3-0-stable version with no other customisation.

@maximedelpit
Copy link

+1 I have the same issue, when in EUR and adding to cart, line_item options sets currency to "USD" by default.
While when on product show, the current_currency is set to "EUR".
Any idea to ahve a sustainable fixfor this?

Regards,

@maximedelpit
Copy link

It seems that in controller orders#populate, the argument of current_order(create_order_if_necessary: true) does not pass as the options hash (check controller_helpers current_order).
What I did to temporarly the issue solve (I'm not really satisfied with this) was an override of orders_controller in which I set options = {create_order_if_necessary: true}
Then I call order = current_order(options)

Please, let me now if you found something more sustainable

@neerajkumar
Copy link

Can we do something like in our initializers/spree.rb file

country = Spree::Country.find_by_name('Germany')
config.default_country_id = country.id if country.present?

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

No branches or pull requests

3 participants