This repository has been archived by the owner on Oct 4, 2023. It is now read-only.
/
spree.rb
101 lines (76 loc) · 3.02 KB
/
spree.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# Configure Solidus Preferences
# See http://docs.solidus.io/Spree/AppConfiguration.html for details
Spree.config do |config|
# Core:
# Default currency for new sites
config.currency = "USD"
# from address for transactional emails
config.mails_from = "store@example.com"
# Uncomment to stop tracking inventory levels in the application
# config.track_inventory_levels = false
# When set, product caches are only invalidated when they fall below or rise
# above the inventory_cache_threshold that is set. Default is to invalidate cache on
# any inventory changes.
# config.inventory_cache_threshold = 3
# Enable Paperclip adapter for attachments on images and taxons
config.image_attachment_module = 'Spree::Image::PaperclipAttachment'
config.taxon_attachment_module = 'Spree::Taxon::PaperclipAttachment'
# Permission Sets:
# Uncomment and customize the following line to add custom permission sets
# to a custom users role:
# config.roles.assign_permissions :role_name, ['Spree::PermissionSets::CustomPermissionSet']
# Frontend:
# Custom logo for the frontend
# config.logo = "logo/solidus.svg"
# Template to use when rendering layout
# config.layout = "spree/layouts/spree_application"
# Admin:
# Custom logo for the admin
# config.admin_interface_logo = "logo/solidus.svg"
# Gateway credentials can be configured statically here and referenced from
# the admin. They can also be fully configured from the admin.
#
# Please note that you need to use the solidus_stripe gem to have
# Stripe working: https://github.com/solidusio-contrib/solidus_stripe
#
# config.static_model_preferences.add(
# Spree::PaymentMethod::StripeCreditCard,
# 'stripe_env_credentials',
# secret_key: ENV['STRIPE_SECRET_KEY'],
# publishable_key: ENV['STRIPE_PUBLISHABLE_KEY'],
# server: Rails.env.production? ? 'production' : 'test',
# test_mode: !Rails.env.production?
# )
end
SolidusStarterFrontend::Config.configure do |config|
config.locale = 'en'
end
Spree::Backend::Config.configure do |config|
config.locale = 'en'
# Uncomment and change the following configuration if you want to add
# a new menu item:
#
# config.menu_items << config.class::MenuItem.new(
# [:section],
# 'icon-name',
# url: 'https://solidus.io/'
# )
end
Spree::Api::Config.configure do |config|
config.requires_authentication = true
end
Spree.user_class = "Spree::LegacyUser"
# If you want to add a field to the whitelisted ransackable attributes,
# just uncomment the following code and change it as you need.
#
# Spree::Model.whitelisted_ransackable_attributes << 'field'
# Rules for avoiding to store the current path into session for redirects
# When at least one rule is matched, the request path will not be stored
# in session.
# You can add your custom rules by uncommenting this line and changing
# the class name:
#
# Spree::UserLastUrlStorer.rules << 'Spree::UserLastUrlStorer::Rules::AuthenticationRule'
def (Spree::Config).pricing_options_class
SolidusDemo::PricingOptions
end