5

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

4

2 回答 2

19

您可以在您的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
于 2013-07-03T11:47:52.867 回答
0

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

Spree.config do |config|
  config.currency = 'Rs'  
  config.default_country_id = 105 # Your default country id 
end
于 2019-06-14T08:37:58.767 回答