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

not working with spree 2.1.x #19

Closed thiyagarajan closed 10 years ago

thiyagarajan commented 10 years ago

Hi,

I have installed 2-1-stable version with spree 2.1.x. Header able to see the currency select but no effect while select currency. Is it not supported spree 2.1.x?

JDutil commented 10 years ago

Please provide the requested information per our contributing guidelines https://github.com/spree/spree/blob/master/CONTRIBUTING.md providing steps to reproduce the error. This extension should be working up to Spree 2.2.x there is probably a configuration option such as supported currencies that you are not properly setting.

ckaye commented 10 years ago

Hi,

How does one set the preference settings for allow_currency_change, show_currency_selector and supported_currencies inside the host spree app? The readme doesn't make it clear. I apologise if this is basic knowledge.

I have tried adding it to the spree.rb initialiser file but I get an error saying that the preferences haven't been defined yet. The spree_multi_currency engine should have defined these preferences by this stage right?

EDIT: Thanks (below worked).

JDutil commented 10 years ago

You are able to modify these settings under the admin panel.

If you would like to define these in an initializer you can add an after initialize block to application.rb (or to a specific environment config) like:

    config.after_initialize do
      Spree::Config.allow_currency_change  = true
      Spree::Config.show_currency_selector = true
      Spree::Config.supported_currencies   = 'AUD,EUR,GBP,USD'
    end

I'm going to close this issue out for now until you can provide steps to reproduce the error @thiyagarajan

asecondwill commented 10 years ago

I've installed a fresh spree, 2.2.2 with rails 4.05, ruby 2.1.2. standard theme. I've just got one (blog) plugin installed and I18n. I've ticked the boxes in configuration to allow change & show selector.

Changing the currency selector does not change the product price on the product page.

I can see it posts Parameters: {"currency"=>"AUD"} to the currency set action, then refreshes the page, but the currency stays USD.

asecondwill commented 10 years ago

Sorry, also. Might be worth noting that earlier on i had this installed with all the modules I could get to work & the fancy theme - it only worked when the fancy theme was in the mobile layout mode - viewport < 300px ish - might that explain why its getting past the tests but isn't working?

asecondwill commented 10 years ago

never mind. something has changed & it's working. Probably restarting the server. sorry for trouble.