Class: Spree::AppConfiguration

Inherits:
Preferences::Configuration show all
Defined in:
app/models/spree/app_configuration.rb

Constant Summary collapse

DEPRECATED_STORE_PREFERENCES =

all the following can be deprecated when store prefs are no longer supported

{
  site_name: :name,
  site_url: :url,
  default_meta_description: :meta_description,
  default_meta_keywords: :meta_keywords,
  default_seo_title: :seo_title,
}

Instance Attribute Summary collapse

Attributes inherited from Preferences::Configuration

#preference_store

Instance Method Summary collapse

Methods inherited from Preferences::Configuration

#configure, preference, #reset, #set, #use_static_preferences!

Methods included from Preferences::Preferable

#default_preferences, #defined_preferences, #get_preference, #has_preference!, #has_preference?, #preference_default, #preference_type, #set_preference

Instance Attribute Details

#address_requires_stateBoolean



27
# File 'app/models/spree/app_configuration.rb', line 27

preference :address_requires_state, :boolean, default: true

#admin_interface_logoString



31
# File 'app/models/spree/app_configuration.rb', line 31

preference :admin_interface_logo, :string, default: 'logo/solidus_logo.png'

#admin_products_per_pageInteger



35
# File 'app/models/spree/app_configuration.rb', line 35

preference :admin_products_per_page, :integer, default: 10

#admin_variants_per_pageInteger



39
# File 'app/models/spree/app_configuration.rb', line 39

preference :admin_variants_per_page, :integer, default: 20

#allow_checkout_on_gateway_errorBoolean



43
# File 'app/models/spree/app_configuration.rb', line 43

preference :allow_checkout_on_gateway_error, :boolean, default: false

#allow_guest_checkoutBoolean



47
# File 'app/models/spree/app_configuration.rb', line 47

preference :allow_guest_checkout, :boolean, default: true

#allow_return_item_amount_editingBoolean



51
# File 'app/models/spree/app_configuration.rb', line 51

preference :allow_return_item_amount_editing, :boolean, default: false

#alternative_billing_phoneBoolean



55
# File 'app/models/spree/app_configuration.rb', line 55

preference :alternative_billing_phone, :boolean, default: false

#alternative_shipping_phoneBoolean



59
# File 'app/models/spree/app_configuration.rb', line 59

preference :alternative_shipping_phone, :boolean, default: false

#always_put_site_name_in_titleBoolean



63
# File 'app/models/spree/app_configuration.rb', line 63

preference :always_put_site_name_in_title, :boolean, default: true

#auto_captureBoolean

Note:

Setting this to true is not recommended. Performing an authorize and later capture has far superior error handing. VISA and MasterCard also require that shipments are sent within a certain time of the card being charged.

Returns Perform a sale/purchase transaction at checkout instead of a authorize and capture.



71
# File 'app/models/spree/app_configuration.rb', line 71

preference :auto_capture, :boolean, default: false

#auto_capture_exchangesBoolean



75
# File 'app/models/spree/app_configuration.rb', line 75

preference :auto_capture_exchanges, :boolean, default: false

#binary_inventory_cacheBoolean

Only invalidate product caches when they change from in stock to out of stock. By default, caches are invalidated on any change of inventory quantity. Setting this to true should make operations on inventory faster. (default: false)



84
# File 'app/models/spree/app_configuration.rb', line 84

preference :binary_inventory_cache, :boolean, default: false

#checkout_zoneString



88
# File 'app/models/spree/app_configuration.rb', line 88

preference :checkout_zone, :string, default: nil

#companyBoolean



92
# File 'app/models/spree/app_configuration.rb', line 92

preference :company, :boolean, default: false

#create_rma_for_unreturned_exchangeBoolean



96
# File 'app/models/spree/app_configuration.rb', line 96

preference :create_rma_for_unreturned_exchange, :boolean, default: false

#credit_to_new_allocationBoolean



225
# File 'app/models/spree/app_configuration.rb', line 225

preference :credit_to_new_allocation, :boolean, default: false

#currencyString

Currency to use by default when not defined on the site (default: “USD”)



101
# File 'app/models/spree/app_configuration.rb', line 101

preference :currency, :string, default: "USD"

#customer_returns_per_pageInteger



166
# File 'app/models/spree/app_configuration.rb', line 166

preference :customer_returns_per_page, :integer, default: 15

#default_country_idInteger?

Deprecated.

Returns id of Country to be selected by default in dropdowns (default: nil).



106
# File 'app/models/spree/app_configuration.rb', line 106

preference :default_country_id, :integer

#expedited_exchangesBoolean

Note:

this requires payment profiles to be supported on your gateway of choice as well as a delayed job handler to be configured with activejob.

Kicks off an exchange shipment upon return authorization save. charge customer if they do not return items within timely manner.



115
# File 'app/models/spree/app_configuration.rb', line 115

preference :expedited_exchanges, :boolean, default: false

#expedited_exchanges_days_windowInteger



121
# File 'app/models/spree/app_configuration.rb', line 121

preference :expedited_exchanges_days_window, :integer, default: 14

#layoutString



125
# File 'app/models/spree/app_configuration.rb', line 125

preference :layout, :string, default: 'spree/layouts/spree_application'

#logoString



129
# File 'app/models/spree/app_configuration.rb', line 129

preference :logo, :string, default: 'logo/solidus_logo.png'

#mails_fromString



219
# File 'app/models/spree/app_configuration.rb', line 219

preference :mails_from, :string, :default => '[email protected]'

#max_level_in_taxons_menuInteger



142
# File 'app/models/spree/app_configuration.rb', line 142

preference :max_level_in_taxons_menu, :integer, default: 1

#order_bill_address_usedBoolean

bill addresses on payment sources. (default: true)



134
# File 'app/models/spree/app_configuration.rb', line 134

preference :order_bill_address_used, :boolean, default: true

#order_capturing_time_windowInteger



138
# File 'app/models/spree/app_configuration.rb', line 138

preference :order_capturing_time_window, :integer, default: 14

#order_mutex_max_ageInteger



146
# File 'app/models/spree/app_configuration.rb', line 146

preference :order_mutex_max_age, :integer, default: 120

#orders_per_pageInteger



150
# File 'app/models/spree/app_configuration.rb', line 150

preference :orders_per_page, :integer, default: 15

#products_per_pageInteger



158
# File 'app/models/spree/app_configuration.rb', line 158

preference :products_per_page, :integer, default: 12

#promotions_per_pageInteger



162
# File 'app/models/spree/app_configuration.rb', line 162

preference :promotions_per_page, :integer, default: 15

#properties_per_pageInteger



154
# File 'app/models/spree/app_configuration.rb', line 154

preference :properties_per_page, :integer, default: 15

#require_master_priceBoolean



170
# File 'app/models/spree/app_configuration.rb', line 170

preference :require_master_price, :boolean, default: true

#require_payment_to_shipBoolean



174
# File 'app/models/spree/app_configuration.rb', line 174

preference :require_payment_to_ship, :boolean, default: true

#return_eligibility_number_of_daysInteger



178
# File 'app/models/spree/app_configuration.rb', line 178

preference :return_eligibility_number_of_days, :integer, default: 365

#searcher_classObject



229
230
231
# File 'app/models/spree/app_configuration.rb', line 229

def searcher_class
  @searcher_class ||= Spree::Core::Search::Base
end

#send_core_emailsBoolean



215
# File 'app/models/spree/app_configuration.rb', line 215

preference :send_core_emails, :boolean, default: true

#shipping_instructionsBoolean



182
# File 'app/models/spree/app_configuration.rb', line 182

preference :shipping_instructions, :boolean, default: false

#show_only_complete_orders_by_defaultBoolean



186
# File 'app/models/spree/app_configuration.rb', line 186

preference :show_only_complete_orders_by_default, :boolean, default: true

#show_products_without_priceBoolean



194
# File 'app/models/spree/app_configuration.rb', line 194

preference :show_products_without_price, :boolean, default: false

#show_raw_product_descriptionBoolean



198
# File 'app/models/spree/app_configuration.rb', line 198

preference :show_raw_product_description, :boolean, :default => false

#show_variant_full_priceBoolean



190
# File 'app/models/spree/app_configuration.rb', line 190

preference :show_variant_full_price, :boolean, default: false

#tax_using_ship_addressBoolean



202
# File 'app/models/spree/app_configuration.rb', line 202

preference :tax_using_ship_address, :boolean, default: true

#track_inventory_levelsObject

Determines whether to track on_hand values for variants / products. If you do not track inventory, or have effectively unlimited inventory for all products you can turn this on.



209
# File 'app/models/spree/app_configuration.rb', line 209

preference :track_inventory_levels, :boolean, default: true

Instance Method Details

#static_model_preferencesObject



233
234
235
# File 'app/models/spree/app_configuration.rb', line 233

def static_model_preferences
  @static_model_preferences ||= Spree::Preferences::StaticModelPreferences.new
end