first commit

This commit is contained in:
2024-11-11 18:46:54 +01:00
commit a630d17338
25634 changed files with 4923715 additions and 0 deletions

View File

@@ -0,0 +1,61 @@
<?php
/**
* LiteSpeed Cache for Prestashop.
*
* NOTICE OF LICENSE
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see https://opensource.org/licenses/GPL-3.0 .
*
* @author LiteSpeed Technologies
* @copyright Copyright (c) 2017-2018 LiteSpeed Technologies, Inc. (https://www.litespeedtech.com)
* @license https://opensource.org/licenses/GPL-3.0
*/
use LiteSpeedCacheEsiModConf as EsiConf;
use LiteSpeedCacheLog as LSLog;
class LscIqitCompare extends LscIntegration
{
const NAME = 'iqitcompare';
protected function init()
{
$confData = [
EsiConf::FLD_PRIV => 1,
EsiConf::FLD_TAG => 'compare',
EsiConf::FLD_PURGE_CONTROLLERS => 'iqitcompareactionsModuleFrontController',
EsiConf::FLD_ASVAR => 1,
];
$this->esiConf = new LiteSpeedCacheEsiModConf(self::NAME, EsiConf::TYPE_INTEGRATED, $confData);
$this->registerEsiModule();
$this->addJsDef('iqitcompare:nbProducts', $this);
return true;
}
protected function JSKeyProcess($jskey)
{
if ($jskey != 'iqitcompare:nbProducts') {
//something wrong, should not happen
LSLog::log(__FUNCTION__ . ' unexpected key ' . $jskey, LSLog::LEVEL_EXCEPTION);
return '';
}
$data = (int) Context::getContext()->cookie->iqitCompareNb;
return json_encode($data);
}
}
LscIqitCompare::register();

View File

@@ -0,0 +1,49 @@
<?php
/**
* LiteSpeed Cache for Prestashop.
*
* NOTICE OF LICENSE
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see https://opensource.org/licenses/GPL-3.0 .
*
* @author LiteSpeed Technologies
* @copyright Copyright (c) 2018 LiteSpeed Technologies, Inc. (https://www.litespeedtech.com)
* @license https://opensource.org/licenses/GPL-3.0
*/
use LiteSpeedCacheEsiModConf as EsiConf;
class LscIqitCookielaw extends LscIntegration
{
const NAME = 'iqitcookielaw';
protected function init()
{
$confData = [
EsiConf::FLD_PRIV => 1,
EsiConf::FLD_TAG => 'cookielaw',
EsiConf::FLD_ASVAR => 1,
EsiConf::FLD_ONLY_CACHE_EMPTY => 1,
EsiConf::FLD_IGNORE_EMPTY => 0,
EsiConf::FLD_RENDER_WIDGETS => '*',
];
$this->esiConf = new EsiConf(self::NAME, EsiConf::TYPE_INTEGRATED, $confData);
$this->registerEsiModule();
LiteSpeedCacheConfig::getInstance()->overrideGuestMode();
return true;
}
}
LscIqitCookielaw::register();

View File

@@ -0,0 +1,52 @@
<?php
/**
* LiteSpeed Cache for Prestashop.
*
* NOTICE OF LICENSE
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see https://opensource.org/licenses/GPL-3.0 .
*
* @author LiteSpeed Technologies
* @copyright Copyright (c) 2018 LiteSpeed Technologies, Inc. (https://www.litespeedtech.com)
* @license https://opensource.org/licenses/GPL-3.0
*/
use LiteSpeedCacheEsiModConf as EsiConf;
/* If you want to make "do not show again" be remembered, you need to completely disable
* the guest mode in lscache configuration.
*/
class LscIqitPopup extends LscIntegration
{
const NAME = 'iqitpopup';
protected function init()
{
$confData = [
EsiConf::FLD_PRIV => 1,
EsiConf::FLD_TAG => 'popup',
EsiConf::FLD_ASVAR => 1,
EsiConf::FLD_ONLY_CACHE_EMPTY => 1,
EsiConf::FLD_IGNORE_EMPTY => 0,
EsiConf::FLD_RENDER_WIDGETS => '*',
];
$this->esiConf = new EsiConf(self::NAME, EsiConf::TYPE_INTEGRATED, $confData);
$this->registerEsiModule();
LiteSpeedCacheConfig::getInstance()->overrideGuestMode();
return true;
}
}
LscIqitPopup::register();

View File

@@ -0,0 +1,63 @@
<?php
/**
* LiteSpeed Cache for Prestashop.
*
* NOTICE OF LICENSE
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see https://opensource.org/licenses/GPL-3.0 .
*
* @author LiteSpeed Technologies
* @copyright Copyright (c) 2017-2018 LiteSpeed Technologies, Inc. (https://www.litespeedtech.com)
* @license https://opensource.org/licenses/GPL-3.0
*/
use LiteSpeedCacheEsiModConf as EsiConf;
use LiteSpeedCacheLog as LSLog;
class LscIqitWishlist extends LscIntegration
{
const NAME = 'iqitwishlist';
protected function init()
{
$confData = [
EsiConf::FLD_PRIV => 1,
EsiConf::FLD_TAG => 'wishlist',
EsiConf::FLD_PURGE_CONTROLLERS => 'iqitwishlistactionsModuleFrontController',
EsiConf::FLD_ASVAR => 1,
];
$this->esiConf = new EsiConf(self::NAME, EsiConf::TYPE_INTEGRATED, $confData);
$this->registerEsiModule();
$this->addJsDef('iqitwishlist:nbProducts', $this);
return true;
}
protected function JSKeyProcess($jskey)
{
$funcname = 'getWishlistProductsNb';
$classname = 'IqitWishlistProduct';
if ($jskey != 'iqitwishlist:nbProducts' || !method_exists($classname, $funcname)) {
//something wrong, should not happen
LSLog::log(__FUNCTION__ . ' unexpected ' . $jskey, LSLog::LEVEL_EXCEPTION);
return '';
}
$data = (int) $classname::$funcname((int) Context::getContext()->customer->id);
return json_encode($data);
}
}
LscIqitWishlist::register();

View File

@@ -0,0 +1,33 @@
<?php
/**
* LiteSpeed Cache for Prestashop.
*
* NOTICE OF LICENSE
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see https://opensource.org/licenses/GPL-3.0 .
*
* @author LiteSpeed Technologies
* @copyright Copyright (c) 2017-2018 LiteSpeed Technologies, Inc. (https://www.litespeedtech.com)
* @license https://opensource.org/licenses/GPL-3.0
*/
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;

View File

@@ -0,0 +1,30 @@
<?php
/**
* LiteSpeed Cache for Prestashop.
*
* NOTICE OF LICENSE
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see https://opensource.org/licenses/GPL-3.0 .
*
* @author LiteSpeed Technologies
* @copyright Copyright (c) 2018 LiteSpeed Technologies, Inc. (https://www.litespeedtech.com)
* @license https://opensource.org/licenses/GPL-3.0
*/
// You can comment out the lines if you do not use IQIT Modules (warehouse theme)
include __DIR__ . '/LscIqitCompare.php';
include __DIR__ . '/LscIqitWishlist.php';
include __DIR__ . '/LscIqitCookielaw.php';
include __DIR__ . '/LscIqitPopup.php';