Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Spree change default currency and Country

I am developing an e-commerce application using Spree for India. So all prices are in 'Rs' and states and zones are India related. I edited them easily in Spree 1.2.0 but I couldn't find those options in 1.1.3. How to customize this in 1.1.3

like image 480
Bhushan Lodha Avatar asked Sep 21 '12 04:09

Bhushan Lodha


1 Answers

You can set these options in your 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
like image 129
Muhammad Ateq Ejaz Avatar answered Oct 04 '22 20:10

Muhammad Ateq Ejaz