update
This commit is contained in:
46
modules/dpdpoland/upgrade/Upgrade-1.2.0.php
Normal file
46
modules/dpdpoland/upgrade/Upgrade-1.2.0.php
Normal file
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
/**
|
||||
* 2019 DPD Polska Sp. z o.o.
|
||||
*
|
||||
* 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:
|
||||
* http://opensource.org/licenses/osl-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
|
||||
* prestashop@dpd.com.pl so we can send you a copy immediately.
|
||||
*
|
||||
* @author DPD Polska Sp. z o.o.
|
||||
* @copyright 2019 DPD Polska Sp. z o.o.
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of DPD Polska Sp. z o.o.
|
||||
*/
|
||||
|
||||
if (!defined('_PS_VERSION_')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Module $module
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
function upgrade_module_1_2_0($module)
|
||||
{
|
||||
$hasRegistered =
|
||||
$module->registerHook('displayBeforeCarrier') &&
|
||||
$module->registerHook('header') &&
|
||||
$module->registerHook('actionValidateOrder');
|
||||
|
||||
$hasInstalled = Db::getInstance()->execute(
|
||||
'CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'dpdpoland_pudo_cart` (
|
||||
`pudo_code` VARCHAR(255) NOT NULL,
|
||||
`id_cart` int(11) NOT NULL,
|
||||
PRIMARY KEY (`id_cart`)
|
||||
) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8;'
|
||||
);
|
||||
|
||||
return $hasInstalled && $hasRegistered;
|
||||
}
|
||||
39
modules/dpdpoland/upgrade/Upgrade-1.2.7.php
Normal file
39
modules/dpdpoland/upgrade/Upgrade-1.2.7.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
/**
|
||||
* 2019 DPD Polska Sp. z o.o.
|
||||
*
|
||||
* 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:
|
||||
* http://opensource.org/licenses/osl-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
|
||||
* prestashop@dpd.com.pl so we can send you a copy immediately.
|
||||
*
|
||||
* @author DPD Polska Sp. z o.o.
|
||||
* @copyright 2019 DPD Polska Sp. z o.o.
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of DPD Polska Sp. z o.o.
|
||||
*/
|
||||
|
||||
if (!defined('_PS_VERSION_')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Module $module
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
function upgrade_module_1_2_7($module)
|
||||
{
|
||||
$hasInstalled = Db::getInstance()->execute(
|
||||
'ALTER TABLE `' . _DB_PREFIX_ . 'dpdpoland_package`
|
||||
ADD `dpde` TINYINT NOT NULL AFTER `rod`,
|
||||
ADD `dpdnd` TINYINT NOT NULL AFTER `dpde`;'
|
||||
);
|
||||
$hasInstalled &= $module->registerHook('actionCarrierUpdate');
|
||||
return $hasInstalled;
|
||||
}
|
||||
33
modules/dpdpoland/upgrade/Upgrade-1.3.0.php
Normal file
33
modules/dpdpoland/upgrade/Upgrade-1.3.0.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
/**
|
||||
* 2019 DPD Polska Sp. z o.o.
|
||||
*
|
||||
* 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:
|
||||
* http://opensource.org/licenses/osl-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
|
||||
* prestashop@dpd.com.pl so we can send you a copy immediately.
|
||||
*
|
||||
* @author DPD Polska Sp. z o.o.
|
||||
* @copyright 2019 DPD Polska Sp. z o.o.
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of DPD Polska Sp. z o.o.
|
||||
*/
|
||||
|
||||
if (!defined('_PS_VERSION_')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Module $module
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
function upgrade_module_1_3_0($module)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
40
modules/dpdpoland/upgrade/Upgrade-1.4.0.php
Normal file
40
modules/dpdpoland/upgrade/Upgrade-1.4.0.php
Normal file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
if (!defined('_PS_VERSION_')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
function upgrade_module_1_4_0()
|
||||
{
|
||||
return Db::getInstance()->execute(
|
||||
'CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'dpdpoland_pickup_history` (
|
||||
`id_pickup_history` int(10) NOT NULL AUTO_INCREMENT,
|
||||
`order_number` varchar(255) NULL,
|
||||
`sender_address` varchar(255) NULL,
|
||||
`sender_company` varchar(255) NULL,
|
||||
`sender_name` varchar(255) NULL,
|
||||
`sender_phone` varchar(50) NULL,
|
||||
`pickup_date` datetime NULL,
|
||||
`pickup_time` varchar(50) NULL,
|
||||
`type` varchar(50) NULL,
|
||||
`envelope` int(10) NULL,
|
||||
`package` int(10) NULL,
|
||||
`package_weight_all` decimal(20,6) NULL,
|
||||
`package_heaviest_weight` decimal(20,6) NULL,
|
||||
`package_heaviest_width` decimal(20,6) NULL,
|
||||
`package_heaviest_length` decimal(20,6) NULL,
|
||||
`package_heaviest_height` decimal(20,6) NULL,
|
||||
`pallet` int(10) NULL,
|
||||
`pallet_weight` decimal(20,6) NULL,
|
||||
`pallet_heaviest_weight` decimal(20,6) NULL,
|
||||
`pallet_heaviest_height` decimal(20,6) NULL,
|
||||
`id_shop` int(10) NOT NULL,
|
||||
`date_add` datetime NOT NULL,
|
||||
`date_upd` datetime NOT NULL,
|
||||
PRIMARY KEY (`id_pickup_history`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;'
|
||||
);
|
||||
}
|
||||
13
modules/dpdpoland/upgrade/Upgrade-1.4.1.php
Normal file
13
modules/dpdpoland/upgrade/Upgrade-1.4.1.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
if (!defined('_PS_VERSION_')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
function upgrade_module_1_4_1()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
13
modules/dpdpoland/upgrade/Upgrade-1.4.2.php
Normal file
13
modules/dpdpoland/upgrade/Upgrade-1.4.2.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
if (!defined('_PS_VERSION_')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
function upgrade_module_1_4_2()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
39
modules/dpdpoland/upgrade/Upgrade-1.4.4.php
Normal file
39
modules/dpdpoland/upgrade/Upgrade-1.4.4.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
/**
|
||||
* 2019 DPD Polska Sp. z o.o.
|
||||
*
|
||||
* 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:
|
||||
* http://opensource.org/licenses/osl-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
|
||||
* prestashop@dpd.com.pl so we can send you a copy immediately.
|
||||
*
|
||||
* @author DPD Polska Sp. z o.o.
|
||||
* @copyright 2019 DPD Polska Sp. z o.o.
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of DPD Polska Sp. z o.o.
|
||||
*/
|
||||
|
||||
if (!defined('_PS_VERSION_')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Module $module
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
function upgrade_module_1_4_4($module)
|
||||
{
|
||||
$hasInstalled = Db::getInstance()->execute(
|
||||
'ALTER TABLE `' . _DB_PREFIX_ . 'dpdpoland_package`
|
||||
ADD `duty` tinyint(1) NOT NULL AFTER `dpdnd`,
|
||||
ADD `duty_amount` decimal(17,2) DEFAULT NULL AFTER `duty`,
|
||||
ADD `duty_currency` varchar(3) DEFAULT NULL AFTER `duty_amount`;'
|
||||
);
|
||||
return $hasInstalled;
|
||||
}
|
||||
39
modules/dpdpoland/upgrade/Upgrade-1.5.0.php
Normal file
39
modules/dpdpoland/upgrade/Upgrade-1.5.0.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
/**
|
||||
* 2019 DPD Polska Sp. z o.o.
|
||||
*
|
||||
* 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:
|
||||
* http://opensource.org/licenses/osl-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
|
||||
* prestashop@dpd.com.pl so we can send you a copy immediately.
|
||||
*
|
||||
* @author DPD Polska Sp. z o.o.
|
||||
* @copyright 2019 DPD Polska Sp. z o.o.
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of DPD Polska Sp. z o.o.
|
||||
*/
|
||||
|
||||
if (!defined('_PS_VERSION_')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Module $module
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
function upgrade_module_1_5_0()
|
||||
{
|
||||
return Db::getInstance()->execute(
|
||||
'ALTER TABLE `' . _DB_PREFIX_ . 'dpdpoland_package`
|
||||
ADD `dpdtoday` TINYINT NOT NULL DEFAULT "0" AFTER `duty_currency`,
|
||||
ADD `dpdsaturday` TINYINT NOT NULL DEFAULT "0" AFTER `dpdtoday`,
|
||||
ADD `dpdfood` TINYINT NOT NULL DEFAULT "0" AFTER `dpdsaturday`;'
|
||||
);
|
||||
}
|
||||
|
||||
40
modules/dpdpoland/upgrade/Upgrade-1.5.1.php
Normal file
40
modules/dpdpoland/upgrade/Upgrade-1.5.1.php
Normal file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
/**
|
||||
* 2019 DPD Polska Sp. z o.o.
|
||||
*
|
||||
* 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:
|
||||
* http://opensource.org/licenses/osl-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
|
||||
* prestashop@dpd.com.pl so we can send you a copy immediately.
|
||||
*
|
||||
* @author DPD Polska Sp. z o.o.
|
||||
* @copyright 2019 DPD Polska Sp. z o.o.
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of DPD Polska Sp. z o.o.
|
||||
*/
|
||||
|
||||
if (!defined('_PS_VERSION_')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Module $module
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
function upgrade_module_1_5_1($module)
|
||||
{
|
||||
if (!version_compare(_PS_VERSION_, '1.5', '<')) {
|
||||
if (version_compare(_PS_VERSION_, '1.7.7', '>=') && !$module->registerHook('actionOrderGridDefinitionModifier'))
|
||||
return false;
|
||||
else
|
||||
if (!$module->registerHook('displayAdminOrdersListAfter'))
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
40
modules/dpdpoland/upgrade/Upgrade-1.6.0.php
Normal file
40
modules/dpdpoland/upgrade/Upgrade-1.6.0.php
Normal file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
/**
|
||||
* 2022 DPD Polska Sp. z o.o.
|
||||
*
|
||||
* 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:
|
||||
* http://opensource.org/licenses/osl-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
|
||||
* prestashop@dpd.com.pl so we can send you a copy immediately.
|
||||
*
|
||||
* @author DPD Polska Sp. z o.o.
|
||||
* @copyright 2019 DPD Polska Sp. z o.o.
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of DPD Polska Sp. z o.o.
|
||||
*/
|
||||
|
||||
require_once(_DPDPOLAND_CONTROLLERS_DIR_.'dpd_pudo_cod.service.php');
|
||||
|
||||
if (!defined('_PS_VERSION_')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
function upgrade_module_1_6_0()
|
||||
{
|
||||
if (!version_compare(_PS_VERSION_, '1.5', '<')) {
|
||||
if (!Tools::getValue(DpdPolandConfiguration::CARRIER_PUDO_COD)) {
|
||||
if (!DpdPolandCarrierPudoCodService::install())
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
38
modules/dpdpoland/upgrade/Upgrade-1.6.2.php
Normal file
38
modules/dpdpoland/upgrade/Upgrade-1.6.2.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
/**
|
||||
* 2019 DPD Polska Sp. z o.o.
|
||||
*
|
||||
* 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:
|
||||
* http://opensource.org/licenses/osl-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
|
||||
* prestashop@dpd.com.pl so we can send you a copy immediately.
|
||||
*
|
||||
* @author DPD Polska Sp. z o.o.
|
||||
* @copyright 2019 DPD Polska Sp. z o.o.
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of DPD Polska Sp. z o.o.
|
||||
*/
|
||||
|
||||
if (!defined('_PS_VERSION_')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Module $module
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
function upgrade_module_1_6_2()
|
||||
{
|
||||
return Db::getInstance()->execute(
|
||||
'ALTER TABLE `' . _DB_PREFIX_ . 'dpdpoland_package`
|
||||
ADD `dpdfood_limit_date` varchar(15) DEFAULT NULL AFTER `dpdfood`,
|
||||
ADD `dpdlq` TINYINT NOT NULL DEFAULT "0" AFTER `dpdfood_limit_date`;'
|
||||
);
|
||||
}
|
||||
|
||||
36
modules/dpdpoland/upgrade/Upgrade-1.6.3.php
Normal file
36
modules/dpdpoland/upgrade/Upgrade-1.6.3.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
/**
|
||||
* 2019 DPD Polska Sp. z o.o.
|
||||
*
|
||||
* 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:
|
||||
* http://opensource.org/licenses/osl-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
|
||||
* prestashop@dpd.com.pl so we can send you a copy immediately.
|
||||
*
|
||||
* @author DPD Polska Sp. z o.o.
|
||||
* @copyright 2019 DPD Polska Sp. z o.o.
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of DPD Polska Sp. z o.o.
|
||||
*/
|
||||
|
||||
if (!defined('_PS_VERSION_')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Module $module
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
function upgrade_module_1_6_3()
|
||||
{
|
||||
return Db::getInstance()->execute(
|
||||
'ALTER TABLE ' . _DB_PREFIX_ . _DPDPOLAND_PARCEL_DB_.' ADD weight_adr decimal(20,6) NULL'
|
||||
);
|
||||
}
|
||||
|
||||
57
modules/dpdpoland/upgrade/Upgrade-1.6.5.php
Normal file
57
modules/dpdpoland/upgrade/Upgrade-1.6.5.php
Normal file
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
/**
|
||||
* 2019 DPD Polska Sp. z o.o.
|
||||
*
|
||||
* 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:
|
||||
* http://opensource.org/licenses/osl-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
|
||||
* prestashop@dpd.com.pl so we can send you a copy immediately.
|
||||
*
|
||||
* @author DPD Polska Sp. z o.o.
|
||||
* @copyright 2019 DPD Polska Sp. z o.o.
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of DPD Polska Sp. z o.o.
|
||||
*/
|
||||
|
||||
if (!defined('_PS_VERSION_')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
function upgrade_module_1_6_5()
|
||||
{
|
||||
$configuration = DB::getInstance()->executeS('
|
||||
SELECT `id_configuration`, `name`, `value`
|
||||
FROM `' . _DB_PREFIX_ . 'configuration`
|
||||
WHERE `name` = "' . DpdPolandConfiguration::PASSWORD . '"
|
||||
');
|
||||
|
||||
if (!$configuration || empty($configuration))
|
||||
return true;
|
||||
|
||||
$phpEncryption = null;
|
||||
if (version_compare(_PS_VERSION_, '1.7.0.0', '<'))
|
||||
$phpEncryption = new Rijndael('_RIJNDAEL_KEY_', '_RIJNDAEL_IV_');
|
||||
else
|
||||
$phpEncryption = new PhpEncryption(_NEW_COOKIE_KEY_);
|
||||
|
||||
foreach ($configuration as $item) {
|
||||
$encryptedPassword = $phpEncryption->encrypt($item['value']);
|
||||
if (!isset($encryptedPassword) || $encryptedPassword == null || $encryptedPassword == "")
|
||||
return false;
|
||||
$updateSql = 'UPDATE `' . _DB_PREFIX_ . 'configuration` SET `value` = "' . $encryptedPassword . '" WHERE `' . _DB_PREFIX_ . 'configuration`.`id_configuration` = ' . $item['id_configuration'] . ';';
|
||||
$newResult = DB::getInstance()->execute($updateSql);
|
||||
if ($newResult !== true)
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
35
modules/dpdpoland/upgrade/Upgrade-2.0.0.php
Normal file
35
modules/dpdpoland/upgrade/Upgrade-2.0.0.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
/**
|
||||
* 2023 DPD Polska Sp. z o.o.
|
||||
*
|
||||
* 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:
|
||||
* http://opensource.org/licenses/osl-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
|
||||
* prestashop@dpd.com.pl so we can send you a copy immediately.
|
||||
*
|
||||
* @author DPD Polska Sp. z o.o.
|
||||
* @copyright 2023 DPD Polska Sp. z o.o.
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of DPD Polska Sp. z o.o.
|
||||
*/
|
||||
|
||||
if (!defined('_PS_VERSION_')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
function upgrade_module_2_0_0()
|
||||
{
|
||||
if (version_compare(_PS_VERSION_, '1.7', '<') || version_compare(_PS_VERSION_, '1.8', '>=')) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
35
modules/dpdpoland/upgrade/Upgrade-2.0.1.php
Normal file
35
modules/dpdpoland/upgrade/Upgrade-2.0.1.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
/**
|
||||
* 2023 DPD Polska Sp. z o.o.
|
||||
*
|
||||
* 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:
|
||||
* http://opensource.org/licenses/osl-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
|
||||
* prestashop@dpd.com.pl so we can send you a copy immediately.
|
||||
*
|
||||
* @author DPD Polska Sp. z o.o.
|
||||
* @copyright 2023 DPD Polska Sp. z o.o.
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of DPD Polska Sp. z o.o.
|
||||
*/
|
||||
|
||||
if (!defined('_PS_VERSION_')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Module $module
|
||||
* @return bool
|
||||
*/
|
||||
function upgrade_module_2_0_1($module)
|
||||
{
|
||||
if (!$module->registerHook('displayCarrierExtraContent') || !$module->registerHook('actionFrontControllerSetMedia'))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
29
modules/dpdpoland/upgrade/index.php
Normal file
29
modules/dpdpoland/upgrade/index.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/**
|
||||
* 2019 DPD Polska Sp. z o.o.
|
||||
*
|
||||
* 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:
|
||||
* http://opensource.org/licenses/osl-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
|
||||
* prestashop@dpd.com.pl so we can send you a copy immediately.
|
||||
*
|
||||
* @author DPD Polska Sp. z o.o.
|
||||
* @copyright 2019 DPD Polska Sp. z o.o.
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of DPD Polska Sp. z o.o.
|
||||
*/
|
||||
|
||||
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