first commit

This commit is contained in:
2024-11-05 12:22:50 +01:00
commit e5682a3912
19641 changed files with 2948548 additions and 0 deletions

View 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;
}

View 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;
}

View 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;
}

View 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;'
);
}

View File

@@ -0,0 +1,13 @@
<?php
if (!defined('_PS_VERSION_')) {
exit;
}
/**
* @return bool
*/
function upgrade_module_1_4_1()
{
return true;
}

View File

@@ -0,0 +1,13 @@
<?php
if (!defined('_PS_VERSION_')) {
exit;
}
/**
* @return bool
*/
function upgrade_module_1_4_2()
{
return true;
}

View 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;
}

View 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;