spree-contrib / spree_multi_currency

Provides UI to allow configuring multiple currencies in Spree.
http://guides.spreecommerce.org
BSD 3-Clause "New" or "Revised" License
41 stars 117 forks source link

Different Currency is added to cart? #44

Open joshuaadela opened 9 years ago

joshuaadela commented 9 years ago

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

maximedelpit commented 9 years ago

+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 commented 9 years ago

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 commented 6 years ago

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?