Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 90 lines (83 sloc) 5.189 kB
a4a57db @cmar Preferences Rewrite - always reading from cache, only persisting when…
cmar authored
1 # This is the primary location for defining spree preferences
2 #
3 # The expectation is that this is created once and stored in
4 # the spree environment
5 #
6 # setters:
7 # a.color = :blue
8 # a[:color] = :blue
9 # a.set :color = :blue
10 # a.preferred_color = :blue
11 #
12 # getters:
13 # a.color
14 # a[:color]
15 # a.get :color
16 # a.preferred_color
17 #
4187a84 @schof Added module Spree to core models
schof authored
18 module Spree
a4a57db @cmar Preferences Rewrite - always reading from cache, only persisting when…
cmar authored
19 class AppConfiguration < Preferences::Configuration
6b9919f @calas Added AppConfiguration model to handle application preferences.
calas authored
20
9c87f0b @JDutil Organize preferences alphabetically to easily find a particular prefe…
JDutil authored
21 # Alphabetized to more easily lookup particular preferences
22 preference :address_requires_state, :boolean, :default => true # should state/state_name be required
4187a84 @schof Added module Spree to core models
schof authored
23 preference :admin_interface_logo, :string, :default => 'admin/bg/spree_50.png'
9c87f0b @JDutil Organize preferences alphabetically to easily find a particular prefe…
JDutil authored
24 preference :admin_pgroup_per_page, :integer, :default => 10
25 preference :admin_pgroup_preview_size, :integer, :default => 10
26 preference :admin_products_per_page, :integer, :default => 10
27 preference :allow_backorder_shipping, :boolean, :default => false # should only be true if you don't need to track inventory
28 preference :allow_backorders, :boolean, :default => true
29 preference :allow_checkout_on_gateway_error, :boolean, :default => false
30 preference :allow_guest_checkout, :boolean, :default => true
31 preference :allow_locale_switching, :boolean, :default => true
32 preference :allow_ssl_in_development_and_test, :boolean, :default => false
4187a84 @schof Added module Spree to core models
schof authored
33 preference :allow_ssl_in_production, :boolean, :default => true
34 preference :allow_ssl_in_staging, :boolean, :default => true
35 preference :alternative_billing_phone, :boolean, :default => false # Request extra phone for bill addr
36 preference :alternative_shipping_phone, :boolean, :default => false # Request extra phone for ship addr
37 preference :always_put_site_name_in_title, :boolean, :default => true
9c87f0b @JDutil Organize preferences alphabetically to easily find a particular prefe…
JDutil authored
38 preference :auto_capture, :boolean, :default => false # automatically capture the creditcard (as opposed to just authorize and capture later)
4187a84 @schof Added module Spree to core models
schof authored
39 preference :cache_static_content, :boolean, :default => true
40 preference :check_for_spree_alerts, :boolean, :default => true
9c87f0b @JDutil Organize preferences alphabetically to easily find a particular prefe…
JDutil authored
41 preference :checkout_zone, :string, :default => nil # replace with the name of a zone if you would like to limit the countries
42 preference :company, :boolean, :default => false # Request company field for billing and shipping addr
43 preference :create_inventory_units, :boolean, :default => true # should only be false when track_inventory_levels is false, also disables RMA's
44 preference :default_country_id, :integer, :default => 214
2af49f2 @JDutil Set default Spree locale to main Apps default locale. [fix #1184]
JDutil authored
45 preference :default_locale, :string, :default => Rails.application.config.i18n.default_locale || :en
9c87f0b @JDutil Organize preferences alphabetically to easily find a particular prefe…
JDutil authored
46 preference :default_meta_description, :string, :default => 'Spree demo site'
47 preference :default_meta_keywords, :string, :default => 'spree, demo'
48 preference :default_seo_title, :string, :default => ''
4187a84 @schof Added module Spree to core models
schof authored
49 preference :dismissed_spree_alerts, :string, :default => ''
50 preference :last_check_for_spree_alerts, :string, :default => nil
9c87f0b @JDutil Organize preferences alphabetically to easily find a particular prefe…
JDutil authored
51 preference :logo, :string, :default => 'admin/bg/spree_50.png'
52 preference :max_level_in_taxons_menu, :integer, :default => 1 # maximum nesting level in taxons menu
53 preference :orders_per_page, :integer, :default => 15
1f0ee5b @schof New :pric_inc_tax preference which creates price
schof authored
54 preference :prices_inc_tax, :boolean, :default => false
9c87f0b @JDutil Organize preferences alphabetically to easily find a particular prefe…
JDutil authored
55 preference :products_per_page, :integer, :default => 12
56 preference :select_taxons_from_tree, :boolean, :default => false # provide opportunity to select taxons from tree instead of search with autocomplete
57 preference :shipment_inc_vat, :boolean, :default => false
58 preference :shipping_instructions, :boolean, :default => false # Request instructions/info for shipping
59 preference :show_descendents, :boolean, :default => true
60 preference :show_only_complete_orders_by_default, :boolean, :default => true
61 preference :show_zero_stock_products, :boolean, :default => true
62 preference :site_name, :string, :default => 'Spree Demo Site'
63 preference :site_url, :string, :default => 'demo.spreecommerce.com'
64 preference :tax_using_ship_address, :boolean, :default => true
65 preference :track_inventory_levels, :boolean, :default => true # will not track on_hand values for variants /products
07c4bdc @BDQ Adds :track_inventory_levels preference which disable inventory track…
BDQ authored
66
7d987fe @LBRapid Image Settings are now able to be configured via the admin interface.
LBRapid authored
67 # Preferences related to image settings
68 preference :attachment_default_url, :string, :default => '/spree/products/:id/:style/:basename.:extension'
69 preference :attachment_path, :string, :default => ':rails_root/public/spree/products/:id/:style/:basename.:extension'
70 preference :attachment_styles, :string, :default => "{\"mini\":\"48x48>\",\"small\":\"100x100>\",\"product\":\"240x240>\",\"large\":\"600x600>\"}"
71 preference :attachment_default_style, :string, :default => 'product'
72 preference :s3_access_key, :string
73 preference :s3_bucket, :string
74 preference :s3_secret, :string
75 preference :s3_headers, :string, :default => "{\"Cache-Control\":\"max-age=31557600\"}"
76 preference :use_s3, :boolean, :default => false # Use S3 for images rather than the file system
77
a4a57db @cmar Preferences Rewrite - always reading from cache, only persisting when…
cmar authored
78 # searcher_class allows spree extension writers to provide their own Search class
79 def searcher_class
80 @searcher_class ||= Spree::Core::Search::Base
81 end
82
83 def searcher_class=(sclass)
84 @searcher_class = sclass
85 end
07c4bdc @BDQ Adds :track_inventory_levels preference which disable inventory track…
BDQ authored
86
4187a84 @schof Added module Spree to core models
schof authored
87 end
a4a57db @cmar Preferences Rewrite - always reading from cache, only persisting when…
cmar authored
88
e30f2fb @BDQ Initial refactoring and specs for inventory_units
BDQ authored
89 end
Something went wrong with that request. Please try again.