This commit is contained in:
2025-08-07 21:16:42 +02:00
parent f5dd06f0bc
commit 8c05aae2ab
128 changed files with 7270 additions and 10 deletions

View File

@@ -116,21 +116,21 @@
},
"google-merchant_id-1.xml": {
"type": "-",
"size": 62453577,
"size": 62380647,
"lmtime": 0,
"modified": true
},
"google-merchant_id-2.xml": {
"type": "-",
"size": 2687503,
"size": 2691879,
"lmtime": 0,
"modified": true
},
".htaccess": {
"type": "-",
"size": 13595,
"size": 12165,
"lmtime": 0,
"modified": false
"modified": true
},
".htaccess.2025-05-22-1747946142": {
"type": "-",
@@ -346,20 +346,20 @@
"components": {},
"dr_materac.css": {
"type": "-",
"size": 81186,
"lmtime": 1753549288918,
"size": 81513,
"lmtime": 1753954558589,
"modified": false
},
"dr_materac.css.map": {
"type": "-",
"size": 230130,
"lmtime": 1753549288918,
"size": 231003,
"lmtime": 1753954558589,
"modified": false
},
"dr_materac.scss": {
"type": "-",
"size": 105034,
"lmtime": 1753549288326,
"size": 105413,
"lmtime": 1753954558025,
"modified": false
},
"index.php": {

10
override/.htaccess Normal file
View File

@@ -0,0 +1,10 @@
# Apache 2.2
<IfModule !mod_authz_core.c>
Order deny,allow
Deny from all
</IfModule>
# Apache 2.4
<IfModule mod_authz_core.c>
Require all denied
</IfModule>

View File

@@ -0,0 +1,34 @@
<?php
/**
* Creative Elements - live Theme & Page Builder
*
* @author WebshopWorks
* @copyright 2019-2022 WebshopWorks.com
* @license One domain support license
*/
defined('_PS_VERSION_') or die;
class CMSCategory extends CMSCategoryCore
{
/*
* module: creativeelements
* date: 2025-07-13 11:17:03
* version: 2.5.11
*/
const CE_OVERRIDE = true;
/*
* module: creativeelements
* date: 2025-07-13 11:17:03
* version: 2.5.11
*/
public function __construct($id = null, $idLang = null)
{
parent::__construct($id, $idLang);
$ctrl = Context::getContext()->controller;
if ($ctrl instanceof CmsController && !CmsController::$initialized && !$this->active && Tools::getIsset('id_employee') && Tools::getIsset('adtoken')) {
$tab = 'AdminCmsContent';
if (Tools::getAdminToken($tab . (int) Tab::getIdFromClassName($tab) . (int) Tools::getValue('id_employee')) == Tools::getValue('adtoken')) {
$this->active = 1;
}
}
}
}

56
override/classes/Cart.php Normal file
View File

@@ -0,0 +1,56 @@
<?php
/**
* Copyright ETS Software Technology Co., Ltd
*
* NOTICE OF LICENSE
*
* This file is not open source! Each license that you purchased is only available for 1 website only.
* If you want to use this file on more websites (or projects), you need to purchase additional licenses.
* You are not allowed to redistribute, resell, lease, license, sub-license or offer our resources to any third party.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future.
*
* @author ETS Software Technology Co., Ltd
* @copyright ETS Software Technology Co., Ltd
* @license Valid for 1 website (or project) for each purchase of license
*/
class Cart extends CartCore
{
/*
* module: ets_promotion
* date: 2023-11-25 09:55:38
* version: 1.1.9
*/
public function getOrderTotal($withTaxes = true, $type = Cart::BOTH, $products = null, $id_carrier = null, $use_cache = false, $keepOrderPrices = false, $fee_payment = false, $only_cart = false, $custom = true)
{
$total = parent::getOrderTotal($withTaxes,$type,$products,$id_carrier,$use_cache,$keepOrderPrices);
if($custom && ($type==Cart::ONLY_DISCOUNTS || $type == Cart::BOTH) && Module::isEnabled('ets_promotion'))
{
$totalDiscount = Module::getInstanceByName('ets_promotion')->getDiscountTotal($withTaxes);
if($type==Cart::ONLY_DISCOUNTS)
$total = $total+$totalDiscount;
else
$total= $total - $totalDiscount;
}
if(Module::isEnabled('ets_payment_with_fee'))
{
if($only_cart || $type!=Cart::BOTH)
return $total;
if($type== Cart::BOTH)
{
$custom_payment = Module::getInstanceByName('ets_payment_with_fee');
$fee = $custom_payment->getFeePayOrderTotal($products,$withTaxes);
}
else
$fee = 0;
if($fee_payment)
return $fee;
return $fee + $total;
}
return $total;
}
}

View File

@@ -0,0 +1,65 @@
<?php
/**
* Copyright ETS Software Technology Co., Ltd
*
* NOTICE OF LICENSE
*
* This file is not open source! Each license that you purchased is only available for 1 website only.
* If you want to use this file on more websites (or projects), you need to purchase additional licenses.
* You are not allowed to redistribute, resell, lease, license, sub-license or offer our resources to any third party.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future.
*
* @author ETS Software Technology Co., Ltd
* @copyright ETS Software Technology Co., Ltd
* @license Valid for 1 website (or project) for each purchase of license
*/
class CartRule extends CartRuleCore
{
/*
* module: ets_promotion
* date: 2023-11-25 09:55:38
* version: 1.1.9
*/
public static function haveCartRuleToday($idCustomer)
{
if(!parent::haveCartRuleToday($idCustomer))
{
return Module::getInstanceByName('ets_promotion')->haveCartRuleToday();
}
else
return true;
}
/*
* module: ets_promotion
* date: 2023-11-25 09:55:38
* version: 1.1.9
*/
public static function getCustomerCartRules($id_lang, $id_customer, $active = false, $includeGeneric = true, $inStock = false, Cart $cart = null, $free_shipping_only = false, $highlight_only = false)
{
$result = parent::getCustomerCartRules($id_lang,$id_customer,$active,$includeGeneric,$inStock,$cart,$free_shipping_only,$highlight_only);
Module::getInstanceByName('ets_promotion')->getCustomerCartRules($result,$id_customer,$highlight_only);
return $result;
}
/*
* module: ets_promotion
* date: 2023-11-25 09:55:38
* version: 1.1.9
*/
public function delete()
{
$r = parent::delete();
if(!Configuration::getGlobalValue('PS_CART_RULE_FEATURE_ACTIVE'))
{
Configuration::updateGlobalValue(
'PS_CART_RULE_FEATURE_ACTIVE',
CartRule::isCurrentlyUsed('cart_rule', true) || Ets_pr_rule::isCurrentlyUsed('ets_pr_rule', true)
);
}
return $r;
}
}

View File

@@ -0,0 +1,34 @@
<?php
/**
* Creative Elements - live Theme & Page Builder
*
* @author WebshopWorks
* @copyright 2019-2022 WebshopWorks.com
* @license One domain support license
*/
defined('_PS_VERSION_') or die;
class Category extends CategoryCore
{
/*
* module: creativeelements
* date: 2025-07-13 11:17:03
* version: 2.5.11
*/
const CE_OVERRIDE = true;
/*
* module: creativeelements
* date: 2025-07-13 11:17:03
* version: 2.5.11
*/
public function __construct($idCategory = null, $idLang = null, $idShop = null)
{
parent::__construct($idCategory, $idLang, $idShop);
$ctrl = Context::getContext()->controller;
if ($ctrl instanceof CategoryController && !CategoryController::$initialized && !$this->active && Tools::getIsset('id_employee') && Tools::getIsset('adtoken')) {
$tab = 'AdminCategories';
if (Tools::getAdminToken($tab . (int) Tab::getIdFromClassName($tab) . (int) Tools::getValue('id_employee')) == Tools::getValue('adtoken')) {
$this->active = 1;
}
}
}
}

View File

@@ -0,0 +1,280 @@
<?php
/**
* 2012-2018 Areama
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 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/afl-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@areama.net so we can send you a copy immediately.
*
* @author Areama <contact@areama.net>
* @copyright 2018 Areama
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of Areama
*/
class Dispatcher extends DispatcherCore
{
/*
* module: arseopro
* date: 2025-05-30 11:21:28
* version: 1.8.8
*/
protected static $moduleInstance;
/*
* module: arseopro
* date: 2025-05-30 11:21:28
* version: 1.8.8
*/
public function arSeoProOverrideVersion()
{
return '1.8.8';
}
/*
* module: arseopro
* date: 2025-05-30 11:21:28
* version: 1.8.8
*/
public function getModuleInstance()
{
if (self::$moduleInstance == null) {
self::$moduleInstance = Module::getInstanceByName('arseopro');
}
return self::$moduleInstance;
}
/*
* module: arseopro
* date: 2025-05-30 11:21:28
* version: 1.8.8
*/
public function getRoutes()
{
return $this->routes;
}
/*
* module: arseopro
* date: 2025-05-30 11:21:28
* version: 1.8.8
*/
public function getRequestUri()
{
return $this->request_uri;
}
/*
* module: arseopro
* date: 2025-05-30 11:21:28
* version: 1.8.8
*/
protected function loadRoutes($id_shop = null)
{
parent::loadRoutes($id_shop);
if (Module::isEnabled('arseopro')) {
$module = Module::getInstanceByName('arseopro');
$this->routes = $module->getUrlConfig()->dispatcherLoadRoutes($this->routes, $this);
}
}
/*
* module: arseopro
* date: 2025-05-30 11:21:28
* version: 1.8.8
*/
protected function setRequestUri()
{
parent::setRequestUri();
$remove_enabled = Configuration::get('ARS_REMOVE_DEF_LANG');
$current_iso_lang = Tools::getValue('isolang');
if ($this->use_routes && Language::isMultiLanguageActivated() && !$current_iso_lang && $remove_enabled) {
$_GET['isolang'] = Language::getIsoById(Configuration::get('PS_LANG_DEFAULT'));
}
}
/*
* module: arseopro
* date: 2025-05-30 11:21:28
* version: 1.8.8
*/
public function arSEOredirect()
{
if (Module::isInstalled('arseopro') && Module::isEnabled('arseopro') && Configuration::get('ARSR_ENABLE')) {
$module = $this->getModuleInstance();
$module->redirect();
}
}
/*
* module: arseopro
* date: 2025-05-30 11:21:28
* version: 1.8.8
*/
public function getController($id_shop = null)
{
if (!Module::isEnabled('arseopro')) {
return parent::getController($id_shop);
}
if (defined('_PS_ADMIN_DIR_')) {
$_GET['controllerUri'] = Tools::getvalue('controller');
}
$this->arSEOredirect();
if ($this->controller) {
$_GET['controller'] = $this->controller;
return $this->controller;
}
if (isset(Context::getContext()->shop) && $id_shop === null) {
$id_shop = (int)Context::getContext()->shop->id;
}
$id_lang = Context::getContext()->language->id;
$controller = Tools::getValue('controller');
if (isset($controller) && is_string($controller) && preg_match('/^([0-9a-z_-]+)\?(.*)=(.*)$/Ui', $controller, $m)) {
$controller = $m[1];
if (isset($_GET['controller'])) {
$_GET[$m[2]] = $m[3];
} elseif (isset($_POST['controller'])) {
$_POST[$m[2]] = $m[3];
}
}
if (!Validate::isControllerName($controller)) {
$controller = false;
}
if ($this->use_routes && !$controller && !defined('_PS_ADMIN_DIR_')) {
if (!$this->request_uri) {
return Tools::strtolower($this->controller_not_found);
}
$controller = $this->controller_not_found;
$test_request_uri = preg_replace('/(=http:\/\/)/', '=', $this->request_uri);
if (!preg_match('/\.(gif|jpe?g|png|css|js|ico)$/i', parse_url($test_request_uri, PHP_URL_PATH))) {
if ($this->empty_route) {
$this->addRoute(
$this->empty_route['routeID'],
$this->empty_route['rule'],
$this->empty_route['controller'],
$id_lang,
array(),
array(),
$id_shop
);
}
list($uri) = explode('?', $this->request_uri);
if (Tools::file_exists_cache(_PS_ROOT_DIR_.$uri)) {
return $controller;
}
if (isset($this->routes[$id_shop][$id_lang])) {
$maybe = array();
$lastRoute = array();
foreach ($this->routes[$id_shop][$id_lang] as $route_id => $route) {
if (preg_match($route['regexp'], $uri, $m)) {
if (Module::isEnabled('arseopro')) {
$module = Module::getInstanceByName('arseopro');
if ($module->getUrlConfig()->isRouteExists($route_id)) {
$m = $module->getUrlConfig()->normalizeRegexResult($m);
$preDispatcher = $module->getUrlConfig()->getRoutePreDispatcher($route_id);
if ($preDispatcher && Tools::isCallable(array($preDispatcher['module'], $preDispatcher['function']))) {
$modulePreDispatcher = call_user_func(array(
$preDispatcher['module'],
$preDispatcher['function']
), $uri, $route_id, $route, $m, $id_lang, $id_shop);
$info = $module->getUrlConfig()->getEmptyPreDispatcherResponse();
if (is_array($modulePreDispatcher)) {
$info = array_merge($info, $modulePreDispatcher);
}
} else {
$info = $module->getUrlConfig()->preDispatch($uri, $route_id, $route, $m, $id_lang, $id_shop);
}
$lastRoute = array(
'route_id' => $route_id,
'm' => $m,
'route' => $route,
'useIfProbably' => $info->useIfProbably
);
if ($info->controllerMatched) {
if ($info->id && $info->property) {
$_GET[$info->property] = $info->id;
}
} else {
if ($info->controllerProbably) {
$maybe[$route_id] = array(
'm' => $m,
'route' => $route,
'useIfProbably' => $info->useIfProbably
);
}
continue;
}
}
}
$maybe = array();
$lastRoute = array();
foreach ($m as $k => $v) {
if (!is_numeric($k)) {
$_GET[$k] = $v;
}
}
$controller = $route['controller'] ? $route['controller'] : Tools::getValue('controller');
if (!empty($route['params'])) {
foreach ($route['params'] as $k => $v) {
$_GET[$k] = $v;
}
}
if (preg_match('#module-([a-z0-9_-]+)-([a-z0-9_]+)$#i', $controller, $m)) {
$_GET['module'] = $m[1];
$_GET['fc'] = 'module';
$controller = $m[2];
}
if (Tools::getValue('fc') == 'module') {
$this->front_controller = self::FC_MODULE;
}
break;
}
}
if (!$maybe && $lastRoute) {
$maybe[$lastRoute['route_id']] = $lastRoute;
}
if ($maybe) {
foreach ($maybe as $routeData) {
$m = $routeData['m'];
$route = $routeData['route'];
if ($routeData['useIfProbably']) {
foreach ($m as $k => $v) {
if (!is_numeric($k)) {
$_GET[$k] = $v;
}
}
$controller = $route['controller'] ? $route['controller'] : Tools::getValue('controller');
if (!empty($route['params'])) {
foreach ($route['params'] as $k => $v) {
$_GET[$k] = $v;
}
}
if (preg_match('#module-([a-z0-9_-]+)-([a-z0-9_]+)$#i', $controller, $m)) {
$_GET['module'] = $m[1];
$_GET['fc'] = 'module';
$controller = $m[2];
}
if (Tools::getValue('fc') == 'module') {
$this->front_controller = self::FC_MODULE;
}
break;
}
}
}
}
}
if ($controller == 'index' || preg_match('/^\/index.php(?:\?.*)?$/', $this->request_uri)) {
$controller = $this->useDefaultController();
}
}
$this->controller = str_replace('-', '', $controller);
$_GET['controller'] = $this->controller;
return $this->controller;
}
}

73
override/classes/Hook.php Normal file
View File

@@ -0,0 +1,73 @@
<?php
if (!defined('_PS_VERSION_')) {
exit;
}
class Hook extends HookCore
{
/*
* module: cookiesplus
* date: 2025-03-31 23:34:24
* version: 1.6.0
*/
public static function getHookModuleExecList($hookName = null)
{
$modulesToInvoke = parent::getHookModuleExecList($hookName);
if (Module::isEnabled('cookiesplus')) {
$cookiesPlus = Module::getInstanceByName('cookiesplus');
$modulesToInvoke = $cookiesPlus->blockModuleCache($modulesToInvoke, $hookName);
}
return !empty($modulesToInvoke) ? $modulesToInvoke : false;
}
/*
* module: cookiesplus
* date: 2025-03-31 23:34:24
* version: 1.6.0
*/
public static function coreCallHook($module, $method, $params)
{
$headersBeforeExecution = headers_list();
$display = parent::coreCallHook($module, $method, $params);
if (Module::isEnabled('cookiesplus')) {
$forceDisplay = false;
$cookiesPlus = Module::getInstanceByName('cookiesplus');
$cookiesPlus->blockModuleCode([
'display' => &$display,
'module' => &$module,
'hookName' => &$method,
'params' => &$params,
'forceDisplay' => &$forceDisplay,
'headersBeforeExecution' => $headersBeforeExecution,
]);
if ($forceDisplay) {
return $display;
}
}
return $display;
}
/*
* module: cookiesplus
* date: 2025-03-31 23:34:24
* version: 1.6.0
*/
public static function coreRenderWidget($module, $hook_name, $params)
{
$headersBeforeExecution = headers_list();
$display = parent::coreRenderWidget($module, $hook_name, $params);
if (Module::isEnabled('cookiesplus')) {
$forceDisplay = false;
$cookiesPlus = Module::getInstanceByName('cookiesplus');
$cookiesPlus->blockModuleCode([
'display' => &$display,
'module' => &$module,
'hookName' => &$hook_name,
'params' => &$params,
'forceDisplay' => &$forceDisplay,
'headersBeforeExecution' => $headersBeforeExecution,
]);
if ($forceDisplay) {
return $display;
}
}
return $display;
}
}

429
override/classes/Link.php Normal file
View File

@@ -0,0 +1,429 @@
<?php
/**
* 2012-2018 Areama
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 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/afl-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@areama.net so we can send you a copy immediately.
*
* @author Areama <contact@areama.net>
* @copyright 2018 Areama
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of Areama
*/
class Link extends LinkCore
{
/*
* module: arseopro
* date: 2025-05-30 11:21:28
* version: 1.8.8
*/
public static $cacheDisableDefaultAttributeAnchor;
/*
* module: arseopro
* date: 2025-05-30 11:21:28
* version: 1.8.8
*/
public static $cacheDisableAnchor;
/*
* module: arseopro
* date: 2025-05-30 11:21:28
* version: 1.8.8
*/
public static $cacheDisableDefaultAttribute;
/*
* module: arseopro
* date: 2025-05-30 11:21:28
* version: 1.8.8
*/
public static $cacheDisableAnchorIds;
/*
* module: arseopro
* date: 2025-05-30 11:21:28
* version: 1.8.8
*/
public function arSeoProOverrideVersion()
{
return '1.8.8';
}
/*
* module: arseopro
* date: 2025-05-30 11:21:28
* version: 1.8.8
*/
protected function getLangLink($id_lang = null, Context $context = null, $id_shop = null)
{
if (!Module::isEnabled('arseopro')) {
return parent::getLangLink($id_lang, $context, $id_shop);
}
if (Configuration::get('ARS_REMOVE_DEF_LANG', null, null, $id_shop) &&
Language::isMultiLanguageActivated()) {
if (!$id_lang) {
$id_lang = $context->language->id;
}
if ($id_lang == Configuration::get('PS_LANG_DEFAULT', null, null, $id_shop)) {
return '';
}
}
return parent::getLangLink($id_lang, $context, $id_shop);
}
/*
* module: arseopro
* date: 2025-05-30 11:21:28
* version: 1.8.8
*/
public function getCategoryLink(
$category,
$alias = null,
$id_lang = null,
$selected_filters = null,
$id_shop = null,
$relative_protocol = false
) {
if (!Module::isEnabled('arseopro')) {
return parent::getCategoryLink($category, $alias, $id_lang, $selected_filters, $id_shop, $relative_protocol);
}
if (!$id_lang) {
$id_lang = Context::getContext()->language->id;
}
$url = $this->getBaseLink($id_shop, null, $relative_protocol).$this->getLangLink($id_lang, null, $id_shop);
if (!is_object($category)) {
if (is_array($category) && isset($category['id_category'])) {
$category = new Category($category['id_category'], $id_lang);
} elseif ((int)$category) {
$category = new Category((int)$category, $id_lang);
} else {
return null;
throw new PrestaShopException('Invalid category vars');
}
}
$params = array();
$params['id'] = $category->id;
$params['rewrite'] = (!$alias) ? $category->link_rewrite : $alias;
$params['meta_keywords'] = Tools::str2url($category->getFieldByLang('meta_keywords'));
$params['meta_title'] = Tools::str2url($category->getFieldByLang('meta_title'));
$dispatcher = Dispatcher::getInstance();
if ($dispatcher->hasKeyword('category_rule', $id_lang, 'categories', $id_shop)) {
$cats = array();
foreach ($category->getParentsCategories($id_lang) as $cat) {
if (!in_array($cat['id_category'], Link::$category_disable_rewrite)) {
$cats[] = $cat['link_rewrite'];
}
}
$cats = array_reverse($cats);
array_pop($cats);
$params['categories'] = implode('/', $cats);
}
$selected_filters = is_null($selected_filters) ? '' : $selected_filters;
if (empty($selected_filters)) {
$rule = 'category_rule';
} else {
$rule = 'layered_rule';
$params['selected_filters'] = $selected_filters;
}
return $url.Dispatcher::getInstance()->createUrl($rule, $id_lang, $params, $this->allow, '', $id_shop);
}
/*
* module: arseopro
* date: 2025-05-30 11:21:28
* version: 1.8.8
*/
public function getCMSCategoryLink(
$cms_category,
$alias = null,
$id_lang = null,
$id_shop = null,
$relative_protocol = false
) {
if (!Module::isEnabled('arseopro')) {
return parent::getCMSCategoryLink($cms_category, $alias, $id_lang, $id_shop, $relative_protocol);
}
if (!$id_lang) {
$id_lang = Context::getContext()->language->id;
}
$url = $this->getBaseLink($id_shop, null, $relative_protocol).$this->getLangLink($id_lang, null, $id_shop);
$dispatcher = Dispatcher::getInstance();
if (!is_object($cms_category)) {
$cms_category = new CMSCategory((int)$cms_category, $id_lang);
}
$params = array();
$params['id'] = $cms_category->id;
$params['rewrite'] = $cms_category->link_rewrite;
if (is_array($params['rewrite']) && isset($params['rewrite'][(int)$id_lang])) {
$params['rewrite'] = $params['rewrite'][(int)$id_lang];
}
if ($alias) {
$params['rewrite'] = $alias;
}
$params['meta_keywords'] = $cms_category->meta_keywords;
if (is_array($params['meta_keywords']) && isset($params['meta_keywords'][(int)$id_lang])) {
$params['meta_keywords'] = Tools::str2url($params['meta_keywords'][(int)$id_lang]);
}
$params['meta_title'] = $cms_category->meta_title;
if (is_array($params['meta_title']) && isset($params['meta_title'][(int)$id_lang])) {
$params['meta_title'] = Tools::str2url($params['meta_title'][(int)$id_lang]);
}
if ($dispatcher->hasKeyword('cms_category_rule', $id_lang, 'categories', $id_shop)) {
$cats = array();
if (Module::isEnabled('arseopro')) {
$module = Module::getInstanceByName('arseopro');
$categories = $module->getUrlConfig()->cmsCategory->getCMSCategoryParentCategories($cms_category->id, $id_lang);
if ($categories) {
foreach ($categories as $cat) {
$cats[] = $cat['link_rewrite'];
}
$cats = array_reverse($cats);
array_pop($cats);
}
}
$params['categories'] = implode('/', $cats);
}
return $url.$dispatcher->createUrl('cms_category_rule', $id_lang, $params, $this->allow, '', $id_shop);
}
/*
* module: arseopro
* date: 2025-05-30 11:21:28
* version: 1.8.8
*/
public function getCMSLink(
$cms,
$alias = null,
$ssl = null,
$id_lang = null,
$id_shop = null,
$relative_protocol = false
) {
if (!Module::isEnabled('arseopro')) {
return parent::getCMSLink($cms, $alias, $ssl, $id_lang, $id_shop, $relative_protocol);
}
if (!$id_lang) {
$id_lang = Context::getContext()->language->id;
}
$url = $this->getBaseLink($id_shop, $ssl, $relative_protocol).$this->getLangLink($id_lang, null, $id_shop);
$dispatcher = Dispatcher::getInstance();
if (!is_object($cms)) {
$cms = new CMS((int)$cms, $id_lang);
}
$params = array();
$params['id'] = $cms->id;
$params['rewrite'] = $cms->link_rewrite;
if (is_array($params['rewrite']) && isset($params['rewrite'][(int)$id_lang])) {
$params['rewrite'] = $params['rewrite'][(int)$id_lang];
}
if ($alias) {
$params['rewrite'] = $alias;
}
$params['meta_keywords'] = $cms->meta_keywords;
if (is_array($params['meta_keywords']) && isset($params['meta_keywords'][(int)$id_lang])) {
$params['meta_keywords'] = Tools::str2url($params['meta_keywords'][(int)$id_lang]);
}
$params['meta_title'] = $cms->meta_title;
if (is_array($params['meta_title']) && isset($params['meta_title'][(int)$id_lang])) {
$params['meta_title'] = Tools::str2url($params['meta_title'][(int)$id_lang]);
}
if ($dispatcher->hasKeyword('cms_rule', $id_lang, 'categories', $id_shop)) {
$cats = array();
$cms_category = new CMSCategory($cms->id_cms_category, $id_lang);
if (Validate::isLoadedObject($cms_category)) {
if (Module::isEnabled('arseopro')) {
$module = Module::getInstanceByName('arseopro');
$categories = $module->getUrlConfig()->cmsCategory->getCMSCategoryParentCategories($cms_category->id, $id_lang);
if ($categories) {
foreach ($categories as $cat) {
$cats[] = $cat['link_rewrite'];
}
$cats = array_reverse($cats);
}
}
}
$params['categories'] = implode('/', $cats);
}
return $url.$dispatcher->createUrl('cms_rule', $id_lang, $params, $this->allow, '', $id_shop);
}
/*
* module: arseopro
* date: 2025-05-30 11:21:28
* version: 1.8.8
*/
public function getProductLink(
$product,
$alias = null,
$category = null,
$ean13 = null,
$idLang = null,
$idShop = null,
$idProductAttribute = null,
$force_routes = false,
$relativeProtocol = false,
$withIdInAnchor = false,
$extraParams = array(),
$addAnchor = true
) {
if (!Module::isEnabled('arseopro')) {
return parent::getProductLink($product, $alias, $category, $ean13, $idLang, $idShop, $idProductAttribute, $force_routes, $relativeProtocol, $withIdInAnchor, $extraParams, $addAnchor);
}
$dispatcher = Dispatcher::getInstance();
if (!$idLang) {
$idLang = Context::getContext()->language->id;
}
$url = $this->getBaseLink($idShop, null, $relativeProtocol) . $this->getLangLink($idLang, null, $idShop);
$params = array();
if (!is_object($product)) {
if (is_array($product) && isset($product['id_product'])) {
$params['id'] = $product['id_product'];
} elseif ((int) $product) {
$params['id'] = $product;
} else {
throw new PrestaShopException('Invalid product vars');
}
} else {
$params['id'] = $product->id;
}
if (!is_object($product)) {
$product = $this->getProductObject($product, $idLang, $idShop);
}
if (self::isDefaultAttributeDisabled()) {
if ($idProductAttribute == $product->cache_default_attribute) {
$params['id_product_attribute'] = 0;
} else {
$params['id_product_attribute'] = $idProductAttribute;
}
} else {
$params['id_product_attribute'] = $idProductAttribute;
}
if ($params['id_product_attribute'] == 0 && (!$dispatcher->hasKeyword('product_rule', $idLang, 'id_product_attribute', $idShop))) {
unset($params['id_product_attribute']);
}
if (!$alias) {
$product = $this->getProductObject($product, $idLang, $idShop);
}
$params['rewrite'] = (!$alias) ? $product->getFieldByLang('link_rewrite') : $alias;
if (!$ean13) {
$product = $this->getProductObject($product, $idLang, $idShop);
}
$params['ean13'] = (!$ean13) ? $product->ean13 : $ean13;
if ($dispatcher->hasKeyword('product_rule', $idLang, 'meta_keywords', $idShop)) {
$product = $this->getProductObject($product, $idLang, $idShop);
$params['meta_keywords'] = Tools::str2url($product->getFieldByLang('meta_keywords'));
}
if ($dispatcher->hasKeyword('product_rule', $idLang, 'meta_title', $idShop)) {
$product = $this->getProductObject($product, $idLang, $idShop);
$params['meta_title'] = Tools::str2url($product->getFieldByLang('meta_title'));
}
if ($dispatcher->hasKeyword('product_rule', $idLang, 'manufacturer', $idShop)) {
$product = $this->getProductObject($product, $idLang, $idShop);
$params['manufacturer'] = Tools::str2url($product->isFullyLoaded ? $product->manufacturer_name : Manufacturer::getNameById($product->id_manufacturer));
}
if ($dispatcher->hasKeyword('product_rule', $idLang, 'supplier', $idShop)) {
$product = $this->getProductObject($product, $idLang, $idShop);
$params['supplier'] = Tools::str2url($product->isFullyLoaded ? $product->supplier_name : Supplier::getNameById($product->id_supplier));
}
if ($dispatcher->hasKeyword('product_rule', $idLang, 'price', $idShop)) {
$product = $this->getProductObject($product, $idLang, $idShop);
$params['price'] = $product->isFullyLoaded ? $product->price : Product::getPriceStatic($product->id, false, null, 6, null, false, true, 1, false, null, null, null, $product->specificPrice);
}
if ($dispatcher->hasKeyword('product_rule', $idLang, 'tags', $idShop)) {
$product = $this->getProductObject($product, $idLang, $idShop);
$params['tags'] = Tools::str2url($product->getTags($idLang));
}
if ($dispatcher->hasKeyword('product_rule', $idLang, 'category', $idShop)) {
if (!$category) {
$product = $this->getProductObject($product, $idLang, $idShop);
}
$params['category'] = (!$category) ? $product->category : $category;
}
if ($dispatcher->hasKeyword('product_rule', $idLang, 'reference', $idShop)) {
$product = $this->getProductObject($product, $idLang, $idShop);
$params['reference'] = Tools::str2url($product->reference);
}
if ($dispatcher->hasKeyword('product_rule', $idLang, 'categories', $idShop)) {
$product = $this->getProductObject($product, $idLang, $idShop);
$params['category'] = (!$category) ? $product->category : $category;
$cats = array();
foreach ($product->getParentCategories($idLang) as $cat) {
if (!in_array($cat['id_category'], Link::$category_disable_rewrite)) {
$cats[] = $cat['link_rewrite'];
}
}
$params['categories'] = implode('/', $cats);
}
if ($idProductAttribute) {
$product = $this->getProductObject($product, $idLang, $idShop);
}
if (($product->cache_default_attribute == $idProductAttribute && self::isDefaultAttributeAnchorDisabled()) || self::isAnchorDisabled()) {
$anchor = '';
} else {
if (self::isAnchorIdsDisabled()) {
$anchor = $addAnchor && $idProductAttribute ? $product->getAnchor((int) $idProductAttribute, false) : '';
} else {
$anchor = $addAnchor && $idProductAttribute ? $product->getAnchor((int) $idProductAttribute, (bool) $withIdInAnchor) : '';
}
}
return $url . $dispatcher->createUrl('product_rule', $idLang, array_merge($params, $extraParams), $force_routes, $anchor, $idShop);
}
/*
* module: arseopro
* date: 2025-05-30 11:21:28
* version: 1.8.8
*/
public static function isAnchorDisabled()
{
if (self::$cacheDisableAnchor === null) {
self::$cacheDisableAnchor = Configuration::get('ARSP_DISABLE_ANCHOR');
}
return self::$cacheDisableAnchor;
}
/*
* module: arseopro
* date: 2025-05-30 11:21:28
* version: 1.8.8
*/
public static function isDefaultAttributeAnchorDisabled()
{
if (self::$cacheDisableDefaultAttributeAnchor === null) {
self::$cacheDisableDefaultAttributeAnchor = Configuration::get('ARSP_DISABLE_DEFAULT_ATTR_ANCHOR');
}
return self::$cacheDisableDefaultAttributeAnchor;
}
/*
* module: arseopro
* date: 2025-05-30 11:21:28
* version: 1.8.8
*/
public static function isDefaultAttributeDisabled()
{
if (self::$cacheDisableDefaultAttribute === null) {
self::$cacheDisableDefaultAttribute = Configuration::get('ARSP_DISABLE_DEFAULT_ATTR');
}
return self::$cacheDisableDefaultAttribute;
}
/*
* module: arseopro
* date: 2025-05-30 11:21:28
* version: 1.8.8
*/
public static function isAnchorIdsDisabled()
{
if (self::$cacheDisableAnchorIds === null) {
self::$cacheDisableAnchorIds = Configuration::get('ARSP_REMOVE_ANCHOR_ID');
}
return self::$cacheDisableAnchorIds;
}
}

View File

@@ -0,0 +1,34 @@
<?php
/**
* Creative Elements - live Theme & Page Builder
*
* @author WebshopWorks
* @copyright 2019-2022 WebshopWorks.com
* @license One domain support license
*/
defined('_PS_VERSION_') or die;
class Manufacturer extends ManufacturerCore
{
/*
* module: creativeelements
* date: 2025-07-13 11:17:02
* version: 2.5.11
*/
const CE_OVERRIDE = true;
/*
* module: creativeelements
* date: 2025-07-13 11:17:02
* version: 2.5.11
*/
public function __construct($id = null, $idLang = null)
{
parent::__construct($id, $idLang);
$ctrl = Context::getContext()->controller;
if ($ctrl instanceof ManufacturerController && !ManufacturerController::$initialized && !$this->active && Tools::getIsset('id_employee') && Tools::getIsset('adtoken')) {
$tab = 'AdminManufacturers';
if (Tools::getAdminToken($tab . (int) Tab::getIdFromClassName($tab) . (int) Tools::getValue('id_employee')) == Tools::getValue('adtoken')) {
$this->active = 1;
}
}
}
}

View File

@@ -0,0 +1,35 @@
<?php
/**
* 2007-2018 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:
* https://opensource.org/licenses/OSL-3.0
* 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-2018 PrestaShop SA
* @license https://opensource.org/licenses/OSL-3.0 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;

View File

@@ -0,0 +1,34 @@
<?php
/**
* Creative Elements - live Theme & Page Builder
*
* @author WebshopWorks
* @copyright 2019-2022 WebshopWorks.com
* @license One domain support license
*/
defined('_PS_VERSION_') or die;
class Supplier extends SupplierCore
{
/*
* module: creativeelements
* date: 2025-07-13 11:17:02
* version: 2.5.11
*/
const CE_OVERRIDE = true;
/*
* module: creativeelements
* date: 2025-07-13 11:17:02
* version: 2.5.11
*/
public function __construct($id = null, $idLang = null)
{
parent::__construct($id, $idLang);
$ctrl = Context::getContext()->controller;
if ($ctrl instanceof SupplierController && !SupplierController::$initialized && !$this->active && Tools::getIsset('id_employee') && Tools::getIsset('adtoken')) {
$tab = 'AdminSuppliers';
if (Tools::getAdminToken($tab . (int) Tab::getIdFromClassName($tab) . (int) Tools::getValue('id_employee')) == Tools::getValue('adtoken')) {
$this->active = 1;
}
}
}
}

View File

@@ -0,0 +1,35 @@
<?php
/**
* 2007-2018 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:
* https://opensource.org/licenses/OSL-3.0
* 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-2018 PrestaShop SA
* @license https://opensource.org/licenses/OSL-3.0 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;

35
override/classes/cache/index.php vendored Normal file
View File

@@ -0,0 +1,35 @@
<?php
/**
* 2007-2018 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:
* https://opensource.org/licenses/OSL-3.0
* 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-2018 PrestaShop SA
* @license https://opensource.org/licenses/OSL-3.0 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;

View File

@@ -0,0 +1,35 @@
<?php
/**
* 2007-2018 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:
* https://opensource.org/licenses/OSL-3.0
* 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-2018 PrestaShop SA
* @license https://opensource.org/licenses/OSL-3.0 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;

View File

@@ -0,0 +1,35 @@
<?php
/**
* 2007-2018 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:
* https://opensource.org/licenses/OSL-3.0
* 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-2018 PrestaShop SA
* @license https://opensource.org/licenses/OSL-3.0 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;

View File

@@ -0,0 +1,209 @@
<?php
class FrontController extends FrontControllerCore
{
protected function smartyOutputContent($content)
{
if (Module::isEnabled('pshowlazyimg')) {
ob_start();
parent::smartyOutputContent($content);
$html = ob_get_clean();
ob_flush();
$module = Module::getInstanceByName('pshowlazyimg');
echo $module->parseOutputContent($html);
return;
}
parent::smartyOutputContent($content);
}
/*
* module: arseopro
* date: 2025-05-30 11:21:28
* version: 1.8.8
*/
protected static $moduleInstance;
/*
* module: arseopro
* date: 2025-05-30 11:21:28
* version: 1.8.8
*/
public function arSeoProOverrideVersion()
{
return '1.8.8';
}
/*
* module: arseopro
* date: 2025-05-30 11:21:28
* version: 1.8.8
*/
public function getModuleInstance()
{
if (self::$moduleInstance == null) {
self::$moduleInstance = Module::getInstanceByName('arseopro');
}
return self::$moduleInstance;
}
/*
* module: arseopro
* date: 2025-05-30 11:21:28
* version: 1.8.8
*/
public function getTemplateVarShop()
{
$shop = parent::getTemplateVarShop();
$shop['favicon'] = $this->getShopFavicon();
return $shop;
}
/*
* module: arseopro
* date: 2025-05-30 11:21:28
* version: 1.8.8
*/
public function getTemplateVarUrls()
{
$urls = parent::getTemplateVarUrls();
if (Module::isEnabled('arseopro') && Configuration::get('ARS_REMOVE_DEF_LANG')) {
if (Context::getContext()->language->id != Configuration::get('PS_LANG_DEFAULT')) {
$urls['base_url'] .= $_GET['isolang'] . '/' ;
}
}
return $urls;
}
/*
* module: arseopro
* date: 2025-05-30 11:21:28
* version: 1.8.8
*/
public function getShopFavicon()
{
$icon = Configuration::get('PS_FAVICON');
$favicon = ($icon) ? _PS_IMG_.$icon : '';
if (Module::isEnabled('arseopro')) {
$module = $this->getModuleInstance();
$module->getFaviconConfig()->loadFromConfig();
if ($module->getFaviconConfig()->icon) {
$filename = pathinfo($module->getFaviconConfig()->icon, PATHINFO_FILENAME);
$ext = pathinfo($module->getFaviconConfig()->icon, PATHINFO_EXTENSION);
$favicon = $module->getUploadsUrl() . $filename . '_96x96.' . $ext;
}
}
return $favicon;
}
/*
* module: arseopro
* date: 2025-05-30 11:21:28
* version: 1.8.8
*/
public function initLogoAndFavicon()
{
$res = parent::initLogoAndFavicon();
$res['favicon_url'] = $this->getShopFavicon();
return $res;
}
/*
* module: arseopro
* date: 2025-05-30 11:21:28
* version: 1.8.8
*/
protected function canonicalRedirection($canonical_url = '')
{
$params = array();
if (Module::isEnabled('arseopro')) {
$module = $this->getModuleInstance();
$data = $module->getUrlConfig()->canonicalUrl($canonical_url);
$canonical_url = $data['url'];
if (isset($data['params']) && is_array($data['params']) && $data['params']) {
$params = $data['params'];
}
}
parent::canonicalRedirection($canonical_url);
if ($params) {
$_GET = array_merge($_GET, $params);
}
}
/*
* module: arseopro
* date: 2025-05-30 11:21:28
* version: 1.8.8
*/
protected function updateQueryString(array $extraParams = null)
{
if (!Module::isEnabled('arseopro')) {
return parent::updateQueryString($extraParams);
}
$uriWithoutParams = explode('?', $_SERVER['REQUEST_URI']);
if (isset($uriWithoutParams[0])) {
$uriWithoutParams = $uriWithoutParams[0];
}
$url = Tools::getCurrentUrlProtocolPrefix().Tools::getHttpHost().$uriWithoutParams;
if (Module::isEnabled('arseopro')) {
$module = $this->getModuleInstance();
$url = $module->getUrlConfig()->overrideUpdateQueryStringBaseUrl($url, $extraParams);
}
$params = array();
parse_str($_SERVER['QUERY_STRING'], $params);
if (null !== $extraParams) {
foreach ($extraParams as $key => $value) {
if (null === $value) {
unset($params[$key]);
} else {
$params[$key] = $value;
}
}
}
ksort($params);
if (null !== $extraParams) {
foreach ($params as $key => $param) {
if (null === $param || '' === $param) {
unset($params[$key]);
}
}
} else {
$params = array();
}
$queryString = str_replace('%2F', '/', http_build_query($params));
return $url . ($queryString? "?{$queryString}" : '');
}
}

View File

@@ -0,0 +1,12 @@
<?php
use PrestaShop\PrestaShop\Core\Product\Search\ProductSearchQuery;
use PrestaShop\PrestaShop\Core\Product\Search\Pagination;
use PrestaShop\PrestaShop\Core\Product\Search\ProductSearchContext;
use PrestaShop\PrestaShop\Core\Product\Search\ProductSearchResult;
use PrestaShop\PrestaShop\Core\Product\Search\Facet;
use PrestaShop\PrestaShop\Core\Product\Search\SortOrder;
use PrestaShop\PrestaShop\Core\Product\Search\ProductSearchProviderInterface;
use PrestaShop\PrestaShop\Core\Product\Search\FacetsRendererInterface;
abstract class ProductListingFrontController extends ProductListingFrontControllerCore
{
}

View File

@@ -0,0 +1,35 @@
<?php
/**
* 2007-2018 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:
* https://opensource.org/licenses/OSL-3.0
* 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-2018 PrestaShop SA
* @license https://opensource.org/licenses/OSL-3.0 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;

View File

@@ -0,0 +1,35 @@
<?php
/**
* 2007-2018 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:
* https://opensource.org/licenses/OSL-3.0
* 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-2018 PrestaShop SA
* @license https://opensource.org/licenses/OSL-3.0 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;

View File

@@ -0,0 +1,35 @@
<?php
/**
* 2007-2018 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:
* https://opensource.org/licenses/OSL-3.0
* 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-2018 PrestaShop SA
* @license https://opensource.org/licenses/OSL-3.0 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;

View File

@@ -0,0 +1,35 @@
<?php
/**
* 2007-2018 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:
* https://opensource.org/licenses/OSL-3.0
* 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-2018 PrestaShop SA
* @license https://opensource.org/licenses/OSL-3.0 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;

View File

@@ -0,0 +1,35 @@
<?php
/**
* 2007-2018 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:
* https://opensource.org/licenses/OSL-3.0
* 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-2018 PrestaShop SA
* @license https://opensource.org/licenses/OSL-3.0 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;

View File

@@ -0,0 +1,35 @@
<?php
/**
* 2007-2018 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:
* https://opensource.org/licenses/OSL-3.0
* 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-2018 PrestaShop SA
* @license https://opensource.org/licenses/OSL-3.0 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;

View File

@@ -0,0 +1,35 @@
<?php
/**
* 2007-2018 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:
* https://opensource.org/licenses/OSL-3.0
* 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-2018 PrestaShop SA
* @license https://opensource.org/licenses/OSL-3.0 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;

View File

@@ -0,0 +1,35 @@
<?php
/**
* 2007-2018 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:
* https://opensource.org/licenses/OSL-3.0
* 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-2018 PrestaShop SA
* @license https://opensource.org/licenses/OSL-3.0 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;

View File

@@ -0,0 +1,35 @@
<?php
/**
* 2007-2018 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:
* https://opensource.org/licenses/OSL-3.0
* 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-2018 PrestaShop SA
* @license https://opensource.org/licenses/OSL-3.0 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;

View File

@@ -0,0 +1,51 @@
<?php
/**
* Replaces the string order reference with numeric one
*
* @package gmnumeric
* @author Dariusz Tryba (contact@greenmousestudio.com)
* @copyright Copyright (c) Green Mouse Studio (http://www.greenmousestudio.com)
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
*/
class Order extends OrderCore
{
/*
* module: gmnumeric
* date: 2016-04-18 08:55:44
* version: 1.1.0
*/
public static function generateReference()
{
// return strtoupper(Tools::passwdGen(9, 'NO_NUMERIC'));
$id_shop = (int)Context::getContext()->shop->id;
$reference = Db::getInstance()->getValue( 'SELECT reference FROM ' . _DB_PREFIX_.'orders WHERE id_shop = ' . $id_shop . ' ORDER BY id_order DESC' );
if ( $id_shop == 1 )
$reference = str_replace( 'D', '', $reference );
elseif ( $id_shop == 2 )
$reference = str_replace( 'L', '', $reference );
$reference = str_pad( (int)$reference + 1, 8, '000000000', STR_PAD_LEFT );
if ( $id_shop == 1 )
$reference_number = 'D' . $reference;
elseif ( $id_shop == 2 )
$reference_number = 'L' . $reference;
while ( $count = Db::getInstance()->getValue( 'SELECT COUNT(0) FROM ' . _DB_PREFIX_.'orders WHERE reference = \'' . $reference_number . '\'' ) )
{
$reference++;
$reference = str_pad( (int)$reference + 1, 8, '000000000', STR_PAD_LEFT );
if ( $id_shop == 1 )
$reference_number = 'D' . $reference;
elseif ( $id_shop == 2 )
$reference_number = 'L' . $reference;
}
return $reference_number;
}
}

View File

@@ -0,0 +1,35 @@
<?php
/**
* 2007-2018 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:
* https://opensource.org/licenses/OSL-3.0
* 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-2018 PrestaShop SA
* @license https://opensource.org/licenses/OSL-3.0 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;

View File

@@ -0,0 +1,35 @@
<?php
/**
* 2007-2018 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:
* https://opensource.org/licenses/OSL-3.0
* 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-2018 PrestaShop SA
* @license https://opensource.org/licenses/OSL-3.0 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;

View File

@@ -0,0 +1,35 @@
<?php
/**
* 2007-2018 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:
* https://opensource.org/licenses/OSL-3.0
* 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-2018 PrestaShop SA
* @license https://opensource.org/licenses/OSL-3.0 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;

View File

@@ -0,0 +1,35 @@
<?php
/**
* 2007-2018 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:
* https://opensource.org/licenses/OSL-3.0
* 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-2018 PrestaShop SA
* @license https://opensource.org/licenses/OSL-3.0 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;

View File

@@ -0,0 +1,35 @@
<?php
/**
* 2007-2018 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:
* https://opensource.org/licenses/OSL-3.0
* 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-2018 PrestaShop SA
* @license https://opensource.org/licenses/OSL-3.0 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;

View File

@@ -0,0 +1,35 @@
<?php
/**
* 2007-2018 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:
* https://opensource.org/licenses/OSL-3.0
* 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-2018 PrestaShop SA
* @license https://opensource.org/licenses/OSL-3.0 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;

View File

@@ -0,0 +1,35 @@
<?php
/**
* 2007-2018 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:
* https://opensource.org/licenses/OSL-3.0
* 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-2018 PrestaShop SA
* @license https://opensource.org/licenses/OSL-3.0 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;

View File

@@ -0,0 +1,35 @@
<?php
/**
* 2007-2018 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:
* https://opensource.org/licenses/OSL-3.0
* 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-2018 PrestaShop SA
* @license https://opensource.org/licenses/OSL-3.0 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;

View File

@@ -0,0 +1,42 @@
<?php
/**
* Copyright ETS Software Technology Co., Ltd
*
* NOTICE OF LICENSE
*
* This file is not open source! Each license that you purchased is only available for 1 website only.
* If you want to use this file on more websites (or projects), you need to purchase additional licenses.
* You are not allowed to redistribute, resell, lease, license, sub-license or offer our resources to any third party.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future.
*
* @author ETS Software Technology Co., Ltd
* @copyright ETS Software Technology Co., Ltd
* @license Valid for 1 website (or project) for each purchase of license
*/
class AdminCartRulesController extends AdminCartRulesControllerCore
{
/*
* module: ets_promotion
* date: 2023-11-25 09:55:40
* version: 1.1.9
*/
public function postProcess()
{
if (Tools::isSubmit('submitAddcart_rule') || Tools::isSubmit('submitAddcart_ruleAndStay')) {
$code = Tools::getValue('code');
if($code && Validate::isCleanHtml($code))
{
if(Module::getInstanceByName('ets_promotion')->checkExitCode($code,$this->errors))
return true;
}
}
if(Module::isEnabled('etsdiscountcombinations'))
Module::getInstanceByName('etsdiscountcombinations')->postProcessCartRule();
return parent::postProcess();
}
}

View File

@@ -0,0 +1,43 @@
<?php
/**
* 2012-2016 Patryk Marek PrestaDev.pl
*
* Patryk Marek PrestaDev.pl - PD Facebook Dynamic Ads Feed Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at info@prestadev.pl.
*
* @author Patryk Marek PrestaDev.pl <info@prestadev.pl>
* @copyright 2012-2016 Patryk Marek - PrestaDev.pl
* @link http://prestadev.pl
* @package PD Facebook Dynamic Ads Feed Pro - PrestaShop 1.5.x and 1.6.x Module
* @version 1.0.2
* @license License is for use in domain / or one multistore enviroment (do not modify or reuse this code or part of it) if you want any changes please contact with me at info@prestadev.pl
* @date 27-11-2016
*/
class AdminProductsController extends AdminProductsControllerCore
{
/*
* module: pdgooglemerchantcenterpro
* date: 2023-06-30 14:41:38
* version: 2.5.8
*/
public function initProcess()
{
if (Tools::isSubmit('in_google_shoppingproduct')) {
$id_product = (int)Tools::getValue('id_product');
$context = Context::getContext();
$id_shop = $context->language->id;
$id_lang = $context->shop->id;
if (is_numeric($id_product)) {
$obj = new Product($id_product, false, $id_lang, $id_shop);
$obj->in_google_shopping = $obj->in_google_shopping ? 0 : 1;
$obj->update();
}
}
parent::initProcess();
}
}

View File

@@ -0,0 +1,35 @@
<?php
/**
* 2007-2018 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:
* https://opensource.org/licenses/OSL-3.0
* 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-2018 PrestaShop SA
* @license https://opensource.org/licenses/OSL-3.0 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;

View File

@@ -0,0 +1,35 @@
<?php
/**
* 2007-2018 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:
* https://opensource.org/licenses/OSL-3.0
* 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-2018 PrestaShop SA
* @license https://opensource.org/licenses/OSL-3.0 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;

View File

@@ -0,0 +1,31 @@
<?php
class AuthController extends AuthControllerCore
{
/*
* module: eicaptcha
* date: 2023-08-07 15:45:05
* version: 2.0.3
*/
public function initContent()
{
if ( Tools::isSubmit('submitCreate') ) {
Hook::exec('actionContactFormSubmitCaptcha');
if ( ! sizeof( $this->context->controller->errors ) ) {
parent::initContent();
} else {
$register_form = $this
->makeCustomerForm()
->setGuestAllowed(false)
->fillWith(Tools::getAllValues());
FrontController::initContent();
$this->context->smarty->assign([
'register_form' => $register_form->getProxy(),
'hook_create_account_top' => Hook::exec('displayCustomerAccountFormTop')
]);
$this->setTemplate('customer/registration');
}
} else {
parent::initContent();
}
}
}

View File

@@ -0,0 +1,62 @@
<?php
/**
* Copyright ETS Software Technology Co., Ltd
*
* NOTICE OF LICENSE
*
* This file is not open source! Each license that you purchased is only available for 1 website only.
* If you want to use this file on more websites (or projects), you need to purchase additional licenses.
* You are not allowed to redistribute, resell, lease, license, sub-license or offer our resources to any third party.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future.
*
* @author ETS Software Technology Co., Ltd
* @copyright ETS Software Technology Co., Ltd
* @license Valid for 1 website (or project) for each purchase of license
*/
class CartController extends CartControllerCore
{
/*
* module: ets_promotion
* date: 2023-11-25 09:55:39
* version: 1.1.9
*/
public function postProcess()
{
parent::postProcess();
if(Tools::getIsset('addDiscount') && $this->errors && ($code = Tools::getValue('discount_name')) && Validate::isCleanHtml($code) && !CartRule::cartRuleExists($code)) {
Module::getInstanceByName('ets_promotion')->addCartRule($this->errors,$code);
}
if(Tools::isSubmit('deletePromotionDiscountRule') && ($id_ets_rule = Tools::getValue('deletePromotionDiscountRule')) && Validate::isUnsignedId($id_ets_rule) )
{
Module::getInstanceByName('ets_promotion')->deleteCartRule($id_ets_rule);
}
}
/*
* module: ets_promotion
* date: 2023-11-25 09:55:39
* version: 1.1.9
*/
public function displayAjaxRefresh()
{
if (Configuration::isCatalogMode()) {
return;
}
ob_end_clean();
header('Content-Type: application/json');
header('Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0');
die(json_encode([
'cart_detailed' => Module::isEnabled('ets_extraoptions') ? $this->context->smarty->fetch(_PS_MODULE_DIR_.'ets_extraoptions/views/templates/hook/checkout/cart-detailed.tpl'): $this->render('checkout/_partials/cart-detailed'),
'cart_detailed_totals' => $this->render('checkout/_partials/cart-detailed-totals'),
'cart_summary_items_subtotal' => $this->render('checkout/_partials/cart-summary-items-subtotal'),
'cart_summary_subtotals_container' => $this->render('checkout/_partials/cart-summary-subtotals'),
'cart_summary_totals' => $this->render('checkout/_partials/cart-summary-totals'),
'cart_detailed_actions' => $this->render('checkout/_partials/cart-detailed-actions'),
'cart_voucher' => $this->context->smarty->fetch(_PS_MODULE_DIR_.'ets_promotion/views/templates/hook/checkout/cart-voucher.tpl'),
'cart_sumary_products' => $this->context->smarty->fetch(_PS_MODULE_DIR_.'ets_promotion/views/templates/hook/checkout/cart_sumary_products.tpl'),
]));
}
}

View File

@@ -0,0 +1,438 @@
<?php
use PrestaShop\PrestaShop\Adapter\Image\ImageRetriever;
use PrestaShop\PrestaShop\Adapter\Product\PriceFormatter;
use PrestaShop\PrestaShop\Core\Product\ProductListingPresenter;
use PrestaShop\PrestaShop\Adapter\Product\ProductColorsRetriever;
class CmsController extends CmsControllerCore
{
/*
* module: appagebuilder
* date: 2022-10-25 14:25:30
* version: 2.2.0
*/
public static function psversion($part = 1)
{
$version = _PS_VERSION_;
$exp = explode('.', $version);
if ($part == 0) {
return $exp[0];
}
if ($part == 1) {
if ($exp[0] >= 8) {
return 7;
}
return $exp[1];
}
if ($part == 2) {
return $exp[2];
}
if ($part == 3) {
return $exp[3];
}
}
public function initContent()
{
if ($this->assignCase == 1) {
$cmsVar = $this->objectPresenter->present($this->cms);
$filteredCmsContent = Hook::exec(
'filterCmsContent',
array('object' => $cmsVar),
$id_module = null,
$array_return = false,
$check_exceptions = true,
$use_push = false,
$id_shop = null,
$chain = true
);
if (!empty($filteredCmsContent['object'])) {
$cmsVar = $filteredCmsContent['object'];
}
if ((bool)Module::isEnabled('appagebuilder')) {
$appagebuilder = Module::getInstanceByName('appagebuilder');
$cmsVar['content'] = $appagebuilder->buildShortCode($cmsVar['content']);
}
$cmsVar['content'] = $this->returnContent($cmsVar['content']);
$this->context->smarty->assign(array(
'cms' => $cmsVar,
));
if ($this->cms->indexation == 0) {
$this->context->smarty->assign('nobots', true);
}
$this->setTemplate(
'cms/page',
array('entity' => 'cms', 'id' => $this->cms->id)
);
} elseif ($this->assignCase == 2) {
$cmsCategoryVar = $this->getTemplateVarCategoryCms();
$filteredCmsCategoryContent = Hook::exec(
'filterCmsCategoryContent',
array('object' => $cmsCategoryVar),
$id_module = null,
$array_return = false,
$check_exceptions = true,
$use_push = false,
$id_shop = null,
$chain = true
);
if (!empty($filteredCmsCategoryContent['object'])) {
$cmsCategoryVar = $filteredCmsCategoryContent['object'];
}
$this->context->smarty->assign($cmsCategoryVar);
$this->setTemplate('cms/category');
}
FrontController::initContent();
unset($id_module);
unset($array_return);
unset($check_exceptions);
unset($use_push);
unset($id_shop);
unset($chain);
}
/*
* module: leoslideshow
* date: 2022-10-25 14:25:30
* version: 1.0.4
*/
public function display()
{
if ((bool) Module::isEnabled('leoslideshow')) {
$leoslideshow = Module::getInstanceByName('leoslideshow');
$leoslideshow->processCMS();
}
return parent::display();
}
public function returnProduct($id_product)
{
$x = (array)new Product($id_product, true, $this->context->language->id);
if (is_int($x['id'])) {
$productss[$id_product] = $x;
$productss[$id_product]['id_product'] = $id_product;
}
$products = Product::getProductsProperties($this->context->language->id, $productss);
$assembler = new ProductAssembler($this->context);
$presenterFactory = new ProductPresenterFactory($this->context);
$presentationSettings = $presenterFactory->getPresentationSettings();
$presenter = new ProductListingPresenter(
new ImageRetriever(
$this->context->link
),
$this->context->link,
new PriceFormatter(),
new ProductColorsRetriever(),
$this->context->getTranslator()
);
$products_for_template = [];
foreach ($products as $rawProduct) {
$products_for_template[] = $presenter->present(
$presentationSettings,
$assembler->assembleProduct($rawProduct),
$this->context->language
);
}
$this->context->smarty->assign('products', $products_for_template);
$this->context->smarty->assign('feedtype', "cmsSingleProductFeed");
return $this->context->smarty->fetch('module:cmsproducts/products.tpl');
}
public function returnProducts($id_product)
{
$explode_products = explode(",", $id_product);
foreach ($explode_products AS $idp) {
$explode[] = $idp;
foreach ($explode as $tproduct) {
if ($tproduct != '') {
$x = (array)new Product($tproduct, true, $this->context->language->id);
if (is_int($x['id'])) {
$productss[$tproduct] = $x;
$productss[$tproduct]['id_product'] = $tproduct;
}
}
}
}
$products = Product::getProductsProperties($this->context->language->id, $productss);
$assembler = new ProductAssembler($this->context);
$presenterFactory = new ProductPresenterFactory($this->context);
$presentationSettings = $presenterFactory->getPresentationSettings();
$presenter = new ProductListingPresenter(
new ImageRetriever(
$this->context->link
),
$this->context->link,
new PriceFormatter(),
new ProductColorsRetriever(),
$this->context->getTranslator()
);
$products_for_template = [];
foreach ($products as $rawProduct) {
$products_for_template[] = $presenter->present(
$presentationSettings,
$assembler->assembleProduct($rawProduct),
$this->context->language
);
}
$this->context->smarty->assign('products', ($this->psversion() == 7 ? $products_for_template : $products));
$this->context->smarty->assign('feedtype', "cmsProductsFeed");
return $this->context->smarty->fetch('module:cmsproducts/products.tpl');
}
public function getProductsByCategoryAndLimit($categoryId = 156, $productsLimit = 4)
{
$products = Product::getProducts($this->context->language->id, 0, $productsLimit, 'id_product', 'ASC', $categoryId);
$assembler = new ProductAssembler($this->context);
$presenterFactory = new ProductPresenterFactory($this->context);
$presentationSettings = $presenterFactory->getPresentationSettings();
$presenter = new ProductListingPresenter(
new ImageRetriever(
$this->context->link
),
$this->context->link,
new PriceFormatter(),
new ProductColorsRetriever(),
$this->context->getTranslator()
);
$products_for_template = [];
foreach ($products as $rawProduct) {
$products_for_template[] = $presenter->present(
$presentationSettings,
$assembler->assembleProduct($rawProduct),
$this->context->language
);
}
$this->context->smarty->assign('products', ($this->psversion() == 7 ? $products_for_template : $products));
$this->context->smarty->assign('feedtype', "cmsProductsFeed");
return $this->context->smarty->fetch('module:cmsproducts/products.tpl');
}
public function returnCarouselHpp($block)
{
return $this->displayCarouselHpp($block);
}
public function returnProductsHpp($block)
{
if (class_exists("Hpp")) {
$hpp = new Hpp();
if (method_exists($hpp, 'returnProducts')) {
return $this->displayHpp($hpp->returnProducts($block), $block);
} else {
return $this->noModuleMessage("Homepage Products Pro");
}
} else {
return $this->noModuleMessage("Homepage Products Pro");
}
}
public function returnCcarousel($block)
{
$ccarousel = Module::getInstanceByName('ccarousel');
if ($ccarousel != false) {
$ccarousel = new ccarousel();
if (method_exists($ccarousel, 'shortcode')) {
return $ccarousel->shortcode($block);
} else {
return $this->noModuleMessage("Custom contents carousel");
}
} else {
return $this->noModuleMessage("Custom contents carousel");
}
}
public function returnProductsRpp($block)
{
if (class_exists("Ppb")) {
$rpp = new Ppb();
if (method_exists($rpp, 'returnProducts')) {
return $this->displayRpp($rpp->returnProducts($block));
} else {
return $this->noModuleMessage("Related Products Pro");
}
} else {
return $this->noModuleMessage("Related Products Pro");
}
}
public function returnHtmlboxpro($block)
{
if (class_exists("htmlboxpro")) {
$hbp = new htmlboxpro();
$hb = new hbox();
if (method_exists($hbp, 'prepare_variables')) {
$hb = new hbox($block, $this->context->language->id);
if ($hb->id != NULL && is_numeric($hb->id)) {
$contents = $hbp->prepare_variables('', $hb->body, array());
$this->context->smarty->assign('cmsproducts_htmlboxpro', $contents);
return $this->context->smarty->fetch('module:cmsproducts/html.tpl');
} else {
//
}
} else {
//return $this->noModuleMessage("Html box pro");
}
} else {
//return $this->noModuleMessage("Html box pro");
}
}
public function returnProductsDiffTool($id)
{
if (class_exists("beforeafter")) {
$bf = new beforeafter();
if (method_exists($bf, 'displayOnCms')) {
$_GET['id_product'] = (int)$id;
$this->context->controller->addJS($this->_path . '../beforeafter/js/jquery.event.move.js', 'all');
$this->context->controller->addJS($this->_path . '../beforeafter/js/jquery.twentytwenty.js', 'all');
$this->context->controller->addCSS($this->_path . '../beforeafter/css/twentytwenty.css');
return $bf->displayOnCms(array());
} else {
return $this->noModuleMessage("Before and after");
}
} else {
return $this->noModuleMessage("Before and after");
}
}
public function displayRpp($products)
{
if (count($products) <= 0) {
$this->context->smarty->assign('feedtype', "noProducts");
} else {
$this->context->smarty->assign('products', $products);
$this->context->smarty->assign('feedtype', "rppfeed");
}
$contents = $this->context->smarty->fetch('module:cmsproducts/products.tpl');
return $contents;
}
public function displayHpp($products, $id = 0)
{
if (count($products) <= 0) {
$this->context->smarty->assign('feedtype', "noProducts");
} else {
$this->context->smarty->assign('products', $products);
if (class_exists('HppBlock')) {
$this->context->smarty->assign('id_hpp', $id);
$block = new HppBlock($id, $this->context->language->id);
$this->context->smarty->assign('block', $block);
}
$this->context->smarty->assign('feedtype', "hppfeed");
$this->context->smarty->assign('id_hpp_block', 'hpp'.$id);
}
$contents = $this->context->smarty->fetch('module:cmsproducts/products.tpl') . $this->displayCarouselHpp($id);
return $contents;
}
public function displayCarouselHpp($id = 0)
{
$this->context->smarty->assign('id_hpp', $id);
if (class_exists('HppBlock')) {
$block = new HppBlock($id, $this->context->language->id);
$this->context->smarty->assign('block', $block);
$contents = $this->context->smarty->fetch('module:cmsproducts/products-carousel.tpl');
return $contents;
}
}
public function noModuleMessage($module)
{
$products = false;
$this->context->smarty->assign('products', $products);
$this->context->smarty->assign('module', $module);
$this->context->smarty->assign('feedtype', "error");
$contents = $this->context->smarty->fetch('module:cmsproducts/products.tpl');
return $contents;
}
public function returnlastReviews()
{
if (Module::isInstalled('lastreviews') && Module::isEnabled('lastreviews')) {
$module = Module::getInstanceByName('lastreviews');
if (method_exists($module, 'showOnCmsPage')) {
return $module->showOnCmsPage();
}
}
return $this->noModuleMessage("<a href=\"https://mypresta.eu/modules/front-office-features/last-product-reviews.html\">[Last Product Reviews by Mypresta]</a>");
}
public function returnContent($contents)
{
preg_match_all('/\[ccarousel\:[(0-9\,)]+\]/i', $contents, $matches);
foreach ($matches[0] as $index => $match) {
$explode = explode(":", $match);
$contents = str_replace($match, $this->returnCcarousel(str_replace("]", "", $explode[1])), $contents);
}
preg_match_all('/\{products\:[(0-9\,)]+\}/i', $contents, $matches);
foreach ($matches[0] as $index => $match) {
$explode = explode(":", $match);
$contents = str_replace($match, $this->returnProducts(str_replace("}", "", $explode[1])), $contents);
}
preg_match_all('/\{product\:[(0-9\,)]+\}/i', $contents, $matches);
foreach ($matches[0] as $index => $match) {
$explode = explode(":", $match);
$contents = str_replace($match, $this->returnProduct(str_replace("}", "", $explode[1])), $contents);
}
preg_match_all('/\{products_from_category_and_limit\:[(0-9\,0-9\)]+\}/i', $contents, $matches);
foreach ($matches[0] as $index => $match) {
$explode = explode(":", $match);
$params = explode(",", str_replace("}", "", $explode[1]));
if (count($params) == 2) {
$categoryId = (int)$params[0];
$productsLimit = (int)$params[1];
$contents = str_replace($match, $this->getProductsByCategoryAndLimit($categoryId, $productsLimit), $contents);
}
}
preg_match_all('/\{hpp\:[(0-9)]+\}/i', $contents, $matches);
foreach ($matches[0] as $index => $match) {
$explode = explode(":", $match);
$contents = str_replace($match, $this->returnProductsHpp(str_replace("}", "", $explode[1])), $contents);
}
preg_match_all('/\{carousel\:[(0-9)]+\}/i', $contents, $matches);
foreach ($matches[0] as $index => $match) {
$explode = explode(":", $match);
$contents = str_replace($match, $this->returnCarouselHpp(str_replace("}", "", $explode[1])), $contents);
}
preg_match_all('/\{rpp\:[(0-9)]+\}/i', $contents, $matches);
foreach ($matches[0] as $index => $match) {
$explode = explode(":", $match);
$contents = str_replace($match, $this->returnProductsRpp(str_replace("}", "", $explode[1])), $contents);
}
preg_match_all('/\{lastreviews\}/i', $contents, $matches);
foreach ($matches[0] as $index => $match) {
$contents = str_replace($match, $this->returnlastReviews(str_replace("}", "")), $contents);
}
preg_match_all('/\{htmlboxpro\:[(0-9)]+\}/i', $contents, $matches);
foreach ($matches[0] as $index => $match) {
$explode = explode(":", $match);
$contents = str_replace($match, $this->returnHtmlboxpro(str_replace("}", "", $explode[1])), $contents);
}
preg_match_all('/\{diff\:[(0-9)]+\}/i', $contents, $matches);
foreach ($matches[0] as $index => $match) {
$explode = explode(":", $match);
$contents = str_replace($match, $this->returnProductsDiffTool(str_replace("}", "", $explode[1])), $contents);
}
return $contents;
}
}

View File

@@ -0,0 +1,41 @@
<?php
/**
* Copyright ETS Software Technology Co., Ltd
*
* NOTICE OF LICENSE
*
* This file is not open source! Each license that you purchased is only available for 1 website only.
* If you want to use this file on more websites (or projects), you need to purchase additional licenses.
* You are not allowed to redistribute, resell, lease, license, sub-license or offer our resources to any third party.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future.
*
* @author ETS Software Technology Co., Ltd
* @copyright ETS Software Technology Co., Ltd
* @license Valid for 1 website (or project) for each purchase of license
*/
class OrderController extends OrderControllerCore
{
/*
* module: ets_promotion
* date: 2023-11-25 09:55:39
* version: 1.1.9
*/
public function displayAjaxselectDeliveryOption()
{
$cart = $this->cart_presenter->present(
$this->context->cart
);
ob_end_clean();
header('Content-Type: application/json');
$this->ajaxRender(json_encode([
'preview' => $this->context->smarty->fetch(_PS_MODULE_DIR_.'ets_promotion/views/templates/hook/checkout/cart-summary.tpl',null,null, [
'cart' => $cart,
'static_token' => Tools::getToken(false),
]),
]));
}
}

View File

@@ -0,0 +1,32 @@
<?php
/**
* 2007-2015 Apollotheme
*
* NOTICE OF LICENSE
*
* ApPageBuilder is module help you can build content for your shop
*
* DISCLAIMER
*
* @author Apollotheme <apollotheme@gmail.com>
* @copyright 2007-2015 Apollotheme
* @license http://apollotheme.com - prestashop template provider
*/
class ProductController extends ProductControllerCore
{
/*
* module: appagebuilder
* date: 2022-10-25 14:25:30
* version: 2.2.0
*/
public function getTemplateVarProduct()
{
$product = parent::getTemplateVarProduct();
if ((bool)Module::isEnabled('appagebuilder')) {
$appagebuilder = Module::getInstanceByName('appagebuilder');
$product['description'] = $appagebuilder->buildShortCode($product['description']);
$product['description_short'] = $appagebuilder->buildShortCode($product['description_short']);
}
return $product;
}
}

View File

@@ -0,0 +1,35 @@
<?php
/**
* 2007-2018 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:
* https://opensource.org/licenses/OSL-3.0
* 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-2018 PrestaShop SA
* @license https://opensource.org/licenses/OSL-3.0 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;

View File

@@ -0,0 +1,42 @@
<?php
/**
* 2007-2017 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:
* https://opensource.org/licenses/OSL-3.0
* 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-2017 PrestaShop SA
* @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
class CategoryController extends CategoryControllerCore
{
/*
* module: appagebuilder
* date: 2022-10-25 14:25:30
* version: 2.2.0
*/
protected function getTemplateVarCategory()
{
$category = parent::getTemplateVarCategory();
if ((bool)Module::isEnabled('appagebuilder')) {
$appagebuilder = Module::getInstanceByName('appagebuilder');
$category['description'] = $appagebuilder->buildShortCode($category['description']);
}
return $category;
}
}

View File

@@ -0,0 +1,35 @@
<?php
/**
* 2007-2018 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:
* https://opensource.org/licenses/OSL-3.0
* 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-2018 PrestaShop SA
* @license https://opensource.org/licenses/OSL-3.0 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;

View File

@@ -0,0 +1,35 @@
<?php
/**
* 2007-2018 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:
* https://opensource.org/licenses/OSL-3.0
* 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-2018 PrestaShop SA
* @license https://opensource.org/licenses/OSL-3.0 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;

35
override/index.php Normal file
View File

@@ -0,0 +1,35 @@
<?php
/**
* 2007-2018 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:
* https://opensource.org/licenses/OSL-3.0
* 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-2018 PrestaShop SA
* @license https://opensource.org/licenses/OSL-3.0 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;

View File

@@ -0,0 +1,19 @@
<?php
/**
* This file protect the directory
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*/
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,98 @@
<?php
/**
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*/
if (!defined('_PS_VERSION_')) {
exit;
}
/**
* Implements getJprestaModelObjectClassName() and getJprestaModelObjectId() to enable the HTML cache provided by the
* module Page Cache Ultimate created by jpresta.com
*/
class af_producttagsprotagsModuleFrontControllerOverride extends af_producttagsprotagsModuleFrontController
{
/**
* @return string The ObjectModel class name to be used by Page Cache Ultimate module to refresh the cache of pages generated by this controller
*/
public static function getJprestaModelObjectClassName()
{
// A fake class to enable the cache
return 'AdvancedTagsModel';
}
/**
* @return int|null The ID of the current ObjectModel (if any) to be used by Page Cache Ultimate module to refresh the cache of pages generated by this controller
*/
public function getJprestaModelObjectId()
{
$tag = AdvancedTagsModel::getTagByLinkRewrite(Tools::getValue('tagName'), $this->context->language->id);
if (empty($tag)) {
$tag_name = str_replace('-', ' ', Tools::getValue('tagName'));
$tag_id = AdvancedTagsModel::getIdTagByName($tag_name, $this->context->language->id);
} else {
$tag_id = $tag['adtag_id_tag'];
}
if (!$tag_id) {
$tag_id = null;
}
return $tag_id;
}
/**
* List all URLs generated by this controller for the current shop context and the specified language.
* This is used by the Jresta-Cache-Warmer service to generate the cache of these pages.
* @param $id_lang int ID of the language
* @return string[] All URLs to warmup
*/
public static function getJprestaAllURLs($id_lang) {
$context = Context::getContext();
$links = [];
$afsp = Module::getInstanceByName('af_producttagspro');
if ($afsp) {
if (Group::isFeatureActive()) {
$groups = FrontController::getCurrentCustomerGroups();
$tags = JPresta\SpeedPack\JprestaUtils::dbSelectRows('
SELECT t.name, adTag.`adtag_link_rewrite`
FROM `' . _DB_PREFIX_ . 'tag_count` pt
LEFT JOIN `' . _DB_PREFIX_ . 'tag` t ON (t.id_tag = pt.id_tag)
LEFT JOIN `' . _DB_PREFIX_ . 'af_advanced_tags` adTag ON (adTag.adtag_id_tag = t.id_tag)
WHERE (adTag.`adtag_is_show` = 1 OR adTag.`adtag_is_show` IS NULL) AND pt.`id_group` ' . (count($groups) ? 'IN (' . implode(',', $groups) . ')' : '= 1') . '
AND pt.`id_lang` = ' . (int) $id_lang . ' AND pt.`id_shop` = ' . (int) $context->shop->id);
} else {
$tags = JPresta\SpeedPack\JprestaUtils::dbSelectRows('
SELECT t.name
FROM `' . _DB_PREFIX_ . 'tag_count` pt
LEFT JOIN `' . _DB_PREFIX_ . 'tag` t ON (t.id_tag = pt.id_tag)
LEFT JOIN `' . _DB_PREFIX_ . 'af_advanced_tags` adTag ON (adTag.adtag_id_tag = t.id_tag)
WHERE (adTag.`adtag_is_show` = 1 OR adTag.`adtag_is_show` IS NULL) AND pt.id_group = 0 AND pt.`id_lang` = ' . (int) $id_lang . ' AND pt.`id_shop` = ' . (int) $context->shop->id);
}
foreach ($tags as $tag) {
$links[] = $afsp->getUrlFrontTag($tag['name'], isset($tag['adtag_link_rewrite']) ? $tag['adtag_link_rewrite'] : null, $id_lang);
}
}
return $links;
}
/**
* An estimated number of URLs that will be returned by self::getJprestaAllURLs() for the current shop context.
* Since we don't have the id_lang parameter we recommend to return the number of URLs for the language that have
* the most URLs.
* @return int The estimated number of URLs to warmup for the current shop context
*/
public static function getJprestaAllURLsCount() {
$queryCountPages = '
SELECT COUNT(*)
FROM `' . _DB_PREFIX_ . 'tag_count` pt
LEFT JOIN `' . _DB_PREFIX_ . 'tag` t ON (t.id_tag = pt.id_tag)
LEFT JOIN `' . _DB_PREFIX_ . 'af_advanced_tags` adTag ON (adTag.adtag_id_tag = t.id_tag)
WHERE (adTag.`adtag_is_show` = 1 OR adTag.`adtag_is_show` IS NULL) AND pt.id_group = '.(Group::isFeatureActive() ? 1 : 0).' AND pt.`id_lang` = ' . (int) Configuration::get('PS_LANG_DEFAULT') . ' AND pt.`id_shop` = ' . (int) Shop::getContextShopID();
return (int) JPresta\SpeedPack\JprestaUtils::dbGetValue($queryCountPages);
}
}

View File

@@ -0,0 +1,19 @@
<?php
/**
* This file protect the directory
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*/
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,19 @@
<?php
/**
* This file protect the directory
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*/
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,19 @@
<?php
/**
* This file protect the directory
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*/
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,69 @@
<?php
/**
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*/
if (!defined('_PS_VERSION_')) {
exit;
}
/**
* Implements getJprestaModelObjectClassName() and getJprestaModelObjectId() to enable the HTML cache provided by the
* module Page Cache Ultimate created by jpresta.com
*/
class Af_SeopagesSeopageModuleFrontControllerOverride extends Af_SeopagesSeopageModuleFrontController
{
/**
* @return string The ObjectModel class name to be used by Page Cache Ultimate module to refresh the cache of pages generated by this controller
*/
public static function getJprestaModelObjectClassName()
{
// A fake class to enable the cache
return 'AfSeoPage';
}
/**
* @return int|null The ID of the current ObjectModel (if any) to be used by Page Cache Ultimate module to refresh the cache of pages generated by this controller
*/
public function getJprestaModelObjectId()
{
return null;
}
/**
* List all URLs generated by this controller for the current shop context and the specified language.
* This is used by the Jresta-Cache-Warmer service to generate the cache of these pages.
* @param $id_lang int ID of the language
* @return string[] All URLs to warmup
*/
public static function getJprestaAllURLs($id_lang) {
if (file_exists(_PS_MODULE_DIR_ . '/af_seopages/classes/SiteMap.php')) {
require_once _PS_MODULE_DIR_ . '/af_seopages/classes/SiteMap.php';
$afsp = Module::getInstanceByName('af_seopages');
if ($afsp) {
$sitemap = new SiteMap($afsp);
$links = $sitemap->getSitemapLinks($id_lang, (int)Shop::getContextShopID());
if (is_array($links)) {
return $links;
}
}
}
return [];
}
/**
* An estimated number of URLs that will be returned by self::getJprestaAllURLs() for the current shop context.
* Since we don't have the id_lang parameter we recommend to return the number of URLs for the language that have
* the most URLs.
* @return int The estimated number of URLs to warmup for the current shop context
*/
public static function getJprestaAllURLsCount() {
$queryCountPages = 'SELECT COUNT(DISTINCT p.id_seopage) FROM `'._DB_PREFIX_.'af_seopage` p INNER JOIN `'._DB_PREFIX_.'af_seopage_lang` l ON p.id_seopage = l.id_seopage WHERE p.active=1 AND l.id_shop=' . (int) Shop::getContextShopID();
return (int) JPresta\SpeedPack\JprestaUtils::dbGetValue($queryCountPages);
}
}

View File

@@ -0,0 +1,19 @@
<?php
/**
* This file protect the directory
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*/
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,19 @@
<?php
/**
* This file protect the directory
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*/
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,19 @@
<?php
/**
* This file protect the directory
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*/
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,36 @@
<?php
/**
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*/
if (!defined('_PS_VERSION_')) {
exit;
}
class ConfiguratorProductModuleFrontControllerOverride extends ConfiguratorProductModuleFrontController
{
/**
* @return string
*/
public static function getJprestaModelObjectClassName()
{
return 'Product';
}
/**
* @return int|null
*/
public function getJprestaModelObjectId()
{
$id_product = (int)Tools::getValue('id_product');
if ($id_product && ($postObj = new Product($id_product)) && Validate::isLoadedObject($postObj)) {
return $id_product;
}
return null;
}
}

View File

@@ -0,0 +1,19 @@
<?php
/**
* This file protect the directory
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*/
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,19 @@
<?php
/**
* This file protect the directory
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*/
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,10 @@
<?php
class ContactformOverride extends Contactform
{
public function sendMessage() {
Hook::exec('actionContactFormSubmitBefore');
if ( !sizeof($this->context->controller->errors)) {
parent::sendMessage();
}
}
}

View File

@@ -0,0 +1,39 @@
<?php
/**
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*/
if (!defined('_PS_VERSION_')) {
exit;
}
/**
* Implements getJprestaModelObjectClassName() and getJprestaModelObjectId() to enable the HTML cache provided by the
* module Page Cache Ultimate created by jpresta.com
*/
class Ets_blogBlogModuleFrontControllerOverride extends Ets_blogBlogModuleFrontController
{
/**
* @return string The ObjectModel class name to be used by Page Cache Ultimate module to refresh the cache of pages generated by this controller
*/
public static function getJprestaModelObjectClassName()
{
return 'Ets_blog_post';
}
/**
* @return int|null The ID of the current ObjectModel (if any) to be used by Page Cache Ultimate module to refresh the cache of pages generated by this controller
*/
public function getJprestaModelObjectId()
{
$id_post = (int)Tools::getValue('id_post');
if ($id_post && ($postObj = new Ets_blog_post($id_post)) && Validate::isLoadedObject($postObj)) {
return $id_post;
}
return null;
}
}

View File

@@ -0,0 +1,19 @@
<?php
/**
* This file protect the directory
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*/
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,19 @@
<?php
/**
* This file protect the directory
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*/
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,19 @@
<?php
/**
* This file protect the directory
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*/
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,39 @@
<?php
/**
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*/
if (!defined('_PS_VERSION_')) {
exit;
}
/**
* This override is disabled by default because the views 'count' is updated each time and so clears the cache is soon as it is created.
* To work, this count should be disabled or directly done with an SQL query without using the ObjectModel function 'update'.
*/
class EverPsBlogauthorModuleFrontControllerOverride extends EverPsBlogauthorModuleFrontController
{
/**
* @return string The ObjectModel class name to be used by Page Cache Ultimate module to refresh the cache of pages generated by this controller
*/
public static function getJprestaModelObjectClassName()
{
return 'EverPsBlogAuthor';
}
/**
* @return int|null The ID of the current ObjectModel (if any) to be used by Page Cache Ultimate module to refresh the cache of pages generated by this controller
*/
public function getJprestaModelObjectId()
{
$id_object = (int)Tools::getValue('id_ever_author');
if ($id_object && ($postObj = new EverPsBlogAuthor($id_object)) && Validate::isLoadedObject($postObj)) {
return $id_object;
}
return null;
}
}

View File

@@ -0,0 +1,39 @@
<?php
/**
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*/
if (!defined('_PS_VERSION_')) {
exit;
}
/**
* This override is disabled by default because the views 'count' is updated each time and so clears the cache is soon as it is created.
* To work, this count should be disabled or directly done with an SQL query without using the ObjectModel function 'update'.
*/
class EverPsBlogcategoryModuleFrontControllerOverride extends EverPsBlogcategoryModuleFrontController
{
/**
* @return string The ObjectModel class name to be used by Page Cache Ultimate module to refresh the cache of pages generated by this controller
*/
public static function getJprestaModelObjectClassName()
{
return 'EverPsBlogCategory';
}
/**
* @return int|null The ID of the current ObjectModel (if any) to be used by Page Cache Ultimate module to refresh the cache of pages generated by this controller
*/
public function getJprestaModelObjectId()
{
$id_object = (int)Tools::getValue('id_ever_category');
if ($id_object && ($postObj = new EverPsBlogCategory($id_object)) && Validate::isLoadedObject($postObj)) {
return $id_object;
}
return null;
}
}

View File

@@ -0,0 +1,19 @@
<?php
/**
* This file protect the directory
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*/
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,39 @@
<?php
/**
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*/
if (!defined('_PS_VERSION_')) {
exit;
}
/**
* Implements getJprestaModelObjectClassName() and getJprestaModelObjectId() to enable the HTML cache provided by the
* module Page Cache Ultimate created by jpresta.com
*/
class EverPsBlogpostModuleFrontControllerOverride extends EverPsBlogpostModuleFrontController
{
/**
* @return string The ObjectModel class name to be used by Page Cache Ultimate module to refresh the cache of pages generated by this controller
*/
public static function getJprestaModelObjectClassName()
{
return 'EverPsBlogPost';
}
/**
* @return int|null The ID of the current ObjectModel (if any) to be used by Page Cache Ultimate module to refresh the cache of pages generated by this controller
*/
public function getJprestaModelObjectId()
{
$id_post = (int)Tools::getValue('id_ever_post');
if ($id_post && ($postObj = new EverPsBlogPost($id_post)) && Validate::isLoadedObject($postObj)) {
return $id_post;
}
return null;
}
}

View File

@@ -0,0 +1,39 @@
<?php
/**
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*/
if (!defined('_PS_VERSION_')) {
exit;
}
/**
* This override is disabled by default because the views 'count' is updated each time and so clears the cache is soon as it is created.
* To work, this count should be disabled or directly done with an SQL query without using the ObjectModel function 'update'.
*/
class EverPsBlogtagModuleFrontControllerOverride extends EverPsBlogtagModuleFrontController
{
/**
* @return string The ObjectModel class name to be used by Page Cache Ultimate module to refresh the cache of pages generated by this controller
*/
public static function getJprestaModelObjectClassName()
{
return 'EverPsBlogTag';
}
/**
* @return int|null The ID of the current ObjectModel (if any) to be used by Page Cache Ultimate module to refresh the cache of pages generated by this controller
*/
public function getJprestaModelObjectId()
{
$id_object = (int)Tools::getValue('id_ever_tag');
if ($id_object && ($postObj = new EverPsBlogTag($id_object)) && Validate::isLoadedObject($postObj)) {
return $id_object;
}
return null;
}
}

View File

@@ -0,0 +1,19 @@
<?php
/**
* This file protect the directory
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*/
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,19 @@
<?php
/**
* This file protect the directory
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*/
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,123 @@
<?php
/**
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*/
if (!defined('_PS_VERSION_')) {
exit;
}
/**
* Implements getJprestaModelObjectClassName() and getJprestaModelObjectId() to enable the HTML cache provided by the
* module Page Cache Ultimate created by jpresta.com
*/
class FaqsDisplayModuleFrontControllerOverride extends FaqsDisplayModuleFrontController
{
/**
* @return string The ObjectModel class name to be used by Page Cache Ultimate module to refresh the cache of pages generated by this controller
*/
public static function getJprestaModelObjectClassName()
{
$faqCategoryId = Tools::getValue("category");
$faqId = Tools::getValue("question");
if ($faqCategoryId && $faqId) {
return 'faqsPost';
}
else if ($faqCategoryId) {
return 'faqsCategory';
}
else {
return 'FakeFaqToEnableCache';
}
}
/**
* @return int|null The ID of the current ObjectModel (if any) to be used by Page Cache Ultimate module to refresh the cache of pages generated by this controller
*/
public function getJprestaModelObjectId()
{
$faqCategoryId = Tools::getValue("category");
$faqId = Tools::getValue("question");
if ($faqCategoryId && $faqId) {
$faq = faqsPost::getFaqsByUrl((int) Shop::getContextShopID(), Context::getContext()->language->id, $faqCategoryId, $faqId, true);
return $faq[0] ? (int) $faq[0]['id_gomakoil_faq'] : null;
}
else if ($faqCategoryId) {
$cat = faqsCategory::getCategoryByName((int) Shop::getContextShopID(), Context::getContext()->language->id, $faqCategoryId);
return $cat[0] ? (int) $cat[0]['id_gomakoil_faq_category'] : null;
}
else {
return null;
}
}
/**
* List all URLs generated by this controller for the current shop context and the specified language.
* This is used by the Jresta-Cache-Warmer service to generate the cache of these pages.
* @param $id_lang int ID of the language
* @return string[] All URLs to warmup
*/
public static function getJprestaAllURLs($id_lang)
{
$id_shop = (int)Shop::getContextShopID();
$links = [];
// URL of the root
$baseUrl = $links[] = Context::getContext()->link->getModuleLink('faqs', 'display', [], $id_shop, $id_lang);
// URLs of categories
$cats = JPresta\SpeedPack\JprestaUtils::dbSelectRows('
SELECT c.id_gomakoil_faq_category, cl.link_rewrite
FROM `' . _DB_PREFIX_ . 'gomakoil_faq_category` c
LEFT JOIN `' . _DB_PREFIX_ . 'gomakoil_faq_category_shop` cs ON (c.id_gomakoil_faq_category = cs.id_gomakoil_faq_category)
LEFT JOIN `' . _DB_PREFIX_ . 'gomakoil_faq_category_lang` cl ON (c.id_gomakoil_faq_category = cl.id_gomakoil_faq_category)
WHERE c.active=1 AND cs.id_shop=' . (int)$id_shop . ' AND cl.id_lang=' . (int)$id_lang);
foreach ($cats as $cat) {
if (!faqs::getRewriteSettings()) {
$links[] = $baseUrl . '&category=' . $cat['link_rewrite'];
} else {
$links[] = $baseUrl . $cat['link_rewrite'] . '.html';
}
// URLs of FAQs
$faqs = JPresta\SpeedPack\JprestaUtils::dbSelectRows('
SELECT fl.link_rewrite
FROM `' . _DB_PREFIX_ . 'gomakoil_faq` f
LEFT JOIN `' . _DB_PREFIX_ . 'gomakoil_faq_shop` fs ON (f.id_gomakoil_faq = fs.id_gomakoil_faq)
LEFT JOIN `' . _DB_PREFIX_ . 'gomakoil_faq_lang` fl ON (f.id_gomakoil_faq = fl.id_gomakoil_faq)
WHERE f.active=1 AND f.id_gomakoil_faq_category=' . (int)$cat['id_gomakoil_faq_category'] . ' AND fs.id_shop=' . (int)$id_shop . ' AND fl.id_lang=' . (int)$id_lang);
foreach ($faqs as $faq) {
if (!faqs::getRewriteSettings()) {
$links[] = $baseUrl . '&category=' . $cat['link_rewrite'] . '&question=' . $faq['link_rewrite'];
} else {
$links[] = $baseUrl . $cat['link_rewrite'] . '/' . $faq['link_rewrite'] . '.html';
}
}
}
return $links;
}
/**
* An estimated number of URLs that will be returned by self::getJprestaAllURLs() for the current shop context.
* Since we don't have the id_lang parameter we recommend to return the number of URLs for the language that have
* the most URLs.
* @return int The estimated number of URLs to warmup for the current shop context
*/
public static function getJprestaAllURLsCount() {
$queryCountPagesCat = '
SELECT COUNT(*)
FROM `' . _DB_PREFIX_ . 'gomakoil_faq_category` c
LEFT JOIN `' . _DB_PREFIX_ . 'gomakoil_faq_category_shop` cs ON (c.id_gomakoil_faq_category = cs.id_gomakoil_faq_category)
WHERE c.`active` = 1 AND cs.`id_shop` = ' . (int) Shop::getContextShopID();
$queryCountPagesFaq = '
SELECT COUNT(*)
FROM `' . _DB_PREFIX_ . 'gomakoil_faq` f
LEFT JOIN `' . _DB_PREFIX_ . 'gomakoil_faq_shop` fs ON (f.id_gomakoil_faq = fs.id_gomakoil_faq)
WHERE f.`active` = 1 AND fs.`id_shop` = ' . (int) Shop::getContextShopID();
$countPagesRoot = 1;
return (int) JPresta\SpeedPack\JprestaUtils::dbGetValue($queryCountPagesCat)
+ (int) JPresta\SpeedPack\JprestaUtils::dbGetValue($queryCountPagesFaq)
+ $countPagesRoot;
}
}

View File

@@ -0,0 +1,19 @@
<?php
/**
* This file protect the directory
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*/
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,19 @@
<?php
/**
* This file protect the directory
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*/
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,19 @@
<?php
/**
* This file protect the directory
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*/
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,63 @@
<?php
/**
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*/
if (!defined('_PS_VERSION_')) {
exit;
}
/**
* Implements getJprestaModelObjectClassName() and getJprestaModelObjectId() to enable the HTML cache provided by the
* module Page Cache Ultimate created by jpresta.com
*/
class HiFaqFaqModuleFrontControllerOverride extends HiFaqFaqModuleFrontController
{
/**
* @return string The ObjectModel class name to be used by Page Cache Ultimate module to refresh the cache of pages generated by this controller
*/
public static function getJprestaModelObjectClassName()
{
return 'HiFAQCategory';
}
/**
* @return int|null The ID of the current ObjectModel (if any) to be used by Page Cache Ultimate module to refresh the cache of pages generated by this controller
*/
public function getJprestaModelObjectId()
{
// Root of FAQ
return null;
}
/**
* List all URLs generated by this controller for the current shop context and the specified language.
* This is used by the Jresta-Cache-Warmer service to generate the cache of these pages.
* @param $id_lang int ID of the language
* @return string[] All URLs to warmup
*/
public static function getJprestaAllURLs($id_lang) {
$urls = [];
$context = Context::getContext();
if (Configuration::get('PS_REWRITING_SETTINGS')) {
$urls[] = $context->link->getPageLink('module-hifaq-faq', null, $id_lang, ['type' => null]);
} else {
$urls[] = $context->link->getModuleLink('hifaq', 'faq', ['type' => null]);
}
return $urls;
}
/**
* An estimated number of URLs that will be returned by self::getJprestaAllURLs() for the current shop context.
* Since we don't have the id_lang parameter we recommend to return the number of URLs for the language that have
* the most URLs.
* @return int The estimated number of URLs to warmup for the current shop context
*/
public static function getJprestaAllURLsCount() {
return 1;
}
}

View File

@@ -0,0 +1,79 @@
<?php
/**
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*/
if (!defined('_PS_VERSION_')) {
exit;
}
/**
* Implements getJprestaModelObjectClassName() and getJprestaModelObjectId() to enable the HTML cache provided by the
* module Page Cache Ultimate created by jpresta.com
*/
class HiFaqFaqCategoryModuleFrontControllerOverride extends HiFaqFaqCategoryModuleFrontController
{
/**
* @return string The ObjectModel class name to be used by Page Cache Ultimate module to refresh the cache of pages generated by this controller
*/
public static function getJprestaModelObjectClassName()
{
return 'HiFAQCategory';
}
/**
* @return int|null The ID of the current ObjectModel (if any) to be used by Page Cache Ultimate module to refresh the cache of pages generated by this controller
*/
public function getJprestaModelObjectId()
{
$id_category = HiFAQCategory::getIdByLinkRewrite(Tools::getValue('faqc_link_rewrite'));
if ($id_category) {
return (int) $id_category;
}
return null;
}
/**
* List all URLs generated by this controller for the current shop context and the specified language.
* This is used by the Jresta-Cache-Warmer service to generate the cache of these pages.
* @param $id_lang int ID of the language
* @return string[] All URLs to warmup
*/
public static function getJprestaAllURLs($id_lang) {
$urls = [];
$context = Context::getContext();
$sql = 'SELECT friendly_url
FROM `' . _DB_PREFIX_ . 'hifaqcategory` f
LEFT JOIN `' . _DB_PREFIX_ . 'hifaqcategory_lang` fl ON f.id=fl.id
LEFT JOIN `' . _DB_PREFIX_ . 'hifaqcategory_shop` fs ON f.id=fs.id
WHERE f.active=1 AND fl.id_lang=' . (int)$id_lang . ' AND fs.id_shop=' . (int)Shop::getContextShopID();
$faqs = JPresta\SpeedPack\JprestaUtils::dbSelectRows($sql);
foreach ($faqs as $faq) {
if (Configuration::get('PS_REWRITING_SETTINGS')) {
$urls[] = $context->link->getPageLink('module-hifaq-faqcategory', null, $id_lang, ['faqc_link_rewrite' => $faq['friendly_url']]);
} else {
$urls[] = $context->link->getModuleLink('hifaq', 'faqcategory', ['faqc_link_rewrite' => $faq['friendly_url']], null, $id_lang);
}
}
return $urls;
}
/**
* An estimated number of URLs that will be returned by self::getJprestaAllURLs() for the current shop context.
* Since we don't have the id_lang parameter we recommend to return the number of URLs for the language that have
* the most URLs.
* @return int The estimated number of URLs to warmup for the current shop context
*/
public static function getJprestaAllURLsCount() {
$sql = 'SELECT COUNT(*)
FROM `' . _DB_PREFIX_ . 'hifaqcategory` f
LEFT JOIN `' . _DB_PREFIX_ . 'hifaqcategory_lang` fl ON f.id=fl.id
LEFT JOIN `' . _DB_PREFIX_ . 'hifaqcategory_shop` fs ON f.id=fs.id
WHERE f.active=1 AND fl.id_lang=' . (int)Configuration::get('PS_LANG_DEFAULT') . ' AND fs.id_shop=' . (int)Shop::getContextShopID();
return (int) JPresta\SpeedPack\JprestaUtils::dbGetValue($sql);
}
}

View File

@@ -0,0 +1,79 @@
<?php
/**
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*/
if (!defined('_PS_VERSION_')) {
exit;
}
/**
* Implements getJprestaModelObjectClassName() and getJprestaModelObjectId() to enable the HTML cache provided by the
* module Page Cache Ultimate created by jpresta.com
*/
class HiFaqFaqDetailsModuleFrontControllerOverride extends HiFaqFaqDetailsModuleFrontController
{
/**
* @return string The ObjectModel class name to be used by Page Cache Ultimate module to refresh the cache of pages generated by this controller
*/
public static function getJprestaModelObjectClassName()
{
return 'HiFAQItem';
}
/**
* @return int|null The ID of the current ObjectModel (if any) to be used by Page Cache Ultimate module to refresh the cache of pages generated by this controller
*/
public function getJprestaModelObjectId()
{
$faq = HiFAQItem::getDetails(Tools::getValue('faq_link_rewrite'));
if (isset($faq)) {
return (int) $faq['id_faq'];
}
return null;
}
/**
* List all URLs generated by this controller for the current shop context and the specified language.
* This is used by the Jresta-Cache-Warmer service to generate the cache of these pages.
* @param $id_lang int ID of the language
* @return string[] All URLs to warmup
*/
public static function getJprestaAllURLs($id_lang) {
$urls = [];
$context = Context::getContext();
$sql = 'SELECT friendly_url
FROM `' . _DB_PREFIX_ . 'hifaq` f
LEFT JOIN `' . _DB_PREFIX_ . 'hifaq_lang` fl ON f.id_faq=fl.id_faq
LEFT JOIN `' . _DB_PREFIX_ . 'hifaq_shop` fs ON f.id_faq=fs.id_faq
WHERE f.active=1 AND fl.id_lang=' . (int)$id_lang . ' AND fs.id_shop=' . (int)Shop::getContextShopID();
$faqs = JPresta\SpeedPack\JprestaUtils::dbSelectRows($sql);
foreach ($faqs as $faq) {
if (Configuration::get('PS_REWRITING_SETTINGS')) {
$urls[] = $context->link->getPageLink('module-hifaq-faqdetails', null, $id_lang, ['faq_link_rewrite' => $faq['friendly_url']]);
} else {
$urls[] = $context->link->getModuleLink('hifaq', 'faqdetails', [], null, $id_lang) . '&faq_link_rewrite=' . $faq['friendly_url'];
}
}
return $urls;
}
/**
* An estimated number of URLs that will be returned by self::getJprestaAllURLs() for the current shop context.
* Since we don't have the id_lang parameter we recommend to return the number of URLs for the language that have
* the most URLs.
* @return int The estimated number of URLs to warmup for the current shop context
*/
public static function getJprestaAllURLsCount() {
$sql = 'SELECT COUNT(*)
FROM `' . _DB_PREFIX_ . 'hifaq` f
LEFT JOIN `' . _DB_PREFIX_ . 'hifaq_lang` fl ON f.id_faq=fl.id_faq
LEFT JOIN `' . _DB_PREFIX_ . 'hifaq_shop` fs ON f.id_faq=fs.id_faq
WHERE f.active=1 AND fl.id_lang=' . (int)Configuration::get('PS_LANG_DEFAULT') . ' AND fs.id_shop=' . (int)Shop::getContextShopID();
return (int) JPresta\SpeedPack\JprestaUtils::dbGetValue($sql);
}
}

View File

@@ -0,0 +1,19 @@
<?php
/**
* This file protect the directory
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*/
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,19 @@
<?php
/**
* This file protect the directory
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*/
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,19 @@
<?php
/**
* This file protect the directory
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*/
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,35 @@
<?php
/**
* 2007-2018 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:
* https://opensource.org/licenses/OSL-3.0
* 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-2018 PrestaShop SA
* @license https://opensource.org/licenses/OSL-3.0 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;

View File

@@ -0,0 +1,40 @@
<?php
/**
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*/
if (!defined('_PS_VERSION_')) {
exit;
}
/**
* Implements getJprestaModelObjectClassName() and getJprestaModelObjectId() to enable the HTML cache provided by the
* module Page Cache Ultimate created by jpresta.com
*/
class PH_SimpleBlogAuthorModuleFrontControllerOverride extends PH_SimpleBlogAuthorModuleFrontController
{
/**
* @return string The ObjectModel class name to be used by Page Cache Ultimate module to refresh the cache of pages generated by this controller
*/
public static function getJprestaModelObjectClassName()
{
return 'SimpleBlogPostAuthor';
}
/**
* @return int|null The ID of the current ObjectModel (if any) to be used by Page Cache Ultimate module to refresh the cache of pages generated by this controller
*/
public function getJprestaModelObjectId()
{
$id = null;
$simpleBlogAuthor = SimpleBlogPostAuthor::getByRewrite(Tools::getValue('rewrite'));
if (Validate::isLoadedObject($simpleBlogAuthor)) {
$id = $simpleBlogAuthor->id;
}
return $id;
}
}

View File

@@ -0,0 +1,69 @@
<?php
/**
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*/
if (!defined('_PS_VERSION_')) {
exit;
}
/**
* Implements getJprestaModelObjectClassName() and getJprestaModelObjectId() to enable the HTML cache provided by the
* module Page Cache Ultimate created by jpresta.com
*/
class PH_SimpleBlogCategoryModuleFrontControllerOverride extends PH_SimpleBlogCategoryModuleFrontController
{
/**
* @return string The ObjectModel class name to be used by Page Cache Ultimate module to refresh the cache of pages generated by this controller
*/
public static function getJprestaModelObjectClassName()
{
return 'SimpleBlogCategory';
}
/**
* @return int|null The ID of the current ObjectModel (if any) to be used by Page Cache Ultimate module to refresh the cache of pages generated by this controller
*/
public function getJprestaModelObjectId()
{
$id = null;
$sb_category = Tools::getValue('sb_category');
if ($sb_category) {
$simpleBlogCategory = SimpleBlogCategory::getByRewrite($sb_category, $this->context->language->id);
if (Validate::isLoadedObject($simpleBlogCategory)) {
$id = $simpleBlogCategory->id;
}
}
return $id;
}
/**
* List all URLs generated by this controller for the current shop context and the specified language.
* This is used by the Jresta-Cache-Warmer service to generate the cache of these pages.
* @param $id_lang int ID of the language
* @return string[] All URLs to warmup
*/
public static function getJprestaAllURLs($id_lang) {
$urls = [];
$categories = SimpleBlogCategory::getCategories($id_lang, true, true, (int) Shop::getContextShopID());
foreach ($categories as $category) {
$urls[] = $category['url'];
}
return $urls;
}
/**
* An estimated number of URLs that will be returned by self::getJprestaAllURLs() for the current shop context.
* Since we don't have the id_lang parameter we recommend to return the number of URLs for the language that have
* the most URLs.
* @return int The estimated number of URLs to warmup for the current shop context
*/
public static function getJprestaAllURLsCount() {
$queryCountCategories = 'SELECT count(*) FROM `'._DB_PREFIX_.'simpleblog_category` WHERE active=1';
return (int) JPresta\SpeedPack\JprestaUtils::dbGetValue($queryCountCategories);
}
}

View File

@@ -0,0 +1,19 @@
<?php
/**
* This file protect the directory
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*/
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,62 @@
<?php
/**
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*/
if (!defined('_PS_VERSION_')) {
exit;
}
/**
* Implements getJprestaModelObjectClassName() and getJprestaModelObjectId() to enable the HTML cache provided by the
* module Page Cache Ultimate created by jpresta.com
*/
class PH_SimpleBlogListModuleFrontControllerOverride extends PH_SimpleBlogListModuleFrontController
{
/**
* @return string The ObjectModel class name to be used by Page Cache Ultimate module to refresh the cache of pages generated by this controller
*/
public static function getJprestaModelObjectClassName()
{
return 'SimpleBlogCategory';
}
/**
* @return int|null The ID of the current ObjectModel (if any) to be used by Page Cache Ultimate module to refresh the cache of pages generated by this controller
*/
public function getJprestaModelObjectId()
{
return null;
}
/**
* List all URLs generated by this controller for the current shop context and the specified language.
* This is used by the Jresta-Cache-Warmer service to generate the cache of these pages.
* @param $id_lang int ID of the language
* @return string[] All URLs to warmup
*/
public static function getJprestaAllURLs($id_lang) {
$urls = [];
$urls[] = Context::getContext()->link->getModuleLink(
'ph_simpleblog',
'list',
[],
null,
$id_lang);
return $urls;
}
/**
* An estimated number of URLs that will be returned by self::getJprestaAllURLs() for the current shop context.
* Since we don't have the id_lang parameter we recommend to return the number of URLs for the language that have
* the most URLs.
* @return int The estimated number of URLs to warmup for the current shop context
*/
public static function getJprestaAllURLsCount() {
return 1;
}
}

View File

@@ -0,0 +1,94 @@
<?php
/**
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*/
if (!defined('_PS_VERSION_')) {
exit;
}
/**
* Implements getJprestaModelObjectClassName() and getJprestaModelObjectId() to enable the HTML cache provided by the
* module Page Cache Ultimate created by jpresta.com
*/
class PH_SimpleBlogSingleModuleFrontControllerOverride extends PH_SimpleBlogSingleModuleFrontController
{
public function init()
{
if ($_SERVER['REQUEST_METHOD'] === 'POST' && !Tools::getIsset('page_cache_dynamics_mods')) {
Hook::exec('actionJPrestaClearCache', [
'controller' => 'ph_simpleblog__single',
'id' => $this->getJprestaModelObjectId(),
'delete_linking_pages' => false,
'action_origin' => 'method-post'
]);
}
parent::init();
}
/**
* @return string The ObjectModel class name to be used by Page Cache Ultimate module to refresh the cache of pages generated by this controller
*/
public static function getJprestaModelObjectClassName()
{
return 'SimpleBlogPost';
}
/**
* @return int|null The ID of the current ObjectModel (if any) to be used by Page Cache Ultimate module to refresh the cache of pages generated by this controller
*/
public function getJprestaModelObjectId()
{
// Get Post by link_rewrite
$simpleblog_post_rewrite = Tools::getValue('rewrite');
if (!$simpleblog_post_rewrite || !Validate::isLinkRewrite($simpleblog_post_rewrite)) {
return null;
}
$simpleBlogPost = SimpleBlogPost::getByRewrite(
$simpleblog_post_rewrite,
(int) Context::getContext()->language->id,
Tools::getValue('sb_category')
);
return $simpleBlogPost ? $simpleBlogPost->id : null;
}
/**
* List all URLs generated by this controller for the current shop context and the specified language.
* This is used by the Jresta-Cache-Warmer service to generate the cache of these pages.
* @param $id_lang int ID of the language
* @return string[] All URLs to warmup
*/
public static function getJprestaAllURLs($id_lang) {
$urls = [];
$finder = new BlogPostsFinder();
$finder->setIdShop((int) Shop::getContextShopID());
$finder->setIdLang($id_lang);
$finder->setCheckForAccess(false);
$posts = $finder->findPosts();
foreach ($posts as $post) {
$urls[] = $post['url'];
}
return $urls;
}
/**
* An estimated number of URLs that will be returned by self::getJprestaAllURLs() for the current shop context.
* Since we don't have the id_lang parameter we recommend to return the number of URLs for the language that have
* the most URLs.
* @return int The estimated number of URLs to warmup for the current shop context
*/
public static function getJprestaAllURLsCount() {
$queryCountArticle = 'SELECT count(*) FROM `'._DB_PREFIX_.'simpleblog_post` sbp INNER JOIN `'._DB_PREFIX_.'simpleblog_post_shop` sbps ON sbp.id_simpleblog_post = sbps.id_simpleblog_post WHERE sbp.active=1 AND sbp.date_add <= \'' . SimpleBlogHelper::now(Configuration::get('PH_BLOG_TIMEZONE')) . '\' AND sbps.id_shop=' . (int) Shop::getContextShopID();
return (int) JPresta\SpeedPack\JprestaUtils::dbGetValue($queryCountArticle);
}
}

View File

@@ -0,0 +1,19 @@
<?php
/**
* This file protect the directory
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*/
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,19 @@
<?php
/**
* This file protect the directory
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*/
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,20 @@
<?php
/**
* This file protect the directory
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license You are just allowed to modify this copy for your own use. You must not redistribute it. License
* is permitted for one Prestashop instance only but you can install it on your test instances.
*/
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,41 @@
<?php
/**
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*/
if (!defined('_PS_VERSION_')) {
exit;
}
use AdvancedSearch\Models\Seo;
/**
* Implements getJprestaModelObjectClassName() and getJprestaModelObjectId() to enable the HTML cache provided by the
* module Page Cache Ultimate created by jpresta.com
*/
class pm_advancedsearch4seoModuleFrontControllerOverride extends pm_advancedsearch4seoModuleFrontController
{
/**
* @return string The ObjectModel class name to be used by Page Cache Ultimate module to refresh the cache of pages generated by this controller
*/
public static function getJprestaModelObjectClassName()
{
return 'AdvancedSearch\Models\Seo';
}
/**
* @return int|null The ID of the current ObjectModel (if any) to be used by Page Cache Ultimate module to refresh the cache of pages generated by this controller
*/
public function getJprestaModelObjectId()
{
$id_seo = (int)Tools::getValue('id_seo');
if ($id_seo && ($seoObj = new Seo($id_seo)) && Validate::isLoadedObject($seoObj)) {
return $id_seo;
}
return null;
}
}

View File

@@ -0,0 +1,20 @@
<?php
/**
* This file protect the directory
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license You are just allowed to modify this copy for your own use. You must not redistribute it. License
* is permitted for one Prestashop instance only but you can install it on your test instances.
*/
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,20 @@
<?php
/**
* This file protect the directory
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license You are just allowed to modify this copy for your own use. You must not redistribute it. License
* is permitted for one Prestashop instance only but you can install it on your test instances.
*/
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,101 @@
<?php
/**
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*/
if (!defined('_PS_VERSION_')) {
exit;
}
class PrestaBlogBlogModuleFrontControllerOverride extends PrestaBlogBlogModuleFrontController
{
// Needed by creativeelements
private $news = array();
/**
* @return string The ObjectModel class name to be used by Page Cache Ultimate module to refresh the cache of pages generated by this controller
*/
public static function getJprestaModelObjectClassName()
{
return 'NewsClass';
}
/**
* @return int|null The ID of the current ObjectModel (if any) to be used by Page Cache Ultimate module to refresh the cache of pages generated by this controller
*/
public function getJprestaModelObjectId()
{
$id_post = (int)Tools::getValue('id');
if ($id_post && ($postObj = new NewsClass($id_post)) && Validate::isLoadedObject($postObj)) {
return $id_post;
}
return null;
}
/**
* List all URLs generated by this controller for the current shop context and the specified language.
* This is used by the Jresta-Cache-Warmer service to generate the cache of these pages.
* @param $id_lang int ID of the language
* @return string[] All URLs to warmup
*/
public static function getJprestaAllURLs($id_lang) {
$urls = [];
// Articles
$urlsInfos = NewsClass::getListe(
(int) $id_lang,
1,
0,
0,
null,
'n.`date`',
'desc',
date(
'Y-m-d H:i:s',
strtotime('-' . (int) Configuration::get('prestablog_sitemap_older') . ' months')
),
null,
null,
1,
(int) Configuration::get('prestablog_news_title_length'),
(int) Configuration::get('prestablog_news_intro_length')
);
foreach ($urlsInfos as $child) {
$urls[] = PrestaBlog::prestablogUrl(
[
'id' => (int) $child['id_prestablog_news'],
'seo' => $child['link_rewrite'],
'titre' => $child['title'],
'id_lang' => (int) $child['id_lang'],
]
);
}
// Categories
$urlsInfos = CategoriesClass::getListeNoArbo(1, (int) $id_lang);
foreach ($urlsInfos as $child) {
$urls[] = PrestaBlog::prestablogUrl([
'c' => (int)$child['id_prestablog_categorie'],
'titre' => ($child['link_rewrite'] != '' ? $child['link_rewrite'] : $child['title']),
'id_lang' => (int)$child['id_lang'],
]);
}
return $urls;
}
/**
* An estimated number of URLs that will be returned by self::getJprestaAllURLs() for the current shop context.
* Since we don't have the id_lang parameter we recommend to return the number of URLs for the language that have
* the most URLs.
* @return int The estimated number of URLs to warmup for the current shop context
*/
public static function getJprestaAllURLsCount() {
$queryCountArticle = 'SELECT count(*) FROM `'._DB_PREFIX_.'prestablog_news` WHERE actif=1 AND id_shop=' . (int) Shop::getContextShopID();
$queryCountCategories = 'SELECT count(*) FROM `'._DB_PREFIX_.'prestablog_categorie` WHERE actif=1 AND id_shop=' . (int) Shop::getContextShopID();
return (int) JPresta\SpeedPack\JprestaUtils::dbGetValue($queryCountArticle) + (int) JPresta\SpeedPack\JprestaUtils::dbGetValue($queryCountCategories);
}
}

View File

@@ -0,0 +1,19 @@
<?php
/**
* This file protect the directory
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*/
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,19 @@
<?php
/**
* This file protect the directory
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*/
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,19 @@
<?php
/**
* This file protect the directory
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
*
* @author Jpresta
* @copyright Jpresta
* @license See the license of this module in file LICENSE.txt, thank you.
*/
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;

Some files were not shown because too many files have changed in this diff Show More