Add admin option to require shoppers agree to TOS

This switch doesn't have any effect yet. We need to implement it in the
checkout.
This commit is contained in:
Maikel Linke
2021-02-25 16:55:51 +11:00
parent 05a074d33a
commit ba9de403e6
3 changed files with 5 additions and 0 deletions

View File

@@ -113,6 +113,7 @@ module Spree
# Legal Preferences
preference :footer_tos_url, :string, default: "/Terms-of-service.pdf"
preference :enterprises_require_tos, :boolean, default: false
preference :shoppers_require_tos, :boolean, default: false
preference :privacy_policy_url, :string, default: nil
preference :cookies_consent_banner_toggle, :boolean, default: false
preference :cookies_policy_matomo_section, :boolean, default: false

View File

@@ -32,6 +32,9 @@
.field
= preference_field_tag(:enterprises_require_tos, Spree::Config[:enterprises_require_tos], :type => Spree::Config.preference_type(:enterprises_require_tos))
= label_tag(:enterprises_require_tos, t('.enterprises_require_tos')) + tag(:br)
.field
= preference_field_tag(:shoppers_require_tos, Spree::Config[:shoppers_require_tos], :type => Spree::Config.preference_type(:shoppers_require_tos))
= label_tag(:shoppers_require_tos, t('.shoppers_require_tos')) + tag(:br)
.field
= preference_field_tag(:cookies_consent_banner_toggle, Spree::Config[:cookies_consent_banner_toggle], :type => Spree::Config.preference_type(:cookies_consent_banner_toggle))
= label_tag(:cookies_consent_banner_toggle, t('.cookies_consent_banner_toggle')) + tag(:br)

View File

@@ -3582,6 +3582,7 @@ See the %{link} to find out more about %{sitename}'s features and to start using
cookies_consent_banner_toggle: "Display cookies consent banner"
privacy_policy_url: "Privacy Policy URL"
enterprises_require_tos: "Enterprises must accept Terms of Service"
shoppers_require_tos: "Shoppers must accept Terms of Service"
cookies_policy_matomo_section: "Display Matomo section on cookies policy page"
footer_tos_url: "Terms of Service URL"
checkout: