Last active
December 19, 2015 05:39
-
-
Save futhr/5906096 to your computer and use it in GitHub Desktop.
Sample of more or less full config for Spree 2.x @ config/initializers/spree.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Spree.config do |config| | |
# Amazon S3 | |
config.use_s3 = true | |
config.s3_bucket = 'mybucket' | |
config.s3_access_key = ENV['S3_ACCESS_KEY_ID'] | |
config.s3_secret = ENV['S3_SECRET_ACCESS_KEY'] | |
config.attachment_url = ':s3_eu_url' | |
config.s3_host_alias = 's3-eu-west-1.amazonaws.com' # EU | |
config.override_actionmailer_config = true | |
config.enable_mail_delivery = true | |
config.mails_from = 'test@me.io' | |
config.mail_bcc = 'test@me.io' | |
if Rails.env.staging? | |
config.intercept_email = 'test@me.io' | |
end | |
# The name of your Spree Store | |
if Rails.env.staging? | |
config.site_name = 'My Awesome Spree Staging Server' | |
else | |
config.site_name = 'My Awesome Spree Site' | |
end | |
# The URL for your Spree Store | |
if Rails.env.staging? | |
config.site_url = 'staging-myapp.herokuapp.com' | |
else | |
config.site_url = 'myapp.herokuapp.com' | |
end | |
# Determines if the site name should be placed into the title. | |
config.always_put_site_name_in_title = true | |
# The meta description to include in the head tag of the Spree layout. | |
config.default_meta_description = 'Spree demo site' | |
# The meta keywords to include in the head tag of the Spree layout. | |
config.default_meta_keywords = 'spree, demo' | |
# The logo to display on your frontend. | |
config.logo = 'admin/bg/spree_50.png' | |
# The path to the logo to display on the admin interface. | |
config.admin_interface_logo = 'admin/bg/spree_50.png' | |
# The path to the layout of your application. | |
config.layout = 'spree/layouts/spree_application' | |
# Will determine if the state field should appear on the checkout page. | |
config.address_requires_state = false | |
# The number of orders to display on the orders listing in the admin backend. | |
config.orders_per_page = 15 | |
# How many products to display on the products listing in the admin interface. | |
config.admin_products_per_page = 15 | |
# Determines if an InventoryUnit can ship or not. | |
config.allow_backorder_shipping = true | |
# Continues the checkout process even if the payment gateway error failed. | |
config.allow_checkout_on_gateway_error = false | |
# Enables SSL support in development and test environments. | |
config.allow_ssl_in_development_and_test = false | |
# Enables SSL support in production environment. | |
config.allow_ssl_in_production = true | |
# Enables SSL support in staging environment. | |
config.allow_ssl_in_staging = true | |
# Determines if an alternative phone number should be present for | |
# the billing address on the checkout page. | |
config.alternative_billing_phone = false | |
# Determines if an alternative phone number should be present for | |
# the shipping address on the checkout page. | |
config.alternative_shipping_phone = false | |
# Depending on whether or not Spree is configured to “auto capture” | |
# the credit card, either a purchase or an authorize operation will | |
# be performed on the card (via the current credit card gateway). | |
config.auto_capture = false | |
# Enables or disables caching of static content from Spree::ContentController | |
config.cache_static_content = true | |
# Limits the checkout to countries from a specific zone, by name. | |
config.checkout_zone = nil | |
# Determines whether or not a field for “Company” displays on the | |
# checkout pages for shipping and billing addresses. | |
config.company = false | |
# The three-letter currency code for the currency that prices will | |
# be displayed in. | |
config.currency = 'USD' | |
# The position of the symbol for a currency. Can be either before or after. | |
config.currency_symbol_position = 'after' | |
# Determines whether or not a currency is displayed with a price. | |
config.display_currency = false | |
# The default country’s id. Defaults to 214, as this is the id for | |
# the United States within the seed data. | |
config.default_country_id = 214 | |
# The number of levels to descend when viewing a taxon menu. | |
config.max_level_in_taxons_menu = 1 | |
# Determines if prices are labelled as including tax or not. | |
config.prices_inc_tax = false | |
# Determines if shipments should include VAT calculations. | |
config.shipment_inc_vat = false | |
# Determines if shipping instructions are requested or not when checking out. | |
config.shipping_instructions = false | |
# Determines if taxon descendants are shown when showing taxons. | |
config.show_descendents = true | |
# Determines if, on the admin listing screen, only completed orders should be shown. | |
config.show_only_complete_orders_by_default = true | |
# Determines if the variant’s full price or price difference from a | |
# product should be displayed on the product’s show page. | |
config.show_variant_full_price = false | |
# Determines if tax information should be based on shipping address, | |
# rather than the billing address. | |
config.tax_using_ship_address = true | |
# Determines if inventory levels should be tracked when products are | |
# purchased at checkout. This option causes new InventoryUnit objects | |
# to be created when a product is bought. | |
config.track_inventory_levels = true | |
end | |
Spree.user_class = 'Spree::User' | |
Paperclip.interpolates(:s3_eu_url) do |attachment, style| | |
"#{attachment.s3_protocol}://#{Spree::Config[:s3_host_alias]}/#{attachment.bucket_name}/#{attachment.path(style).gsub(%r{^/}, "")}" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment