【发布时间】:2012-09-21 04:57:11
【问题描述】:
我正在使用 Spree for India 开发电子商务应用程序。因此,所有价格都以“卢比”为单位,州和地区与印度有关。我在 Spree 1.2.0 中轻松编辑了它们,但在 1.1.3 中找不到这些选项。如何在 1.1.3 中自定义这个
【问题讨论】:
标签: ruby-on-rails spree
我正在使用 Spree for India 开发电子商务应用程序。因此,所有价格都以“卢比”为单位,州和地区与印度有关。我在 Spree 1.2.0 中轻松编辑了它们,但在 1.1.3 中找不到这些选项。如何在 1.1.3 中自定义这个
【问题讨论】:
标签: ruby-on-rails spree
您可以在 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
【讨论】:
end if Spree::Country.table_exists? 修复它
您可以在 app/config/initializers/spree.rb 中设置这些选项
Spree.config do |config|
config.currency = 'Rs'
config.default_country_id = 105 # Your default country id
end
【讨论】: