Spree changes default currency and country

I am developing an e-commerce application using Spree for India. Thus, all prices are indicated in "Rs", and the states and zones are associated with India. I easily edited them in Spree 1.2.0, but I could not find these options in 1.1.3. How to configure this in 1.1.3

+4
source share
2 answers

You can set these parameters in app/config/initializers/spree.rb

 Spree.config do |config| # Set country name and currency like this (Note: you will need to # run 'rake db:seed' before this. Change country name in # Spree::Country.find_by_name('Germany') replace Germany to your desired one) config.currency = 'EUR' country = Spree::Country.find_by_name('Germany') config.default_country_id = country.id if country.present? # You can also set following options too. config.site_name = "Todo Store" config.override_actionmailer_config = true config.enable_mail_delivery = true end 
+16
source

You can set these options in your application /config/initializers/spree.rb

 Spree.config do |config| config.currency = 'USD' config.default_country_id = 232 # Your default country id end 
0
source

Source: https://habr.com/ru/post/1435430/


All Articles