4
我正在开发一个使用Spree for India的电子商务应用程序。所以所有的价格都在'Rs',州和地区与印度有关。我在Spree 1.2.0中轻松编辑了它们,但我在1.1.3中找不到这些选项。如何在1.1.3Spree更改默认货币和国家
我正在开发一个使用Spree for India的电子商务应用程序。所以所有的价格都在'Rs',州和地区与印度有关。我在Spree 1.2.0中轻松编辑了它们,但我在1.1.3中找不到这些选项。如何在1.1.3Spree更改默认货币和国家
自定义此您可以在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
真正有用的感谢设置这些选项。有没有其他可以用这种方式配置的其他东西的列表?我在想你是否显示“状态”等。 – dwkns
这导致db:schema:load失败。如果Spree :: Country.table_exists修复了最后一行,那么修复它 – Qwertie
注意:它实际上是config/initializers/spree.rb(我试图改变它,但编辑被拒绝)任何人都可以帮忙吗? –