udpate
This commit is contained in:
209
override/classes/controller/FrontController.php
Normal file
209
override/classes/controller/FrontController.php
Normal 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}" : '');
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
{
|
||||
}
|
||||
35
override/classes/controller/index.php
Normal file
35
override/classes/controller/index.php
Normal 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;
|
||||
Reference in New Issue
Block a user