diff --git a/app/helpers/terms_and_conditions_helper.rb b/app/helpers/terms_and_conditions_helper.rb index ce53ac3ed9..35232da157 100644 --- a/app/helpers/terms_and_conditions_helper.rb +++ b/app/helpers/terms_and_conditions_helper.rb @@ -17,11 +17,11 @@ module TermsAndConditionsHelper end def platform_terms_required? - Spree::Config.shoppers_require_tos + TermsOfService.platform_terms_required? end def terms_and_conditions_activated? - current_order.distributor.terms_and_conditions.file? + TermsOfService.terms_and_conditions_activated?(current_order.distributor) end def all_terms_and_conditions_already_accepted? diff --git a/app/services/terms_of_service.rb b/app/services/terms_of_service.rb index dc84b14988..32ca768d0c 100644 --- a/app/services/terms_of_service.rb +++ b/app/services/terms_of_service.rb @@ -10,4 +10,12 @@ class TermsOfService TermsOfServiceFile.updated_at end end + + def self.platform_terms_required? + Spree::Config.shoppers_require_tos + end + + def self.terms_and_conditions_activated?(distributor) + distributor.terms_and_conditions.file? + end end