Ajout du module RGPD Cookie
This commit is contained in:
17
modules/lgcookieslaw/upgrade/Upgrade-1.4.0.php
Normal file
17
modules/lgcookieslaw/upgrade/Upgrade-1.4.0.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
/**
|
||||
* Please read the terms of the CLUF license attached to this module(cf "licences" folder)
|
||||
*
|
||||
* @author Línea Gráfica E.C.E. S.L.
|
||||
* @copyright Lineagrafica.es - Línea Gráfica E.C.E. S.L. all rights reserved.
|
||||
* @license https://www.lineagrafica.es/licenses/license_en.pdf
|
||||
* https://www.lineagrafica.es/licenses/license_es.pdf
|
||||
* https://www.lineagrafica.es/licenses/license_fr.pdf
|
||||
*/
|
||||
|
||||
function upgrade_module_1_4_0($module)
|
||||
{
|
||||
$module->registerHook('top');
|
||||
$module->registerHook('header');
|
||||
return true;
|
||||
}
|
||||
106
modules/lgcookieslaw/upgrade/index.php
Normal file
106
modules/lgcookieslaw/upgrade/index.php
Normal file
@@ -0,0 +1,106 @@
|
||||
<?php
|
||||
|
||||
|
||||
/*
|
||||
|
||||
|
||||
* 2007-2012 PrestaShop
|
||||
|
||||
|
||||
*
|
||||
|
||||
|
||||
* NOTICE OF LICENSE
|
||||
|
||||
|
||||
*
|
||||
|
||||
|
||||
* This source file is subject to the Open Software License (OSL 3.0)
|
||||
|
||||
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
|
||||
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
|
||||
|
||||
* http://opensource.org/licenses/osl-3.0.php
|
||||
|
||||
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
|
||||
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
|
||||
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
|
||||
|
||||
*
|
||||
|
||||
|
||||
* DISCLAIMER
|
||||
|
||||
|
||||
*
|
||||
|
||||
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
|
||||
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
|
||||
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
|
||||
|
||||
*
|
||||
|
||||
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
|
||||
|
||||
* @copyright 2007-2012 PrestaShop SA
|
||||
|
||||
|
||||
* @version Release: $Revision: 14011 $
|
||||
|
||||
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
|
||||
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
|
||||
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
|
||||
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
|
||||
|
||||
header("Pragma: no-cache");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
header("Location: ../");
|
||||
|
||||
|
||||
exit;
|
||||
16
modules/lgcookieslaw/upgrade/upgrade-1.4.12.php
Normal file
16
modules/lgcookieslaw/upgrade/upgrade-1.4.12.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
/**
|
||||
* Please read the terms of the CLUF license attached to this module(cf "licences" folder)
|
||||
*
|
||||
* @author Línea Gráfica E.C.E. S.L.
|
||||
* @copyright Lineagrafica.es - Línea Gráfica E.C.E. S.L. all rights reserved.
|
||||
* @license https://www.lineagrafica.es/licenses/license_en.pdf
|
||||
* https://www.lineagrafica.es/licenses/license_es.pdf
|
||||
* https://www.lineagrafica.es/licenses/license_fr.pdf
|
||||
*/
|
||||
|
||||
function upgrade_module_1_4_12($module)
|
||||
{
|
||||
$module->registerHook('displayCustomerAccount');
|
||||
return true;
|
||||
}
|
||||
16
modules/lgcookieslaw/upgrade/upgrade-1.4.14.php
Normal file
16
modules/lgcookieslaw/upgrade/upgrade-1.4.14.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
/**
|
||||
* Please read the terms of the CLUF license attached to this module(cf "licences" folder)
|
||||
*
|
||||
* @author Línea Gráfica E.C.E. S.L.
|
||||
* @copyright Lineagrafica.es - Línea Gráfica E.C.E. S.L. all rights reserved.
|
||||
* @license https://www.lineagrafica.es/licenses/license_en.pdf
|
||||
* https://www.lineagrafica.es/licenses/license_es.pdf
|
||||
* https://www.lineagrafica.es/licenses/license_fr.pdf
|
||||
*/
|
||||
|
||||
function upgrade_module_1_4_14($module)
|
||||
{
|
||||
$module->registerHook('displayMobileTop');
|
||||
return true;
|
||||
}
|
||||
16
modules/lgcookieslaw/upgrade/upgrade-1.4.16.php
Normal file
16
modules/lgcookieslaw/upgrade/upgrade-1.4.16.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
/**
|
||||
* Please read the terms of the CLUF license attached to this module(cf "licences" folder)
|
||||
*
|
||||
* @author Línea Gráfica E.C.E. S.L.
|
||||
* @copyright Lineagrafica.es - Línea Gráfica E.C.E. S.L. all rights reserved.
|
||||
* @license https://www.lineagrafica.es/licenses/license_en.pdf
|
||||
* https://www.lineagrafica.es/licenses/license_es.pdf
|
||||
* https://www.lineagrafica.es/licenses/license_fr.pdf
|
||||
*/
|
||||
|
||||
function upgrade_module_1_4_16($module)
|
||||
{
|
||||
$module->registerHook('displayBackofficeHeader');
|
||||
return true;
|
||||
}
|
||||
87
modules/lgcookieslaw/upgrade/upgrade-1.4.21.php
Normal file
87
modules/lgcookieslaw/upgrade/upgrade-1.4.21.php
Normal file
@@ -0,0 +1,87 @@
|
||||
<?php
|
||||
/**
|
||||
* Please read the terms of the CLUF license attached to this module(cf "licences" folder)
|
||||
*
|
||||
* @author Línea Gráfica E.C.E. S.L.
|
||||
* @copyright Lineagrafica.es - Línea Gráfica E.C.E. S.L. all rights reserved.
|
||||
* @license https://www.lineagrafica.es/licenses/license_en.pdf
|
||||
* https://www.lineagrafica.es/licenses/license_es.pdf
|
||||
* https://www.lineagrafica.es/licenses/license_fr.pdf
|
||||
*/
|
||||
|
||||
function upgrade_module_1_4_21($module)
|
||||
{
|
||||
$sql = array(
|
||||
'ALTER TABLE `'._DB_PREFIX_.'lgcookieslaw_lang` ADD `required` TEXT NOT NULL',
|
||||
'ALTER TABLE `'._DB_PREFIX_.'lgcookieslaw_lang` ADD `additional` TEXT NOT NULL'
|
||||
);
|
||||
foreach ($sql as $q) {
|
||||
Db::getInstance()->execute($q);
|
||||
}
|
||||
$messages = array(
|
||||
'en' => array(
|
||||
'required' => '<ul>
|
||||
<li>Necessary to navigate this site and use its functions.</li>
|
||||
<li>Identify you as a user and store your preferences such as language and currency.</li>
|
||||
<li>Customize your experience based on your browsing.</li>
|
||||
</ul>',
|
||||
'additional' => '<ul>
|
||||
<li>Third-party cookies for analytical purposes.</li>
|
||||
<li>Show personalized recommendations based on your browsing on other sites.</li>
|
||||
<li>Show custom campaigns on other websites.</li>
|
||||
</ul>',
|
||||
),
|
||||
'es' => array(
|
||||
'required' => '<ul>
|
||||
<li>Necesarias para navegar en este sitio y utilizar sus funciones.</li>
|
||||
<li>Identificarle como usuario y almacenar sus preferencias como idioma y moneda.</li>
|
||||
<li>Personalizar su experiencia en base con su navegación.</li>
|
||||
</ul>',
|
||||
'additional' => '<ul>
|
||||
<li>Cookies de terceros con propósitos analíticos.</li>
|
||||
<li>Mostrar recomendaciones personalizadas basadas en su navegación en otros sitios.</li>
|
||||
<li>Mostrar campañas personalizadas en otras sitios web.</li>
|
||||
</ul>',
|
||||
),
|
||||
'fr' => array(
|
||||
'required' => '<ul>
|
||||
<li>Nécessaire pour naviguer sur ce site et utiliser ses fonctions.</li>
|
||||
<li>Vous identifier en tant qu\'utilisateur et enregistrer vos préférences telles que la langue et la devise.</li>
|
||||
<li>Personnalisez votre expérience en fonction de votre navigation.</li>
|
||||
</ul> ',
|
||||
'additional' => '<ul>
|
||||
<li>Cookies tiers à des fins d\'analyse.</li>
|
||||
<li>Afficher des recommandations personnalisées en fonction de votre navigation sur d\'autres sites</li>
|
||||
<li>Afficher des campagnes personnalisées sur d\'autres sites Web</li>
|
||||
</ul> ',
|
||||
),
|
||||
'it' => array(
|
||||
'required' => '<ul>
|
||||
<li>Necessario per navigare in questo sito e utilizzare le sue funzioni.</li>
|
||||
<li>Identificarti come utente e memorizzare le tue preferenze come lingua e valuta.</li>
|
||||
<li>Personalizza la tua esperienza in base alla tua navigazione.</li>
|
||||
</ul>',
|
||||
'additional' => '<ul>
|
||||
<li>Cookie di terze parti per scopi analitici.</li>
|
||||
<li>Mostra consigli personalizzati basati sulla tua navigazione su altri siti.</li>
|
||||
<li>Mostra campagne personalizzate su altri siti web.</li>
|
||||
</ul>',
|
||||
),
|
||||
);
|
||||
$languages = Language::getLanguages();
|
||||
foreach ($languages as $language) {
|
||||
if (isset($messages[$language['iso_code']])) {
|
||||
$message = $messages[$language['iso_code']];
|
||||
} else {
|
||||
$message = $messages['en'];
|
||||
}
|
||||
|
||||
Db::getInstance()->Execute(
|
||||
'UPDATE `'._DB_PREFIX_.'lgcookieslaw_lang` SET
|
||||
`required` = "'.pSQL($message['required'], 'html').'",
|
||||
`additional` = "'.pSQL($message['additional'], 'html').'"
|
||||
WHERE `id_lang` = '. (int)$language['id_lang']
|
||||
);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
Reference in New Issue
Block a user