update
This commit is contained in:
33
modules/ps_faviconnotificationbo/Makefile
Normal file
33
modules/ps_faviconnotificationbo/Makefile
Normal file
@@ -0,0 +1,33 @@
|
||||
help:
|
||||
@egrep "^#" Makefile
|
||||
|
||||
# target: docker-build|db - Setup/Build PHP & (node)JS dependencies
|
||||
db: docker-build
|
||||
docker-build: build-back
|
||||
|
||||
build-back:
|
||||
docker-compose run --rm php sh -c "composer install"
|
||||
|
||||
build-back-prod:
|
||||
docker-compose run --rm php sh -c "composer install --no-dev -o"
|
||||
|
||||
build-zip:
|
||||
cp -Ra $(PWD) /tmp/ps_faviconnotificationbo
|
||||
rm -rf /tmp/ps_faviconnotificationbo/.env.test
|
||||
rm -rf /tmp/ps_faviconnotificationbo/.php_cs.*
|
||||
rm -rf /tmp/ps_faviconnotificationbo/composer.*
|
||||
rm -rf /tmp/ps_faviconnotificationbo/.gitignore
|
||||
rm -rf /tmp/ps_faviconnotificationbo/deploy.sh
|
||||
rm -rf /tmp/ps_faviconnotificationbo/.editorconfig
|
||||
rm -rf /tmp/ps_faviconnotificationbo/.git
|
||||
rm -rf /tmp/ps_faviconnotificationbo/.github
|
||||
rm -rf /tmp/ps_faviconnotificationbo/_dev
|
||||
rm -rf /tmp/ps_faviconnotificationbo/tests
|
||||
rm -rf /tmp/ps_faviconnotificationbo/docker-compose.yml
|
||||
rm -rf /tmp/ps_faviconnotificationbo/Makefile
|
||||
mv -v /tmp/ps_faviconnotificationbo $(PWD)/ps_faviconnotificationbo
|
||||
zip -r ps_faviconnotificationbo.zip ps_faviconnotificationbo
|
||||
rm -rf $(PWD)/ps_faviconnotificationbo
|
||||
|
||||
# target: build-zip-prod - Launch prod zip generation of the module (will not work on windows)
|
||||
build-zip-prod: build-back-prod build-zip
|
||||
@@ -1,45 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2018 PrestaShop
|
||||
*
|
||||
* 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 http://addons.prestashop.com/en/content/12-terms-and-conditions-of-use
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
class APIFAQ
|
||||
{
|
||||
public function getData($module_key, $version)
|
||||
{
|
||||
if (function_exists('curl_init') == false) {
|
||||
return false;
|
||||
}
|
||||
$context = Context::getContext();
|
||||
$iso_code = Language::getIsoById($context->language->id);
|
||||
$url = 'http://api.addons.prestashop.com/request/faq/'.$module_key.'/'.$version.'/'.$iso_code;
|
||||
$options = array(
|
||||
CURLOPT_URL => $url,
|
||||
CURLOPT_RETURNTRANSFER => true,
|
||||
CURLOPT_HEADER => false
|
||||
);
|
||||
$CURL = curl_init();
|
||||
curl_setopt_array($CURL, $options);
|
||||
$content = curl_exec($CURL);
|
||||
curl_close($CURL);
|
||||
if (!$content) {
|
||||
return false;
|
||||
}
|
||||
$content = Tools::jsonDecode($content);
|
||||
if (!$content || empty($content->categories)) {
|
||||
return false;
|
||||
}
|
||||
return $content->categories;
|
||||
}
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2018 PrestaShop
|
||||
*
|
||||
* 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@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 http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 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;
|
||||
1590
modules/ps_faviconnotificationbo/composer.lock
generated
Normal file
1590
modules/ps_faviconnotificationbo/composer.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
12
modules/ps_faviconnotificationbo/config.xml
Normal file
12
modules/ps_faviconnotificationbo/config.xml
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<module>
|
||||
<name>ps_faviconnotificationbo</name>
|
||||
<displayName><![CDATA[Order Notifications on the Favicon]]></displayName>
|
||||
<version><![CDATA[2.1.3]]></version>
|
||||
<description><![CDATA[Get notified directly on your browser tab each time you get a new order, customer or message.]]></description>
|
||||
<author><![CDATA[PrestaShop]]></author>
|
||||
<tab><![CDATA[administration]]></tab>
|
||||
<is_configurable>1</is_configurable>
|
||||
<need_instance>0</need_instance>
|
||||
<limited_countries></limited_countries>
|
||||
</module>
|
||||
@@ -1,24 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2018 PrestaShop
|
||||
*
|
||||
* 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 http://addons.prestashop.com/en/content/12-terms-and-conditions-of-use
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
class AdminAjaxFaviconBOController extends ModuleAdminController
|
||||
{
|
||||
public function ajaxProcessGetNotifications()
|
||||
{
|
||||
$notification = new Notification;
|
||||
$this->ajaxDie(json_encode($notification->getLastElements()));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2020 PrestaShop and Contributors
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License 3.0 (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:
|
||||
* https://opensource.org/licenses/AFL-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.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2020 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
class AdminConfigureFaviconBoController extends ModuleAdminController
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
$this->bootstrap = true;
|
||||
$this->className = 'Configuration';
|
||||
$this->table = 'configuration';
|
||||
|
||||
parent::__construct();
|
||||
|
||||
$this->fields_options = [
|
||||
'ps_faviconnotificationbo' => [
|
||||
'title' => $this->trans('Configuration', [], 'Admin.Global'),
|
||||
'info' => $this->trans('Display notifications in the browser tab for:', [], 'Modules.Faviconnotificationbo.Admin'),
|
||||
'fields' => [
|
||||
Ps_faviconnotificationbo::CONFIG_COUNT_ORDER_NOTIFICATION => [
|
||||
'type' => 'bool',
|
||||
'title' => $this->trans('New orders', [], 'Modules.Faviconnotificationbo.Admin'),
|
||||
'validation' => 'isBool',
|
||||
'cast' => 'intval',
|
||||
],
|
||||
Ps_faviconnotificationbo::CONFIG_COUNT_CUSTOMER_NOTIFICATION => [
|
||||
'type' => 'bool',
|
||||
'title' => $this->trans('New customers', [], 'Admin.Navigation.Header'),
|
||||
'validation' => 'isBool',
|
||||
'cast' => 'intval',
|
||||
],
|
||||
Ps_faviconnotificationbo::CONFIG_COUNT_MSG_NOTIFICATION => [
|
||||
'type' => 'bool',
|
||||
'title' => $this->trans('New messages', [], 'Admin.Orderscustomers.Feature'),
|
||||
'validation' => 'isBool',
|
||||
'cast' => 'intval',
|
||||
],
|
||||
Ps_faviconnotificationbo::CONFIG_FAVICON_BACKGROUND_COLOR => [
|
||||
'type' => 'color',
|
||||
'title' => $this->trans('Notification background color', [], 'Modules.Faviconnotificationbo.Admin'),
|
||||
'validation' => 'isColor',
|
||||
'required' => false,
|
||||
],
|
||||
Ps_faviconnotificationbo::CONFIG_FAVICON_TXT_COLOR => [
|
||||
'type' => 'color',
|
||||
'title' => $this->trans('Notification text color', [], 'Modules.Faviconnotificationbo.Admin'),
|
||||
'validation' => 'isColor',
|
||||
'required' => false,
|
||||
],
|
||||
],
|
||||
'submit' => [
|
||||
'title' => $this->trans('Save', [], 'Admin.Actions'),
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -1,21 +1,24 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2018 PrestaShop
|
||||
*
|
||||
* 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 http://addons.prestashop.com/en/content/12-terms-and-conditions-of-use
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
* 2007-2020 PrestaShop and Contributors
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License 3.0 (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:
|
||||
* https://opensource.org/licenses/AFL-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.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2020 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-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('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);
|
||||
|
||||
@@ -1,21 +1,24 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2018 PrestaShop
|
||||
*
|
||||
* 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 http://addons.prestashop.com/en/content/12-terms-and-conditions-of-use
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
* 2007-2020 PrestaShop and Contributors
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License 3.0 (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:
|
||||
* https://opensource.org/licenses/AFL-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.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2020 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-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('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);
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2018 PrestaShop
|
||||
*
|
||||
* 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@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 http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 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;
|
||||
@@ -1,31 +1,24 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2018 PrestaShop
|
||||
*
|
||||
* 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@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 http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
* 2007-2020 PrestaShop and Contributors
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License 3.0 (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:
|
||||
* https://opensource.org/licenses/AFL-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.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2020 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-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('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);
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 2.9 KiB |
@@ -1,284 +1,171 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2018 PrestaShop
|
||||
*
|
||||
* 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@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 http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
* 2007-2020 PrestaShop and Contributors
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License 3.0 (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:
|
||||
* https://opensource.org/licenses/AFL-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.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2020 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
if (!defined('_PS_VERSION_')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
class Ps_faviconnotificationbo extends Module
|
||||
{
|
||||
protected static $conf_fields = array(
|
||||
'BACKGROUND_COLOR_FAVICONBO',
|
||||
'TEXT_COLOR_FAVICONBO',
|
||||
'CHECKBOX_ORDER',
|
||||
'CHECKBOX_CUSTOMER',
|
||||
'CHECKBOX_MESSAGE'
|
||||
);
|
||||
const CONFIG_COUNT_ORDER_NOTIFICATION = 'CHECKBOX_ORDER';
|
||||
const CONFIG_COUNT_CUSTOMER_NOTIFICATION = 'CHECKBOX_CUSTOMER';
|
||||
const CONFIG_COUNT_MSG_NOTIFICATION = 'CHECKBOX_MESSAGE';
|
||||
const CONFIG_FAVICON_BACKGROUND_COLOR = 'BACKGROUND_COLOR_FAVICONBO';
|
||||
const CONFIG_FAVICON_TXT_COLOR = 'TEXT_COLOR_FAVICONBO';
|
||||
const HOOKS = [
|
||||
'displayBackOfficeHeader',
|
||||
];
|
||||
const ADMINCONTROLLERS = [
|
||||
'adminConfigure' => 'AdminConfigureFaviconBo',
|
||||
];
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->name = 'ps_faviconnotificationbo';
|
||||
$this->tab = 'administration';
|
||||
$this->version = '1.0.0';
|
||||
$this->version = '2.1.3';
|
||||
$this->author = 'PrestaShop';
|
||||
$this->bootstrap = true;
|
||||
|
||||
$this->module_key = '91315ca88851b6c2852ee4be0c59b7b1';
|
||||
$this->author_address = '0x64aa3c1e4034d07015f639b0e171b0d7b27d01aa';
|
||||
|
||||
$this->controllers = array(
|
||||
'adminAjax' => 'AdminAjaxFaviconBO',
|
||||
);
|
||||
|
||||
parent::__construct();
|
||||
|
||||
$this->displayName = $this->l('Order Notifications on the Favicon');
|
||||
$this->description = $this->l('Get notified when you get new order, new client or new message directly on your browser tab of your back office even if you are working on another page');
|
||||
|
||||
// Settings paths
|
||||
$this->js_path = $this->_path.'views/js/';
|
||||
$this->css_path = $this->_path.'views/css/';
|
||||
$this->img_path = $this->_path.'views/img/';
|
||||
$this->docs_path = $this->_path.'docs/';
|
||||
$this->logo_path = $this->_path.'logo.png';
|
||||
$this->module_path = $this->_path;
|
||||
$this->ps_version = (bool)version_compare(_PS_VERSION_, '1.7', '>=');
|
||||
|
||||
// Confirm uninstall
|
||||
$this->confirmUninstall = $this->l('Are you sure you want to uninstall this module?');
|
||||
$this->ps_versions_compliancy = array('min' => '1.5', 'max' => _PS_VERSION_);
|
||||
$this->displayName = $this->trans('Order Notifications on the Favicon', [], 'Modules.Faviconnotificationbo.Admin');
|
||||
$this->description = $this->trans('Get notified directly on your browser tab each time you get a new order, customer or message.', [], 'Modules.Faviconnotificationbo.Admin');
|
||||
$this->ps_versions_compliancy = ['min' => '1.7.6.0', 'max' => _PS_VERSION_];
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param none
|
||||
* @return bool
|
||||
*/
|
||||
public function install()
|
||||
{
|
||||
|
||||
Configuration::updateValue('CHECKBOX_ORDER', '1');
|
||||
Configuration::updateValue('CHECKBOX_CUSTOMER', '1');
|
||||
Configuration::updateValue('CHECKBOX_MESSAGE', '1');
|
||||
Configuration::updateValue('BACKGROUND_COLOR_FAVICONBO', '#DF0067');
|
||||
Configuration::updateValue('TEXT_COLOR_FAVICONBO', '#ffffff');
|
||||
return (parent::install() && $this->registerHook('BackOfficeHeader') && $this->installTab());
|
||||
return parent::install()
|
||||
&& $this->registerHook(static::HOOKS)
|
||||
&& $this->installConfiguration()
|
||||
&& $this->installTabs();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function installConfiguration()
|
||||
{
|
||||
return (bool) Configuration::updateValue(static::CONFIG_COUNT_ORDER_NOTIFICATION, '1')
|
||||
&& (bool) Configuration::updateValue(static::CONFIG_COUNT_CUSTOMER_NOTIFICATION, '1')
|
||||
&& (bool) Configuration::updateValue(static::CONFIG_COUNT_MSG_NOTIFICATION, '1')
|
||||
&& (bool) Configuration::updateValue(static::CONFIG_FAVICON_BACKGROUND_COLOR, '#DF0067')
|
||||
&& (bool) Configuration::updateValue(static::CONFIG_FAVICON_TXT_COLOR, '#FFFFFF');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function installTabs()
|
||||
{
|
||||
$result = true;
|
||||
|
||||
foreach (static::ADMINCONTROLLERS as $controller_name) {
|
||||
if (Tab::getIdFromClassName($controller_name)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$tab = new Tab();
|
||||
$tab->class_name = $controller_name;
|
||||
$tab->module = $this->name;
|
||||
$tab->active = true;
|
||||
$tab->id_parent = -1;
|
||||
$tab->name = array_fill_keys(
|
||||
Language::getIDs(false),
|
||||
$this->displayName
|
||||
);
|
||||
$result = $result && (bool) $tab->add();
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function uninstall()
|
||||
{
|
||||
foreach (Ps_faviconnotificationbo::$conf_fields as $field) {
|
||||
Configuration::deleteByName($field);
|
||||
}
|
||||
if (parent::uninstall() &&
|
||||
$this->uninstallTab()) {
|
||||
return true;
|
||||
} else {
|
||||
$this->_errors[] = $this->l('There was an error during the uninstallation.');
|
||||
return false;
|
||||
}
|
||||
return parent::uninstall()
|
||||
&& $this->uninstallConfiguration()
|
||||
&& $this->uninstallTabs();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is often use to create an ajax controller
|
||||
*
|
||||
* @param none
|
||||
* @return bool
|
||||
*/
|
||||
public function installTab()
|
||||
public function uninstallConfiguration()
|
||||
{
|
||||
$tab = new Tab();
|
||||
$tab->active = 1;
|
||||
$tab->class_name = 'AdminAjaxFaviconBO';
|
||||
$tab->name = array();
|
||||
foreach (Language::getLanguages(true) as $lang) {
|
||||
$tab->name[$lang['id_lang']] = $this->name;
|
||||
}
|
||||
$tab->id_parent = -1;
|
||||
$tab->module = $this->name;
|
||||
return $tab->add();
|
||||
return (bool) Configuration::deleteByName(static::CONFIG_COUNT_ORDER_NOTIFICATION)
|
||||
&& (bool) Configuration::deleteByName(static::CONFIG_COUNT_CUSTOMER_NOTIFICATION)
|
||||
&& (bool) Configuration::deleteByName(static::CONFIG_COUNT_MSG_NOTIFICATION)
|
||||
&& (bool) Configuration::deleteByName(static::CONFIG_FAVICON_BACKGROUND_COLOR)
|
||||
&& (bool) Configuration::deleteByName(static::CONFIG_FAVICON_TXT_COLOR);
|
||||
}
|
||||
|
||||
/**
|
||||
* uninstall tab
|
||||
*
|
||||
* @param none
|
||||
* @return bool
|
||||
*/
|
||||
public function uninstallTab()
|
||||
public function uninstallTabs()
|
||||
{
|
||||
$id_tab = (int)Tab::getIdFromClassName('AdminAjaxFaviconBO');
|
||||
if ($id_tab) {
|
||||
$tab = new Tab($id_tab);
|
||||
if (Validate::isLoadedObject($tab)) {
|
||||
return ($tab->delete());
|
||||
} else {
|
||||
$return = false;
|
||||
}
|
||||
} else {
|
||||
$return = true;
|
||||
$result = true;
|
||||
|
||||
foreach (Tab::getCollectionFromModule($this->name) as $tab) {
|
||||
/** @var Tab $tab */
|
||||
$result = $result && (bool) $tab->delete();
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
/**
|
||||
* load dependencies in the configuration of the module
|
||||
*/
|
||||
public function loadAsset()
|
||||
{
|
||||
// Load CSS
|
||||
$css = array(
|
||||
$this->css_path.'faq.css',
|
||||
$this->css_path.'menu.css',
|
||||
$this->css_path.'back.css',
|
||||
$this->css_path.'fontawesome-all.min',
|
||||
);
|
||||
|
||||
$this->context->controller->addCSS($css, 'all');
|
||||
|
||||
// Load JS
|
||||
$jss = array(
|
||||
$this->js_path.'vue.min.js',
|
||||
$this->js_path.'faq.js',
|
||||
$this->js_path.'menu.js',
|
||||
);
|
||||
$this->context->controller->addJqueryPlugin('colorpicker');
|
||||
$this->context->controller->addJS($jss);
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* FAQ API
|
||||
*/
|
||||
public function loadFaq()
|
||||
{
|
||||
include_once('classes/APIFAQClass.php');
|
||||
$api = new APIFAQ();
|
||||
$faq = $api->getData($this->module_key, $this->version);
|
||||
|
||||
return $faq;
|
||||
}
|
||||
|
||||
/**
|
||||
* Load the configuration form
|
||||
* Redirect to our ModuleAdminController when click on Configure button
|
||||
*/
|
||||
public function getContent()
|
||||
{
|
||||
if ($this->ps_version) {
|
||||
$params = array('configure' => $this->name);
|
||||
$moduleAdminLink = Context::getContext()->link->getAdminLink('AdminModules', true, false, $params);
|
||||
} else {
|
||||
$moduleAdminLink = Context::getContext()->link->getAdminLink('AdminModules', true).'&configure='.$this->name.'&module_name='.$this->name;
|
||||
}
|
||||
$faq = $this->loadFaq(); // load faq from addons api
|
||||
$this->loadAsset(); // load js and css
|
||||
|
||||
$id_lang = $this->context->language->id;
|
||||
$iso_lang = Language::getIsoById($id_lang);
|
||||
// get readme
|
||||
switch ($iso_lang) {
|
||||
case 'fr':
|
||||
$doc = $this->docs_path.'readme_fr.pdf';
|
||||
break;
|
||||
default:
|
||||
$doc = $this->docs_path.'readme_en.pdf';
|
||||
break;
|
||||
}
|
||||
|
||||
// get current page
|
||||
$currentPage = 'faviconConfiguration';
|
||||
$page = Tools::getValue('page');
|
||||
if (!empty($page)) {
|
||||
$currentPage = Tools::getValue('page');
|
||||
}
|
||||
// assign var to smarty
|
||||
$this->context->smarty->assign(array(
|
||||
'module_name' => $this->name,
|
||||
'module_version' => $this->version,
|
||||
'moduleAdminLink' => $moduleAdminLink,
|
||||
'module_display' => $this->displayName,
|
||||
'apifaq' => $faq,
|
||||
'doc' => $doc,
|
||||
'logo_path' => $this->logo_path,
|
||||
'languages' => $this->context->controller->getLanguages(),
|
||||
'defaultFormLanguage' => (int) $this->context->employee->id_lang,
|
||||
'currentPage' => $currentPage,
|
||||
'ps_base_dir' => Tools::getHttpHost(true),
|
||||
'ps_version' => _PS_VERSION_,
|
||||
'isPs17' => $this->ps_version,
|
||||
));
|
||||
|
||||
return $this->context->smarty->fetch($this->local_path.'views/templates/admin/menu.tpl');
|
||||
Tools::redirectAdmin($this->context->link->getAdminLink(static::ADMINCONTROLLERS['adminConfigure']));
|
||||
}
|
||||
|
||||
/**
|
||||
* return parameters saved during the favicon configuration
|
||||
* @return array parameters saved
|
||||
* @param array $params
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getParams()
|
||||
public function hookDisplayBackOfficeHeader(array $params)
|
||||
{
|
||||
$params = array('BACKGROUND_COLOR_FAVICONBO', 'TEXT_COLOR_FAVICONBO', 'CHECKBOX_ORDER', 'CHECKBOX_CUSTOMER', 'CHECKBOX_MESSAGE');
|
||||
return Configuration::getMultiple($params);
|
||||
}
|
||||
$this->context->controller->addJS([
|
||||
$this->getPathUri() . 'views/js/favico.js',
|
||||
$this->getPathUri() . 'views/js/ps_faviconnotificationbo.js',
|
||||
]);
|
||||
|
||||
/**
|
||||
* load the javascript who is used in all the backoffice
|
||||
*/
|
||||
public function loadGlobalAsset()
|
||||
{
|
||||
$jss = array(
|
||||
$this->js_path.'favico.js',
|
||||
);
|
||||
$this->context->controller->addJS($jss);
|
||||
}
|
||||
$this->context->smarty->assign([
|
||||
'bofaviconBgColor' => Configuration::get(static::CONFIG_FAVICON_BACKGROUND_COLOR),
|
||||
'bofaviconTxtColor' => Configuration::get(static::CONFIG_FAVICON_TXT_COLOR),
|
||||
'bofaviconOrder' => Configuration::get(static::CONFIG_COUNT_ORDER_NOTIFICATION),
|
||||
'bofaviconCustomer' => Configuration::get(static::CONFIG_COUNT_CUSTOMER_NOTIFICATION),
|
||||
'bofaviconMsg' => Configuration::get(static::CONFIG_COUNT_MSG_NOTIFICATION),
|
||||
'bofaviconUrl' => $this->context->link->getAdminLink('AdminCommon'),
|
||||
]);
|
||||
|
||||
public function hookBackOfficeHeader($params)
|
||||
{
|
||||
if (!$this->active) {
|
||||
return;
|
||||
}
|
||||
$this->loadGlobalAsset();
|
||||
if (Tools::isSubmit('submitFavIconConf')) {
|
||||
$this->saveForm();
|
||||
}
|
||||
$params = $this->getParams();
|
||||
// controller url
|
||||
$adminController = $this->context->link->getAdminLink('AdminAjaxFaviconBO');
|
||||
$this->context->smarty->assign(array(
|
||||
'bofavicon_params' => $params,
|
||||
'adminController' => $adminController,
|
||||
));
|
||||
return $this->context->smarty->fetch($this->local_path.'views/templates/hook/faviconbo.tpl');
|
||||
}
|
||||
|
||||
public function saveForm()
|
||||
{
|
||||
Configuration::updateValue('BACKGROUND_COLOR_FAVICONBO', Tools::getValue('BACKGROUND_COLOR_FAVICONBO'));
|
||||
Configuration::updateValue('TEXT_COLOR_FAVICONBO', Tools::getValue('TEXT_COLOR_FAVICONBO'));
|
||||
Configuration::updateValue('CHECKBOX_ORDER', Tools::getValue('CHECKBOX_ORDER'));
|
||||
Configuration::updateValue('CHECKBOX_CUSTOMER', Tools::getValue('CHECKBOX_CUSTOMER'));
|
||||
Configuration::updateValue('CHECKBOX_MESSAGE', Tools::getValue('CHECKBOX_MESSAGE'));
|
||||
return $this->context->smarty->fetch($this->getLocalPath() . 'views/templates/hook/displayBackOfficeHeader.tpl');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,31 +1,24 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2018 PrestaShop
|
||||
*
|
||||
* 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@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 http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
* 2007-2020 PrestaShop and Contributors
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License 3.0 (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:
|
||||
* https://opensource.org/licenses/AFL-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.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2020 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-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('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);
|
||||
|
||||
28
modules/ps_faviconnotificationbo/upgrade/index.php
Normal file
28
modules/ps_faviconnotificationbo/upgrade/index.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2020 PrestaShop and Contributors
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License 3.0 (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:
|
||||
* https://opensource.org/licenses/AFL-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.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2020 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-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;
|
||||
46
modules/ps_faviconnotificationbo/upgrade/upgrade-2.1.0.php
Normal file
46
modules/ps_faviconnotificationbo/upgrade/upgrade-2.1.0.php
Normal file
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2020 PrestaShop and Contributors
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License 3.0 (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:
|
||||
* https://opensource.org/licenses/AFL-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.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2020 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
if (!defined('_PS_VERSION_')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Ps_faviconnotificationbo $module
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
function upgrade_module_2_1_0($module)
|
||||
{
|
||||
$result = true;
|
||||
|
||||
// Remove our ModuleAdminControllers from SEO & URLs page
|
||||
$metaCollection = new PrestaShopCollection('Meta');
|
||||
$metaCollection->where('page', 'like', 'module-' . $module->name . '-Admin%');
|
||||
|
||||
foreach ($metaCollection->getAll() as $meta) {
|
||||
/** @var Meta $meta */
|
||||
$result = $result && (bool) $meta->delete();
|
||||
}
|
||||
|
||||
// Remove old ajax controller and add new controller for configuration
|
||||
$result = $result && $module->uninstallTabs() && $module->installTabs();
|
||||
|
||||
return $result;
|
||||
}
|
||||
@@ -1,89 +0,0 @@
|
||||
/**
|
||||
* 2007-2018 PrestaShop
|
||||
*
|
||||
* 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@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 http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*
|
||||
* Don't forget to prefix your containers with your own identifier
|
||||
* to avoid any conflicts with others containers.
|
||||
*/
|
||||
|
||||
.notransition {
|
||||
-webkit-transition: none !important;
|
||||
-moz-transition: none !important;
|
||||
-o-transition: none !important;
|
||||
transition: none !important;
|
||||
}
|
||||
|
||||
.addons-title {
|
||||
margin: 1em 0;
|
||||
padding-left: 20px;
|
||||
/* background-color: #e8faff; */
|
||||
border-left: 4px solid #2eacce;
|
||||
font-size: 18px !important;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.addons-number-fields {
|
||||
display: block;
|
||||
width: 22%;
|
||||
height: 31px;
|
||||
padding: 6px 8px;
|
||||
font-size: 12px;
|
||||
line-height: 1.42857;
|
||||
color: #555;
|
||||
background-color: #F5F8F9;
|
||||
background-image: none;
|
||||
border: 1px solid #C7D6DB;
|
||||
border-radius: 3px;
|
||||
-webkit-transition: border-color ease-in-out 0.15s,box-shadow ease-in-out 0.15s;
|
||||
-o-transition: border-color ease-in-out 0.15s,box-shadow ease-in-out 0.15s;
|
||||
transition: border-color ease-in-out 0.15s,box-shadow ease-in-out 0.15s
|
||||
}
|
||||
|
||||
.addons-inline-block {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.addons-text {
|
||||
padding: 14px;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.addons-hide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.title {
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
.labelbutton {
|
||||
padding-right: 15px;
|
||||
}
|
||||
|
||||
.divcolorpicker {
|
||||
margin-left: -15px;
|
||||
}
|
||||
|
||||
.panel-footer {
|
||||
margin-top: 125px !important;
|
||||
}
|
||||
@@ -1,79 +0,0 @@
|
||||
#faq span.faq-h1 {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
display: block;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
#faq span.faq-h2 {
|
||||
font-size: 14px;
|
||||
display: block;
|
||||
cursor: pointer;
|
||||
}
|
||||
#faq span.faq-h2:hover {
|
||||
color: #25B9D7;
|
||||
}
|
||||
#faq span.faq-h2.faq-open {
|
||||
color: #25B9D7;
|
||||
font-weight: bold;
|
||||
}
|
||||
#faq span.faq-h2 i {
|
||||
font-size: 13px;
|
||||
margin-right: 2px;
|
||||
}
|
||||
#faq > ul {
|
||||
list-style: none;
|
||||
}
|
||||
#faq > ul > li {
|
||||
list-style: none;
|
||||
padding: 5px
|
||||
}
|
||||
#faq .faq-text {
|
||||
padding: 15px 15px;
|
||||
background: #f7f7f7;
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
.helpContentParent {
|
||||
overflow:hidden;
|
||||
}
|
||||
.helpContentLeft {
|
||||
float:left;
|
||||
width:30%;
|
||||
border-right:1px solid #555;
|
||||
overflow:hidden;
|
||||
}
|
||||
.helpContentLeft > .left {
|
||||
float:left;
|
||||
width:20%;
|
||||
}
|
||||
.helpContentLeft > .right {
|
||||
float:left;
|
||||
width:66%;
|
||||
text-align: justify;
|
||||
text-justify: inter-word;
|
||||
}
|
||||
.helpContentRight {
|
||||
float:right;
|
||||
width:70%;
|
||||
/*border-left:1px solid #16222c;*/
|
||||
}
|
||||
.helpContentRight-sub{
|
||||
margin-left:50px;
|
||||
}
|
||||
.numberCircle {
|
||||
border-radius: 50%;
|
||||
float:left;
|
||||
margin-right: 10px;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
/*padding: 8px;*/
|
||||
background: #fff;
|
||||
border: 2px solid #666;
|
||||
color: #555;
|
||||
text-align: center;
|
||||
font: 14px Arial, sans-serif;
|
||||
}
|
||||
.numberCircleText {
|
||||
margin-left: 30px;
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,35 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2018 PrestaShop
|
||||
*
|
||||
* 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@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 http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 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;
|
||||
@@ -1,31 +1,24 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2018 PrestaShop
|
||||
*
|
||||
* 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@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 http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
* 2007-2020 PrestaShop and Contributors
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License 3.0 (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:
|
||||
* https://opensource.org/licenses/AFL-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.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2020 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-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('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);
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
/**
|
||||
* 2007-2018 PrestaShop
|
||||
*
|
||||
* 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@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 http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*
|
||||
* Don't forget to prefix your containers with your own identifier
|
||||
* to avoid any conflicts with others containers.
|
||||
*/
|
||||
$(window).load(function() {
|
||||
$('#faq .faq-h2').on('click', function() {
|
||||
$('#faq .faq-h2').removeClass('faq-open');
|
||||
if (!$(this).next().hasClass('hide')) {
|
||||
$('#faq .faq-text').addClass('hide');
|
||||
} else {
|
||||
$('#faq .faq-text').addClass('hide');
|
||||
$(this).next().removeClass('hide');
|
||||
$(this).addClass('faq-open');
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -1,31 +1,24 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2018 PrestaShop
|
||||
*
|
||||
* 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@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 http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
* 2007-2020 PrestaShop and Contributors
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License 3.0 (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:
|
||||
* https://opensource.org/licenses/AFL-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.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2020 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-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('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);
|
||||
|
||||
@@ -1,54 +0,0 @@
|
||||
/**
|
||||
* 2007-2018 PrestaShop
|
||||
*
|
||||
* 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@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 http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
$(window).ready(function() {
|
||||
moduleAdminLink = moduleAdminLink.replace(/\amp;/g,'');
|
||||
|
||||
window.vMenu = new Vue({
|
||||
el: '#faviconbo-menu',
|
||||
data: {
|
||||
selectedTabName : currentPage,
|
||||
},
|
||||
methods: {
|
||||
makeActive: function(item){
|
||||
this.selectedTabName = item;
|
||||
if (ps_version) { // if on 1.7
|
||||
window.history.pushState({} , '', moduleAdminLink+'&page='+item );
|
||||
} else { // if on 1.6
|
||||
window.history.pushState({} , '', moduleAdminLink+'&configure='+moduleName+'&module_name='+moduleName+'&page='+item );
|
||||
}
|
||||
},
|
||||
isActive : function(item){
|
||||
if (this.selectedTabName == item) {
|
||||
$('.faviconbo_menu').addClass('addons-hide');
|
||||
$('#'+item).removeClass('addons-hide');
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
//Because mColorPicker doesn't care about the passed parameters
|
||||
$('#mColorPicker').remove();
|
||||
$('.mColorPickerFaviconInput').mColorPicker({imageFolder: baseAdminDir + '../img/admin/'});
|
||||
});
|
||||
@@ -0,0 +1,96 @@
|
||||
'use strict';
|
||||
/**
|
||||
* 2007-2020 PrestaShop and Contributors
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License 3.0 (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:
|
||||
* https://opensource.org/licenses/AFL-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.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2020 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
let ps_faviconnotificationbo = {};
|
||||
|
||||
(function() {
|
||||
/**
|
||||
* @param {object} config
|
||||
* @param {string} config.notificationGetUrl - Url used for request
|
||||
* @param {boolean} config.CHECKBOX_ORDER - Use order notifications
|
||||
* @param {boolean} config.CHECKBOX_CUSTOMER - Use customer notifications
|
||||
* @param {boolean} config.CHECKBOX_MESSAGE - Use message notifications
|
||||
* @param {int} config.timer - Refresh time
|
||||
* @constructor
|
||||
*/
|
||||
let FaviconNotificationsUpdater = function(config) {
|
||||
let refresh = function() {
|
||||
let notificationTimer = null;
|
||||
let notificationRequest = $.ajax({
|
||||
type: 'POST',
|
||||
headers: {"cache-control": "no-cache"},
|
||||
cache: false,
|
||||
dataType: 'json',
|
||||
url: `${config.notificationGetUrl}&rand=${new Date().getTime()}`,
|
||||
});
|
||||
|
||||
notificationRequest.done(function(data) {
|
||||
let total = 0;
|
||||
|
||||
if (config.CHECKBOX_ORDER && undefined !== data.order && undefined !== data.order.total) {
|
||||
total += parseInt(data.order.total, 10);
|
||||
}
|
||||
|
||||
if (config.CHECKBOX_CUSTOMER && undefined !== data.customer && undefined !== data.customer.total) {
|
||||
total += parseInt(data.customer.total, 10);
|
||||
}
|
||||
|
||||
if (config.CHECKBOX_MESSAGE && undefined !== data.customer_message && undefined !== data.customer_message.total) {
|
||||
total += parseInt(data.customer_message.total, 10);
|
||||
}
|
||||
|
||||
window.favicon.badge(total);
|
||||
notificationTimer = setTimeout(refresh, config.timer);
|
||||
});
|
||||
|
||||
clearTimeout(notificationTimer);
|
||||
};
|
||||
|
||||
this.initialize = function() {
|
||||
// wait for dom ready
|
||||
$(function() {
|
||||
refresh();
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* Initialize ps_faviconnotificationbo
|
||||
*
|
||||
* @param {object} config
|
||||
* @param {string} config.backgroundColor - Favicon badge background color
|
||||
* @param {string} config.textColor - Favicon badge text color
|
||||
* @param {string} config.notificationGetUrl - Url used for request
|
||||
* @param {boolean} config.CHECKBOX_ORDER - Use order notifications
|
||||
* @param {boolean} config.CHECKBOX_CUSTOMER - Use customer notifications
|
||||
* @param {boolean} config.CHECKBOX_MESSAGE - Use message notifications
|
||||
* @param {int} config.timer - Refresh time
|
||||
*/
|
||||
ps_faviconnotificationbo.initialize = function(config) {
|
||||
window.favicon = new Favico({
|
||||
animation: 'popFade',
|
||||
bgColor: config.backgroundColor,
|
||||
textColor: config.textColor,
|
||||
});
|
||||
|
||||
let refreshFaviconNotifications = new FaviconNotificationsUpdater(config);
|
||||
refreshFaviconNotifications.initialize();
|
||||
};
|
||||
})();
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2020 PrestaShop and Contributors
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License 3.0 (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:
|
||||
* https://opensource.org/licenses/AFL-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.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2020 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-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;
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2020 PrestaShop and Contributors
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License 3.0 (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:
|
||||
* https://opensource.org/licenses/AFL-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.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2020 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-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;
|
||||
@@ -0,0 +1,46 @@
|
||||
{**
|
||||
* 2007-2020 PrestaShop and Contributors
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License 3.0 (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:
|
||||
* https://opensource.org/licenses/AFL-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.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2020 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
{extends file="helpers/options/options.tpl"}
|
||||
|
||||
{block name="input"}
|
||||
{if $field['type'] == 'color'}
|
||||
<div class="col-lg-2">
|
||||
<div class="input-group">
|
||||
<input
|
||||
type="color"
|
||||
data-hex="true"
|
||||
class="{if isset($input.class)}{$field['class']}{else}color mColorPickerInput{/if}"
|
||||
name="{$key}"
|
||||
value="{$field['value']|escape:'html':'UTF-8'}"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
{else}
|
||||
{$smarty.block.parent}
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
{block name="after"}
|
||||
{$smarty.block.parent}
|
||||
<script type="text/javascript">
|
||||
// https://github.com/PrestaShop/PrestaShop/pull/18757
|
||||
$.fn.mColorPicker.defaults.imageFolder = baseDir + 'img/admin/';
|
||||
</script>
|
||||
{/block}
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2020 PrestaShop and Contributors
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License 3.0 (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:
|
||||
* https://opensource.org/licenses/AFL-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.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2020 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-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;
|
||||
@@ -1,31 +1,24 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2018 PrestaShop
|
||||
*
|
||||
* 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@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 http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
* 2007-2020 PrestaShop and Contributors
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License 3.0 (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:
|
||||
* https://opensource.org/licenses/AFL-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.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2020 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-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('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);
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
{*
|
||||
* 2007-2018 PrestaShop
|
||||
*
|
||||
* 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@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 http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
<div id="modulecontent" class="clearfix">
|
||||
<div id="faviconbo-menu">
|
||||
<div class="col-lg-2">
|
||||
<div class="list-group" v-on:click.prevent>
|
||||
<a href="#" class="list-group-item" v-bind:class="{ 'active': isActive('faviconConfiguration') }" v-on:click="makeActive('faviconConfiguration')"><i class="fa fa-gavel"></i> {l s='Get started' d='Modules.Faviconnotificationbo.Admin'}</a>
|
||||
</div>
|
||||
<div class="list-group" v-on:click.prevent>
|
||||
<a class="list-group-item" style="text-align:center"><i class="icon-info"></i> {l s='Version' d='Admin.Global'} {$module_version|escape:'htmlall':'UTF-8'} | <i class="icon-info"></i> PrestaShop {$ps_version|escape:'htmlall':'UTF-8'}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{* list your admin tpl *}
|
||||
<div id="faviconConfiguration" class="faviconbo_menu addons-hide">
|
||||
{include file="./tabs/faviconConfiguration.tpl"}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{* Use this if you want to send php var to your js *}
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
var base_url = "{/literal}{$ps_base_dir|escape:'htmlall':'UTF-8'}{literal}";
|
||||
var isPs17 = "{/literal}{$isPs17|escape:'htmlall':'UTF-8'}{literal}";
|
||||
var currentPage = "{/literal}{$currentPage|escape:'htmlall':'UTF-8'}{literal}";
|
||||
var moduleAdminLink = "{/literal}{$moduleAdminLink|escape:'htmlall':'UTF-8'}{literal}";
|
||||
var moduleName = "{/literal}{$module_name|escape:'htmlall':'UTF-8'}{literal}";
|
||||
var ps_version = "{/literal}{$isPs17|escape:'htmlall':'UTF-8'}{literal}";
|
||||
</script>
|
||||
{/literal}
|
||||
@@ -1,103 +0,0 @@
|
||||
{*
|
||||
* 2007-2018 PrestaShop
|
||||
*
|
||||
* 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 http://addons.prestashop.com/en/content/12-terms-and-conditions-of-use
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
<div class="panel col-lg-10 right-panel">
|
||||
<form method="post" action="{$moduleAdminLink|escape:'htmlall':'UTF-8'}&page=faviconConfiguration" class="form-horizontal">
|
||||
<h3>
|
||||
{l s='Configuration' d='Admin.Global'}
|
||||
</h3>
|
||||
<div class="form-group row">
|
||||
<div class="title">
|
||||
{l s='Display notifications in the browser tab for:' d='Modules.Faviconnotificationbo.Admin'}
|
||||
</div>
|
||||
<ol>
|
||||
<div class="col-lg-5 col-md-4 col-xs-10">
|
||||
<div class="form-group">
|
||||
<div class="control-label col-lg-5 col-md-4 col-xs-10">
|
||||
<label class="labelbutton">{l s='New orders' d='Modules.Faviconnotificationbo.Admin'}</label>
|
||||
</div>
|
||||
<div>
|
||||
<div class="input-group fixed-width-lg">
|
||||
<span class="switch prestashop-switch fixed-width-lg">
|
||||
<input class="yes" type="radio" name="CHECKBOX_ORDER" id="checkbox_track_new_orders_on" value="1" {if $bofavicon_params.CHECKBOX_ORDER eq 1}checked="checked"{/if}>
|
||||
<label for="checkbox_track_new_orders_on" class="radioCheck">{l s='Yes' d='Admin.Global'}</label>
|
||||
<input class="no" type="radio" name="CHECKBOX_ORDER" id="checkbox_track_new_orders_off" value="0" {if $bofavicon_params.CHECKBOX_ORDER eq 0}checked="checked"{/if}>
|
||||
<label for="checkbox_track_new_orders_off" class="radioCheck">{l s='No' d='Admin.Global'}</label>
|
||||
<a class="slide-button btn"></a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="control-label col-lg-5 col-md-4 col-xs-10">
|
||||
<label class="labelbutton">{l s='New customers' d='Admin.Navigation.Header'}</label>
|
||||
</div>
|
||||
<div>
|
||||
<div class="input-group fixed-width-lg">
|
||||
<span class="switch prestashop-switch fixed-width-lg">
|
||||
<input class="yes" type="radio" name="CHECKBOX_CUSTOMER" id="checkbox_track_new_customers_on" value="1" {if $bofavicon_params.CHECKBOX_CUSTOMER eq 1}checked="checked"{/if}>
|
||||
<label for="checkbox_track_new_customers_on" class="radioCheck">{l s='Yes' d='Admin.Global'}</label>
|
||||
<input class="no" type="radio" name="CHECKBOX_CUSTOMER" id="checkbox_track_new_customers_off" value="0" {if $bofavicon_params.CHECKBOX_CUSTOMER eq 0}checked="checked"{/if}>
|
||||
<label for="checkbox_track_new_customers_off" class="radioCheck">{l s='No' d='Admin.Global'}</label>
|
||||
<a class="slide-button btn"></a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="control-label col-lg-5 col-md-4 col-xs-10">
|
||||
<label class="labelbutton">{l s='New messages' d='Admin.Orderscustomers.Feature'}</label>
|
||||
</div>
|
||||
<div>
|
||||
<div class="input-group fixed-width-lg">
|
||||
<span class="switch prestashop-switch fixed-width-lg">
|
||||
<input class="yes" type="radio" name="CHECKBOX_MESSAGE" id="checkbox_track_new_messages_on" value="1" {if $bofavicon_params.CHECKBOX_MESSAGE eq 1}checked="checked"{/if}>
|
||||
<label for="checkbox_track_new_messages_on" class="radioCheck">{l s='Yes' d='Admin.Global'}</label>
|
||||
<input class="no" type="radio" name="CHECKBOX_MESSAGE" id="checkbox_track_new_messages_off" value="0" {if $bofavicon_params.CHECKBOX_MESSAGE eq 0}checked="checked"{/if}>
|
||||
<label for="checkbox_track_new_messages_off" class="radioCheck">{l s='No' d='Admin.Global'}</label>
|
||||
<a class="slide-button btn"></a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="col-lg-5">
|
||||
<div class="form-group">
|
||||
<div class="divcolorpicker control-label col-lg-6 col-md-4 col-xs-10">
|
||||
<label class="labelbutton" for="faviconbo_input_backgroundcolor">{l s='Notification background color' d='Modules.Faviconnotificationbo.Admin'}</label>
|
||||
</div>
|
||||
<div>
|
||||
<div class="input-group fixed-width-lg">
|
||||
<input id="BACKGROUND_COLOR_FAVICONBO" type="text" data-hex="true" class="mColorPickerFaviconInput" value="{if isset($bofavicon_params.BACKGROUND_COLOR_FAVICONBO)}{$bofavicon_params.BACKGROUND_COLOR_FAVICONBO|escape:'quotes'}{/if}" name="BACKGROUND_COLOR_FAVICONBO"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="divcolorpicker control-label col-lg-6 col-md-4 col-xs-10">
|
||||
<label class="labelbutton" for="faviconbo_input_textcolor">{l s='Notification text color' d='Modules.Faviconnotificationbo.Admin'}</label>
|
||||
</div>
|
||||
<div>
|
||||
<div class="input-group fixed-width-lg">
|
||||
<input id="TEXT_COLOR_FAVICONBO" type="text" data-hex="true" class="mColorPickerFaviconInput" value="{if isset($bofavicon_params.TEXT_COLOR_FAVICONBO)}{$bofavicon_params.TEXT_COLOR_FAVICONBO|escape:'quotes'}{/if}" name="TEXT_COLOR_FAVICONBO"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-footer">
|
||||
<button type="submit" value="1" id="module_form_submit_btn" name="submitFavIconConf" class="btn btn-default pull-right"><i class="process-icon-save"></i>{l s='Save' d='Admin.Actions'}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@@ -1,35 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2018 PrestaShop
|
||||
*
|
||||
* 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@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 http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 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;
|
||||
@@ -0,0 +1,32 @@
|
||||
{**
|
||||
* 2007-2020 PrestaShop and Contributors
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License 3.0 (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:
|
||||
* https://opensource.org/licenses/AFL-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.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2020 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
<script>
|
||||
if (undefined !== ps_faviconnotificationbo) {
|
||||
ps_faviconnotificationbo.initialize({
|
||||
backgroundColor: '{$bofaviconBgColor|escape:'javascript'}',
|
||||
textColor: '{$bofaviconTxtColor|escape:'javascript'}',
|
||||
notificationGetUrl: '{$bofaviconUrl|escape:'javascript'}',
|
||||
CHECKBOX_ORDER: {$bofaviconOrder|intval},
|
||||
CHECKBOX_CUSTOMER: {$bofaviconCustomer|intval},
|
||||
CHECKBOX_MESSAGE: {$bofaviconMsg|intval},
|
||||
timer: 120000, // Refresh every 2 minutes
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@@ -1,118 +0,0 @@
|
||||
{*
|
||||
* 2007-2018 PrestaShop
|
||||
*
|
||||
* 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@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 http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
<script type="text/javascript">
|
||||
/*
|
||||
* Return total of notification per checkbox checked
|
||||
* @param int nbNewCustomer
|
||||
* @param int nbNewOrder
|
||||
* @param int nbNewMessage
|
||||
* @return int result Total of Notification
|
||||
*/
|
||||
function getNotification(nbNewCustomer, nbNewOrder, nbNewMessage) {
|
||||
let result = 0;
|
||||
//if radiobutton is checked
|
||||
{if $bofavicon_params.CHECKBOX_ORDER eq 1} result += nbNewOrder; {/if}
|
||||
{if $bofavicon_params.CHECKBOX_CUSTOMER eq 1} result += nbNewCustomer; {/if}
|
||||
{if $bofavicon_params.CHECKBOX_MESSAGE eq 1} result += nbNewMessage; {/if}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
function loadAjax(adminController) {
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
dataType: 'JSON',
|
||||
url: adminController,
|
||||
data: {
|
||||
ajax: true,
|
||||
action: "GetNotifications",
|
||||
},
|
||||
|
||||
success: function(data) {
|
||||
|
||||
let nbNewCustomers = parseInt(data.customer.total);
|
||||
let nbNewOrders = parseInt(data.order.total);
|
||||
let nbNewCustomerMessages = parseInt(data.customer_message.total);
|
||||
|
||||
let nbTotalNotification = getNotification(nbNewCustomers, nbNewOrders, nbNewCustomerMessages);
|
||||
|
||||
favicon.badge(nbTotalNotification);
|
||||
},
|
||||
error: function(err) {
|
||||
console.log(err);
|
||||
console.log(adminController);
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
function updateNotifications(type) {
|
||||
$.post(
|
||||
baseAdminDir + "ajax.php",
|
||||
{
|
||||
"updateElementEmployee": "1",
|
||||
"updateElementEmployeeType": type
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
adminController = adminController.replace(/\amp;/g, '');
|
||||
//set the configuration of the favicon
|
||||
window.favicon = new Favico({
|
||||
animation: 'popFade',
|
||||
bgColor: BgColor,
|
||||
textColor: TxtColor,
|
||||
});
|
||||
loadAjax(adminController)
|
||||
setInterval(function() {
|
||||
loadAjax(adminController);
|
||||
}, 60000); //refresh notification every 60 seconds
|
||||
|
||||
//update favicon when you click on the customer tab into your backoffice
|
||||
$(document).on('click', '#subtab-AdminCustomers', function (e) {
|
||||
updateNotifications('customer');
|
||||
});
|
||||
//update favicon when you click on the customer service tab into your backoffice
|
||||
$(document).on('click', '#subtab-AdminCustomerThreads', function (e) {
|
||||
updateNotifications('customer_message');
|
||||
});
|
||||
//update favicon when you click on the order tab into your backoffice
|
||||
$(document).on('click', '#subtab-AdminOrders', function (e) {
|
||||
updateNotifications('order');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{* Use this if you want to send php var to your js *}
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
let BgColor = "{/literal}{$bofavicon_params.BACKGROUND_COLOR_FAVICONBO|escape:'html':'UTF-8'}{literal}";
|
||||
let TxtColor = "{/literal}{$bofavicon_params.TEXT_COLOR_FAVICONBO|escape:'html':'UTF-8'}{literal}";
|
||||
let CheckBoxOrder = "{/literal}{$bofavicon_params.CHECKBOX_ORDER|escape:'html':'UTF-8'}{literal}";
|
||||
let CheckBoxCustomer = "{/literal}{$bofavicon_params.CHECKBOX_CUSTOMER|escape:'html':'UTF-8'}{literal}";
|
||||
let CheckBoxMessage = "{/literal}{$bofavicon_params.CHECKBOX_MESSAGE|escape:'html':'UTF-8'}{literal}";
|
||||
let adminController = "{/literal}{$adminController|escape:'htmlall':'UTF-8'}{literal}";
|
||||
</script>
|
||||
{/literal}
|
||||
@@ -1,31 +1,24 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2018 PrestaShop
|
||||
*
|
||||
* 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@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 http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
* 2007-2020 PrestaShop and Contributors
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License 3.0 (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:
|
||||
* https://opensource.org/licenses/AFL-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.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2020 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-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('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);
|
||||
|
||||
@@ -1,31 +1,24 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2018 PrestaShop
|
||||
*
|
||||
* 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@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 http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
* 2007-2020 PrestaShop and Contributors
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License 3.0 (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:
|
||||
* https://opensource.org/licenses/AFL-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.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2020 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-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('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);
|
||||
|
||||
Reference in New Issue
Block a user