first commit
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;
|
||||
}
|
||||
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