From 3cd53cbd41267883721039fe405e431d9e1322a5 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Bellet Date: Wed, 24 May 2023 10:45:06 +0200 Subject: [PATCH] Adds some keys to this cached element, due to cookie banner Once the user accept the cookie, we should not show the cookie banner element. This is handled via `app/helpers/footer_links_helper.rb#cookies_policy_link` and boolean: ``` !Web::CookiesConsent.new(cookies, request.host).exists? && Spree::Config.cookies_consent_banner_toggle ``` --- app/views/shared/_footer.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/shared/_footer.html.haml b/app/views/shared/_footer.html.haml index a4f1f3a3e4..bed768751c 100644 --- a/app/views/shared/_footer.html.haml +++ b/app/views/shared/_footer.html.haml @@ -96,7 +96,7 @@ %hr.hr-light %br - = cache_with_locale [ContentConfig.cache_key, TermsOfServiceFile.current_url, Spree::Config.privacy_policy_url] do + = cache_with_locale [ContentConfig.cache_key, TermsOfServiceFile.current_url, Spree::Config.privacy_policy_url, Spree::Config.cookies_consent_banner_toggle, Web::CookiesConsent.new(cookies, request.host)] do .row.legal .small-12.medium-3.medium-offset-2.columns.text-left %a{href: main_app.root_path}