狂欢改变默认货币和国家

时间:2012-09-21 04:57:12

标签: ruby-on-rails spree

我正在使用Spree for India开发电子商务应用程序。因此,所有价格均为“卢比”,州和地区与印度相关。我在Spree 1.2.0中轻松编辑了它们,但我在1.1.3中找不到这些选项。如何在1.1.3中自定义

2 个答案:

答案 0 :(得分:16)

您可以在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

答案 1 :(得分:0)

您可以在app / config / initializers / spree.rb中设置这些选项

Spree.config do |config|
  config.currency = 'Rs'  
  config.default_country_id = 105 # Your default country id 
end