Есть мод. annytabcookieconsentv
выводит сообщение о куки
но он выводится внутри контента, и по иерархии ин ниже некоторых панелей.
мне нужно вывести его перед закрывающим body
как это сделать правильно?
<?xml version="1.0" encoding="utf-8"?>
<modification>
<name>Annytab Cookie Consent</name>
<version>1.0.2</version>
<author>A Name Not Yet Taken AB</author>
<link>https://www.annytab.com</link>
<code>annytab_cookie_consent</code>
<description>An cookie consent extension to comply with EU Cookie Law, CCPA, GDPR and other privacy laws.</description>
<!-- Insert styles, scripts and html -->
<file path="catalog/controller/common/content_bottom.php" error="log">
<operation>
<search trim="true"><![CDATA[return $this->load->view('common/content_bottom', $data);]]></search>
<add position="before"><![CDATA[
// Annytab Cookie Consent
$this->load->language('common/annytab_cookie_consent');
$this->document->addStyle('catalog/view/javascript/annytab/scripts/css/annytab_cookie_consent.min.css');
$this->document->addScript('catalog/view/javascript/annytab/scripts/js/annytab_cookie_consent.min.js', 'footer');
array_push($data['modules'], $this->load->view('common/annytab_cookie_consent', null));
]]></add>
</operation>
</file>
</modification>
вот js
var annytab = annytab || {};
annytab.cookies = (function () {
'use_strict';
// Run when the document is ready
document.addEventListener('DOMContentLoaded', function() {
if (getCookie('CookieConsent') === null) {
$('.annytab-cookie-consent').fadeIn(200);
}
}, false);
// Set a cookie
function setCookie(key, value, days) {
var expires = new Date();
expires.setTime(expires.getTime() + (days * 24 * 60 * 60 * 1000));
document.cookie = key + '=' + value + ';expires=' + expires.toUTCString();
} // End of the setCookie method
// Get a cookie
function getCookie(key) {
var keyValue = document.cookie.match('(^|;) ?' + key + '=([^;]*)(;|$)');
return keyValue ? keyValue[2] : null;
} // End of getCookie method
// Public methods
return {
// Set cookie consent
setCookieConsent: function () {
setCookie('CookieConsent', true, 360);
$('.annytab-cookie-consent').fadeOut(200);
} // End of the setCookieConsent method
};
})();