Merge branch 'folklabs-currency-config'

This commit is contained in:
Rohan Mitchell
2015-03-25 11:54:06 +11:00
2 changed files with 11 additions and 7 deletions

View File

@@ -1,13 +1,15 @@
# Add application configuration variables here, as shown below.
#
# Change this, it has serious security implications.
# Change this, it has serious security implications.
# Minimum 30 but usually 128 characters. To obtain run 'rake secret', or faster, 'openssl rand -hex 128'
SECRET_TOKEN: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
SECRET_TOKEN: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
TIMEZONE: "Melbourne"
TIMEZONE: Melbourne
# Default country for dropdowns etc.
DEFAULT_COUNTRY: "Australia"
DEFAULT_COUNTRY: Australia
# Locale for translation.
I18N_LOCALE: "en"
LOCALE: en
# Spree zone.
CHECKOUT_ZONE: "Australia"
CHECKOUT_ZONE: Australia
# Find currency codes at http://en.wikipedia.org/wiki/ISO_4217.
CURRENCY: AUD

View File

@@ -11,9 +11,11 @@ require 'spree/product_filters'
Spree.config do |config|
config.shipping_instructions = true
config.checkout_zone = ENV["CHECKOUT_ZONE"]
config.address_requires_state = true
# Settings dependent on locale
config.checkout_zone = ENV["CHECKOUT_ZONE"]
config.currency = ENV['CURRENCY']
if Spree::Country.table_exists?
country = Spree::Country.find_by_name(ENV["DEFAULT_COUNTRY"])
config.default_country_id = country.id if country.present?