diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 1cdc7633..54c75b23 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -7,39 +7,17 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -227,7 +205,7 @@
-
+ 1602059851601
@@ -355,7 +333,14 @@
1604230399915
-
+
+ 1604393390947
+
+
+
+ 1604393390947
+
+
@@ -366,7 +351,19 @@
@@ -395,7 +392,8 @@
-
+
+
@@ -410,10 +408,10 @@
-
+
-
+
@@ -487,10 +485,10 @@
-
+
-
+
diff --git a/modules/lgcookieslaw/Readme.md b/modules/lgcookieslaw/Readme.md
new file mode 100644
index 00000000..7fc0291d
--- /dev/null
+++ b/modules/lgcookieslaw/Readme.md
@@ -0,0 +1,11 @@
+ENGLISH
+Go to the "readme" folder and open the "readme_en.pdf" file
+
+FRANÇAIS
+Allez dans le dossier "readme" et ouvrez le fichier "readme_fr.pdf"
+
+ESPAÑOL
+Ve a la carpeta "readme" y abre el archivo "readme_es.pdf"
+
+ITALIANO
+Vai alla cartella "readme" e aprire il file " readme_it.pdf "
\ No newline at end of file
diff --git a/modules/lgcookieslaw/backward_compatibility/Context.php b/modules/lgcookieslaw/backward_compatibility/Context.php
new file mode 100644
index 00000000..5f1f3604
--- /dev/null
+++ b/modules/lgcookieslaw/backward_compatibility/Context.php
@@ -0,0 +1,347 @@
+
+* @copyright 2007-2014 PrestaShop SA
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+if ((bool)Configuration::get('PS_MOBILE_DEVICE'))
+ require_once(_PS_MODULE_DIR_ . '/mobile_theme/Mobile_Detect.php');
+
+// Retro 1.3, 'class_exists' cause problem with autoload...
+if (version_compare(_PS_VERSION_, '1.4', '<'))
+{
+ // Not exist for 1.3
+ class Shop extends ObjectModel
+ {
+ public $id = 1;
+ public $id_shop_group = 1;
+
+ public function __construct()
+ {
+ }
+
+
+ public static function getShops()
+ {
+ return array(
+ array('id_shop' => 1, 'name' => 'Default shop')
+ );
+ }
+
+ public static function getCurrentShop()
+ {
+ return 1;
+ }
+ }
+
+ class Logger
+ {
+ public static function AddLog($message, $severity = 2)
+ {
+ $fp = fopen(dirname(__FILE__).'/../logs.txt', 'a+');
+ fwrite($fp, '['.(int)$severity.'] '.Tools::safeOutput($message));
+ fclose($fp);
+ }
+ }
+
+}
+
+// Not exist for 1.3 and 1.4
+class Context
+{
+ /**
+ * @var Context
+ */
+ protected static $instance;
+
+ /**
+ * @var Cart
+ */
+ public $cart;
+
+ /**
+ * @var Customer
+ */
+ public $customer;
+
+ /**
+ * @var Cookie
+ */
+ public $cookie;
+
+ /**
+ * @var Link
+ */
+ public $link;
+
+ /**
+ * @var Country
+ */
+ public $country;
+
+ /**
+ * @var Employee
+ */
+ public $employee;
+
+ /**
+ * @var Controller
+ */
+ public $controller;
+
+ /**
+ * @var Language
+ */
+ public $language;
+
+ /**
+ * @var Currency
+ */
+ public $currency;
+
+ /**
+ * @var AdminTab
+ */
+ public $tab;
+
+ /**
+ * @var Shop
+ */
+ public $shop;
+
+ /**
+ * @var Smarty
+ */
+ public $smarty;
+
+ /**
+ * @ var Mobile Detect
+ */
+ public $mobile_detect;
+
+ /**
+ * @var boolean|string mobile device of the customer
+ */
+ protected $mobile_device;
+
+ public function __construct()
+ {
+ global $cookie, $cart, $smarty, $link;
+
+ $this->tab = null;
+
+ $this->cookie = $cookie;
+ $this->cart = $cart;
+ $this->smarty = $smarty;
+ $this->link = $link;
+
+ $this->controller = new ControllerBackwardModule();
+ if (is_object($cookie))
+ {
+ $this->currency = new Currency((int)$cookie->id_currency);
+ $this->language = new Language((int)$cookie->id_lang);
+ $this->country = new Country((int)$cookie->id_country);
+ $this->customer = new CustomerBackwardModule((int)$cookie->id_customer);
+ $this->employee = new Employee((int)$cookie->id_employee);
+ }
+ else
+ {
+ $this->currency = null;
+ $this->language = null;
+ $this->country = null;
+ $this->customer = null;
+ $this->employee = null;
+ }
+
+ $this->shop = new ShopBackwardModule();
+
+ if ((bool)Configuration::get('PS_MOBILE_DEVICE'))
+ $this->mobile_detect = new Mobile_Detect();
+ }
+
+ public function getMobileDevice()
+ {
+ if (is_null($this->mobile_device))
+ {
+ $this->mobile_device = false;
+ if ($this->checkMobileContext())
+ {
+ switch ((int)Configuration::get('PS_MOBILE_DEVICE'))
+ {
+ case 0: // Only for mobile device
+ if ($this->mobile_detect->isMobile() && !$this->mobile_detect->isTablet())
+ $this->mobile_device = true;
+ break;
+ case 1: // Only for touchpads
+ if ($this->mobile_detect->isTablet() && !$this->mobile_detect->isMobile())
+ $this->mobile_device = true;
+ break;
+ case 2: // For touchpad or mobile devices
+ if ($this->mobile_detect->isMobile() || $this->mobile_detect->isTablet())
+ $this->mobile_device = true;
+ break;
+ }
+ }
+ }
+
+ return $this->mobile_device;
+ }
+
+ protected function checkMobileContext()
+ {
+ return isset($_SERVER['HTTP_USER_AGENT'])
+ && (bool)Configuration::get('PS_MOBILE_DEVICE')
+ && !Context::getContext()->cookie->no_mobile;
+ }
+
+ /**
+ * Get a singleton context
+ *
+ * @return Context
+ */
+ public static function getContext()
+ {
+ if (!isset(self::$instance))
+ self::$instance = new Context();
+ return self::$instance;
+ }
+
+ /**
+ * Clone current context
+ *
+ * @return Context
+ */
+ public function cloneContext()
+ {
+ return clone($this);
+ }
+
+ /**
+ * @return int Shop context type (Shop::CONTEXT_ALL, etc.)
+ */
+ public static function shop()
+ {
+ if (!self::$instance->shop->getContextType())
+ return ShopBackwardModule::CONTEXT_ALL;
+ return self::$instance->shop->getContextType();
+ }
+}
+
+/**
+ * Class Shop for Backward compatibility
+ */
+class ShopBackwardModule extends Shop
+{
+ const CONTEXT_ALL = 1;
+
+ public $id = 1;
+ public $id_shop_group = 1;
+
+
+ public function getContextType()
+ {
+ return ShopBackwardModule::CONTEXT_ALL;
+ }
+
+ // Simulate shop for 1.3 / 1.4
+ public function getID()
+ {
+ return 1;
+ }
+
+ /**
+ * Get shop theme name
+ *
+ * @return string
+ */
+ public function getTheme()
+ {
+ return _THEME_NAME_;
+ }
+
+ public function isFeatureActive()
+ {
+ return false;
+ }
+}
+
+/**
+ * Class Controller for a Backward compatibility
+ * Allow to use method declared in 1.5
+ */
+class ControllerBackwardModule
+{
+ /**
+ * @param $js_uri
+ * @return void
+ */
+ public function addJS($js_uri)
+ {
+ Tools::addJS($js_uri);
+ }
+
+ /**
+ * @param $css_uri
+ * @param string $css_media_type
+ * @return void
+ */
+ public function addCSS($css_uri, $css_media_type = 'all')
+ {
+ Tools::addCSS($css_uri, $css_media_type);
+ }
+
+ public function addJquery()
+ {
+ if (_PS_VERSION_ < '1.5')
+ $this->addJS(_PS_JS_DIR_.'jquery/jquery-1.4.4.min.js');
+ elseif (_PS_VERSION_ >= '1.5')
+ $this->addJS(_PS_JS_DIR_.'jquery/jquery-1.7.2.min.js');
+ }
+
+}
+
+/**
+ * Class Customer for a Backward compatibility
+ * Allow to use method declared in 1.5
+ */
+class CustomerBackwardModule extends Customer
+{
+ public $logged = false;
+ /**
+ * Check customer informations and return customer validity
+ *
+ * @since 1.5.0
+ * @param boolean $with_guest
+ * @return boolean customer validity
+ */
+ public function isLogged($with_guest = false)
+ {
+ if (!$with_guest && $this->is_guest == 1)
+ return false;
+
+ /* Customer is valid only if it can be load and if object password is the same as database one */
+ if ($this->logged == 1 && $this->id && Validate::isUnsignedId($this->id) && Customer::checkPassword($this->id, $this->passwd))
+ return true;
+ return false;
+ }
+}
diff --git a/modules/lgcookieslaw/backward_compatibility/Display.php b/modules/lgcookieslaw/backward_compatibility/Display.php
new file mode 100644
index 00000000..309e8579
--- /dev/null
+++ b/modules/lgcookieslaw/backward_compatibility/Display.php
@@ -0,0 +1,48 @@
+
+* @copyright 2007-2014 PrestaShop SA
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+/**
+ * Class allow to display tpl on the FO
+ */
+class BWDisplay extends FrontController
+{
+ // Assign template, on 1.4 create it else assign for 1.5
+ public function setTemplate($template)
+ {
+ if (_PS_VERSION_ >= '1.5')
+ parent::setTemplate($template);
+ else
+ $this->template = $template;
+ }
+
+ // Overload displayContent for 1.4
+ public function displayContent()
+ {
+ parent::displayContent();
+
+ echo Context::getContext()->smarty->fetch($this->template);
+ }
+}
diff --git a/modules/lgcookieslaw/backward_compatibility/backward.ini b/modules/lgcookieslaw/backward_compatibility/backward.ini
new file mode 100644
index 00000000..6520fb7a
--- /dev/null
+++ b/modules/lgcookieslaw/backward_compatibility/backward.ini
@@ -0,0 +1 @@
+version = 0.4
\ No newline at end of file
diff --git a/modules/lgcookieslaw/backward_compatibility/backward.php b/modules/lgcookieslaw/backward_compatibility/backward.php
new file mode 100644
index 00000000..21f9eb41
--- /dev/null
+++ b/modules/lgcookieslaw/backward_compatibility/backward.php
@@ -0,0 +1,55 @@
+
+* @copyright 2007-2014 PrestaShop SA
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+/**
+ * Backward function compatibility
+ * Need to be called for each module in 1.4
+ */
+
+// Get out if the context is already defined
+if (!in_array('Context', get_declared_classes()))
+ require_once(dirname(__FILE__).'/Context.php');
+
+// Get out if the Display (BWDisplay to avoid any conflict)) is already defined
+if (!in_array('BWDisplay', get_declared_classes()))
+ require_once(dirname(__FILE__).'/Display.php');
+
+// If not under an object we don't have to set the context
+if (!isset($this))
+ return;
+else if (isset($this->context))
+{
+ // If we are under an 1.5 version and backoffice, we have to set some backward variable
+ if (_PS_VERSION_ >= '1.5' && isset($this->context->employee->id) && $this->context->employee->id && isset(AdminController::$currentIndex) && !empty(AdminController::$currentIndex))
+ {
+ global $currentIndex;
+ $currentIndex = AdminController::$currentIndex;
+ }
+ return;
+}
+
+$this->context = Context::getContext();
+$this->smarty = $this->context->smarty;
diff --git a/modules/lgcookieslaw/backward_compatibility/index.php b/modules/lgcookieslaw/backward_compatibility/index.php
new file mode 100644
index 00000000..b856f563
--- /dev/null
+++ b/modules/lgcookieslaw/backward_compatibility/index.php
@@ -0,0 +1,35 @@
+
+* @copyright 2007-2014 PrestaShop SA
+* @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;
\ No newline at end of file
diff --git a/modules/lgcookieslaw/controllers/front/disallow.php b/modules/lgcookieslaw/controllers/front/disallow.php
new file mode 100644
index 00000000..abe32c34
--- /dev/null
+++ b/modules/lgcookieslaw/controllers/front/disallow.php
@@ -0,0 +1,42 @@
+=')) {
+ $this->setTemplate('module:lgcookieslaw/views/templates/front/disallow_1_7.tpl');
+ } else {
+ $this->setTemplate('disallow.tpl');
+ }
+ $ok = 0;
+ if (md5(_COOKIE_KEY_.$this->module->name) == Tools::getValue('token', '')) {
+ $ok = 1;
+ }
+ $cookies = array(
+ $this->context->cookie->getName(),
+ 'PHPSESSID',
+ );
+ $this->context->smarty->assign(
+ array(
+ 'lgcookieslaw_safe_cookies' => $cookies,
+ 'lgcookieslaw_token_ok' => $ok,
+ )
+ );
+ //Tools::dieObject($this->context->cookie);
+ }
+}
diff --git a/modules/lgcookieslaw/controllers/front/index.php b/modules/lgcookieslaw/controllers/front/index.php
new file mode 100644
index 00000000..a85fb997
--- /dev/null
+++ b/modules/lgcookieslaw/controllers/front/index.php
@@ -0,0 +1,36 @@
+
+* @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;
\ No newline at end of file
diff --git a/modules/lgcookieslaw/controllers/index.php b/modules/lgcookieslaw/controllers/index.php
new file mode 100644
index 00000000..a85fb997
--- /dev/null
+++ b/modules/lgcookieslaw/controllers/index.php
@@ -0,0 +1,36 @@
+
+* @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;
\ No newline at end of file
diff --git a/modules/lgcookieslaw/index.php b/modules/lgcookieslaw/index.php
new file mode 100644
index 00000000..2e358b17
--- /dev/null
+++ b/modules/lgcookieslaw/index.php
@@ -0,0 +1,106 @@
+
+
+
+* @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;
\ No newline at end of file
diff --git a/modules/lgcookieslaw/lgcookieslaw.php b/modules/lgcookieslaw/lgcookieslaw.php
new file mode 100644
index 00000000..d6394f70
--- /dev/null
+++ b/modules/lgcookieslaw/lgcookieslaw.php
@@ -0,0 +1,1428 @@
+name = 'lgcookieslaw';
+ $this->tab = 'front_office_features';
+ $this->version = '1.4.22';
+ $this->author = 'Línea Gráfica';
+ $this->need_instance = 0;
+ $this->module_key = '56c109696b8e3185bc40d38d855f7332';
+ $this->author_address = '0x30052019eD7528f284fd035BdA14B6eC3A4a1ffB';
+
+ if (substr_count(_PS_VERSION_, '1.6') > 0) {
+ $this->bootstrap = true;
+ } else {
+ $this->bootstrap = false;
+ }
+
+ parent::__construct();
+
+ $this->displayName = $this->l('EU Cookie Law (Notification Banner + Cookie Blocker)');
+ $this->description = $this->l('Display a cookie banner and block cookies before getting the user consent.');
+
+ /* Backward compatibility */
+ if (_PS_VERSION_ < '1.5') {
+ require(_PS_MODULE_DIR_.$this->name.'/backward_compatibility/backward.php');
+ }
+ }
+
+ public function install()
+ {
+ $messages = array(
+ 'en' => array(
+ 'accept' => 'I accept',
+ 'moreinfo' => 'More information',
+ 'message' =>
+ 'Our webstore '.
+ 'uses cookies to offer a better user experience and we recommend you to accept their '.
+ 'use to fully enjoy your navigation.',
+ 'required' => '
+
Necessary to navigate this site and use its functions.
+
Identify you as a user and store your preferences such as language and currency.
+
Customize your experience based on your browsing.
+
',
+ 'additional' => '
+
Third-party cookies for analytical purposes.
+
Show personalized recommendations based on your browsing on other sites.
+
Show custom campaigns on other websites.
+
',
+ ),
+ 'es' => array(
+ 'accept' => 'Acepto',
+ 'moreinfo' => 'Más información',
+ 'message' =>
+ 'Nuestra '.
+ 'tienda usa cookies para mejorar la experiencia de usuario y le recomendamos '.
+ 'aceptar su uso para aprovechar plenamente la navegación.',
+ 'required' => '
+
Necesarias para navegar en este sitio y utilizar sus funciones.
+
Identificarle como usuario y almacenar sus preferencias como idioma y moneda.
+
Personalizar su experiencia en base con su navegación.
+
',
+ 'additional' => '
+
Cookies de terceros con propósitos analíticos.
+
Mostrar recomendaciones personalizadas basadas en su navegación en otros sitios.
+
Mostrar campañas personalizadas en otras sitios web.
+
',
+ ),
+ 'fr' => array(
+ 'accept' => 'J\'accepte',
+ 'moreinfo' => 'Plus d\'informations',
+ 'message' =>
+ 'Notre boutique '.
+ 'utilise des cookies pour améliorer l\'expérience utilisateur et nous vous recommandons '.
+ 'd\'accepter leur utilisation pour profiter pleinement de votre navigation.',
+ 'required' => '
+
Nécessaire pour naviguer sur ce site et utiliser ses fonctions.
+
Vous identifier en tant qu\'utilisateur et enregistrer vos préférences telles que la langue et la devise.
+
Personnalisez votre expérience en fonction de votre navigation.
+
',
+ 'additional' => '
+
Cookies tiers à des fins d\'analyse.
+
Afficher des recommandations personnalisées en fonction de votre navigation sur d\'autres sites
+
Afficher des campagnes personnalisées sur d\'autres sites Web
+
',
+ ),
+ 'it' => array(
+ 'accept' => 'Accetto',
+ 'moreinfo' => 'Piú info',
+ 'message' =>
+ 'Our webstore '.
+ 'uses cookies to offer a better user experience and we recommend you to accept their '.
+ 'use to fully enjoy your navigation.',
+ 'required' => '
+
Necessario per navigare in questo sito e utilizzare le sue funzioni.
+
Identificarti come utente e memorizzare le tue preferenze come lingua e valuta.
+
Personalizza la tua esperienza in base alla tua navigazione.
+
',
+ 'additional' => '
+
Cookie di terze parti per scopi analitici.
+
Mostra consigli personalizzati basati sulla tua navigazione su altri siti.