Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

Add Spree Digital Asset Configurations

Matthew Kennedyf529e8113fc2
diff --git a/core/app/models/spree/app_configuration.rb b/core/app/models/spree/app_configuration.rb
index f707fb2218..0079db88b8 100644
--- a/core/app/models/spree/app_configuration.rb
+++ b/core/app/models/spree/app_configuration.rb
@@ -81,6 +81,12 @@ module Spree
preference :storefront_taxons_path, :string, default: 't'
preference :storefront_pages_path, :string, default: 'pages'
+ # Spree Digital Asset Configurations
+ preference :authorized_clicks, :integer, default: 3 # number of times a customer can download a digital file
+ preference :authorized_days, :integer, default: 2 # number of days after initial purchase the customer can download a file
+ preference :keep_digitals, :boolean, default: false # should digitals be kept around after the associated product is destroyed
+ preference :s3_expiration_seconds, :integer, default: 10 # number of seconds before an s3 link expires
+
attr_writer :searcher_class
end
end