Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 78 lines (72 sloc) 4.299 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
4187a84 @schof Added module Spree to core models
schof authored
21 preference :site_name, :string, :default => 'Spree Demo Site'
22 preference :default_seo_title, :string, :default => ''
23 preference :default_meta_description, :string, :default => 'Spree demo site'
24 preference :default_meta_keywords, :string, :default => 'spree, demo'
25 preference :site_url, :string, :default => 'demo.spreecommerce.com'
26 preference :default_locale, :string, :default => 'en'
27 preference :allow_locale_switching, :boolean, :default => true
28 preference :default_country_id, :integer, :default => 214
29 preference :allow_backorders, :boolean, :default => true
30 preference :allow_backorder_shipping, :boolean, :default => false # should only be true if you don't need to track inventory
31 preference :track_inventory_levels, :boolean, :default => true # will not track on_hand values for variants /products
32 preference :create_inventory_units, :boolean, :default => true # should only be false when track_inventory_levels is false, also disables RMA's
33 preference :show_descendents, :boolean, :default => true
34 preference :show_zero_stock_products, :boolean, :default => true
35 preference :orders_per_page, :integer, :default => 15
36 preference :show_only_complete_orders_by_default, :boolean, :default => true
37 preference :admin_products_per_page, :integer, :default => 10
38 preference :admin_pgroup_preview_size, :integer, :default => 10
a4a57db @cmar Preferences Rewrite - always reading from cache, only persisting when…
cmar authored
39 preference :admin_pgroup_per_page, :integer, :default => 10
fd70ade @radar Set default products_per_page to 12. Fixes #765.
radar authored
40 preference :products_per_page, :integer, :default => 12
4187a84 @schof Added module Spree to core models
schof authored
41 preference :logo, :string, :default => 'admin/bg/spree_50.png'
42 preference :stylesheets, :string, :default => 'reset, screen' # Comma separate multiple stylesheets, e.g. 'screen,mystyle'
43 preference :admin_interface_logo, :string, :default => 'admin/bg/spree_50.png'
44 preference :allow_ssl_in_production, :boolean, :default => true
45 preference :allow_ssl_in_staging, :boolean, :default => true
46 preference :allow_ssl_in_development_and_test, :boolean, :default => false
47 preference :allow_guest_checkout, :boolean, :default => true
48 preference :alternative_billing_phone, :boolean, :default => false # Request extra phone for bill addr
49 preference :alternative_shipping_phone, :boolean, :default => false # Request extra phone for ship addr
50 preference :shipping_instructions, :boolean, :default => false # Request instructions/info for shipping
51 preference :show_price_inc_vat, :boolean, :default => false
52 preference :shipment_inc_vat, :boolean, :default => false
53 preference :auto_capture, :boolean, :default => false # automatically capture the creditcard (as opposed to just authorize and capture later)
54 preference :address_requires_state, :boolean, :default => true # should state/state_name be required
55 preference :checkout_zone, :string, :default => nil # replace with the name of a zone if you would like to limit the countries
56 preference :always_put_site_name_in_title, :boolean, :default => true
57 preference :cache_static_content, :boolean, :default => true
58 preference :use_content_controller, :boolean, :default => true
59 preference :allow_checkout_on_gateway_error, :boolean, :default => false
60 preference :select_taxons_from_tree, :boolean, :default => false # provide opportunity to select taxons from tree instead of search with autocomplete
61 preference :max_level_in_taxons_menu, :integer, :default => 1 # maximum nesting level in taxons menu
62 preference :check_for_spree_alerts, :boolean, :default => true
63 preference :dismissed_spree_alerts, :string, :default => ''
64 preference :last_check_for_spree_alerts, :string, :default => nil
07c4bdc @BDQ Adds :track_inventory_levels preference which disable inventory track…
BDQ authored
65
a4a57db @cmar Preferences Rewrite - always reading from cache, only persisting when…
cmar authored
66 # searcher_class allows spree extension writers to provide their own Search class
67 def searcher_class
68 @searcher_class ||= Spree::Core::Search::Base
69 end
70
71 def searcher_class=(sclass)
72 @searcher_class = sclass
73 end
07c4bdc @BDQ Adds :track_inventory_levels preference which disable inventory track…
BDQ authored
74
4187a84 @schof Added module Spree to core models
schof authored
75 end
a4a57db @cmar Preferences Rewrite - always reading from cache, only persisting when…
cmar authored
76
e30f2fb @BDQ Initial refactoring and specs for inventory_units
BDQ authored
77 end
Something went wrong with that request. Please try again.