Initial commit

This commit is contained in:
2019-11-20 07:44:43 +01:00
commit 5bf49c4a81
41188 changed files with 5459177 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
<?php
/**
* NOTICE OF LICENSE
*
* This source file is subject to a commercial license from EURL ébewè - www.ebewe.net
* Use, copy, modification or distribution of this source file without written
* license agreement from the EURL ébewè is strictly forbidden.
* In order to obtain a license, please contact us: contact@ebewe.net
* ...........................................................................
* INFORMATION SUR LA LICENCE D'UTILISATION
*
* L'utilisation de ce fichier source est soumise a une licence commerciale
* concedee par la societe EURL ébewè - www.ebewe.net
* Toute utilisation, reproduction, modification ou distribution du present
* fichier source sans contrat de licence ecrit de la part de la EURL ébewè est
* expressement interdite.
* Pour obtenir une licence, veuillez contacter la EURL ébewè a l'adresse: contact@ebewe.net
* ...........................................................................
*
* @author Paul MORA
* @copyright Copyright (c) 2011-2017 EURL ébewè - www.ebewe.net - Paul MORA
* @license Commercial license
* @package Postaldeliv
* Support by mail : contact@ebewe.net
*/
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;

View File

@@ -0,0 +1,42 @@
<?php
/**
* NOTICE OF LICENSE
*
* This source file is subject to a commercial license from EURL ébewè - www.ebewe.net
* Use, copy, modification or distribution of this source file without written
* license agreement from the EURL ébewè is strictly forbidden.
* In order to obtain a license, please contact us: contact@ebewe.net
* ...........................................................................
* INFORMATION SUR LA LICENCE D'UTILISATION
*
* L'utilisation de ce fichier source est soumise a une licence commerciale
* concedee par la societe EURL ébewè - www.ebewe.net
* Toute utilisation, reproduction, modification ou distribution du present
* fichier source sans contrat de licence ecrit de la part de la EURL ébewè est
* expressement interdite.
* Pour obtenir une licence, veuillez contacter la EURL ébewè a l'adresse: contact@ebewe.net
* ...........................................................................
*
* @author Paul MORA
* @copyright Copyright (c) 2011-2018 EURL ébewè - www.ebewe.net - Paul MORA
* @license Commercial license
* @package Postaldeliv
* Support by mail : contact@ebewe.net
*/
if (!defined('_PS_VERSION_')) {
exit;
}
/**
* Function used to update your module from previous versions to the version 2.2.2,
* Don't forget to create one file per version.
*/
function upgrade_module_2_0_3($object)
{
if (!$object->uninstallOverrides()
|| !$object->installOverrides()) {
return false;
}
return true;
}

View File

@@ -0,0 +1,95 @@
<?php
/**
* NOTICE OF LICENSE
*
* This source file is subject to a commercial license from EURL ébewè - www.ebewe.net
* Use, copy, modification or distribution of this source file without written
* license agreement from the EURL ébewè is strictly forbidden.
* In order to obtain a license, please contact us: contact@ebewe.net
* ...........................................................................
* INFORMATION SUR LA LICENCE D'UTILISATION
*
* L'utilisation de ce fichier source est soumise a une licence commerciale
* concedee par la societe EURL ébewè - www.ebewe.net
* Toute utilisation, reproduction, modification ou distribution du present
* fichier source sans contrat de licence ecrit de la part de la EURL ébewè est
* expressement interdite.
* Pour obtenir une licence, veuillez contacter la EURL ébewè a l'adresse: contact@ebewe.net
* ...........................................................................
*
* @author Paul MORA
* @copyright Copyright (c) 2011-2018 EURL ébewè - www.ebewe.net - Paul MORA
* @license Commercial license
* @package PostalDeliv
* Support by mail : contact@ebewe.net
*/
if (!defined('_PS_VERSION_')) {
exit;
}
/**
* Function used to update your module from previous versions to the version 2.1.0,
* Don't forget to create one file per version.
*/
function upgrade_module_2_1_0($object)
{
// Update tab link
$idTab = Tab::getIdFromClassName('PostDeliv');
if ($idTab != 0) {
$tab = new Tab($idTab);
$tab->class_name = 'AdminPostalDeliv';
$pass = $tab->save();
if (!$pass) {
return false;
}
}
// Update postaldeliv table
if (!Db::getInstance()->execute('
ALTER TABLE `'._DB_PREFIX_.'postaldeliv`
ADD `country` TEXT NOT NULL,
ADD `range` TEXT NOT NULL
')) {
return false;
}
// Set All countries for each carrier
if (!Db::getInstance()->execute('
UPDATE `'._DB_PREFIX_.'postaldeliv`
SET `country` = 0
WHERE 1')) {
return false;
}
// Update ranges from postaldeliv_range to postaldeliv
$ranges = Db::getInstance()->executeS('SELECT *
FROM `'._DB_PREFIX_.'postaldeliv_range`
');
$ranges_array = array();
foreach ($ranges as $range) {
$ranges_array[$range['id_carrier']][] = array($range['from'], $range['to']);
}
foreach ($ranges_array as $id_carrier => $range_array) {
$range_array = serialize($range_array);
if (!Db::getInstance()->execute('
UPDATE `'._DB_PREFIX_.'postaldeliv`
SET `range` = "'.pSQL($range_array).'"
WHERE `id_carrier` = '.(int)$id_carrier)) {
return false;
}
}
// Delete postaldeliv_range table
if (!Db::getInstance()->execute('DROP TABLE IF EXISTS `'._DB_PREFIX_.'postaldeliv_range`')) {
return false;
}
// Update Overrides
if (!$object->uninstallOverrides()
|| !$object->installOverrides()) {
return false;
}
return true;
}

View File

@@ -0,0 +1,69 @@
<?php
/**
* NOTICE OF LICENSE
*
* This source file is subject to a commercial license from EURL ébewè - www.ebewe.net
* Use, copy, modification or distribution of this source file without written
* license agreement from the EURL ébewè is strictly forbidden.
* In order to obtain a license, please contact us: contact@ebewe.net
* ...........................................................................
* INFORMATION SUR LA LICENCE D'UTILISATION
*
* L'utilisation de ce fichier source est soumise a une licence commerciale
* concedee par la societe EURL ébewè - www.ebewe.net
* Toute utilisation, reproduction, modification ou distribution du present
* fichier source sans contrat de licence ecrit de la part de la EURL ébewè est
* expressement interdite.
* Pour obtenir une licence, veuillez contacter la EURL ébewè a l'adresse: contact@ebewe.net
* ...........................................................................
*
* @author Paul MORA
* @copyright Copyright (c) 2011-2018 EURL ébewè - www.ebewe.net - Paul MORA
* @license Commercial license
* @package Postaldeliv
* Support by mail : contact@ebewe.net
*/
if (!defined('_PS_VERSION_')) {
exit;
}
/**
* Function used to update your module from previous versions to the version 2.1.1,
* Don't forget to create one file per version.
*/
function upgrade_module_2_1_1($object)
{
// Update postaldeliv table and create postaldeliv_shop
if (!Db::getInstance()->execute('
ALTER TABLE `'._DB_PREFIX_.'postaldeliv`
DROP `id_shop`;
CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'postaldeliv_shop` (
`id_postaldeliv` int(11) unsigned NOT NULL,
`id_shop` int(11) unsigned NOT NULL
) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8;
')) {
return false;
}
// Update id_shop for each id_postaldeliv
$shop = Shop::getContextListShopID();
$id_postaldelivs = Db::getInstance()->executeS('SELECT `id_postaldeliv` FROM `'._DB_PREFIX_.'postaldeliv`');
$id_shops = array();
foreach ($id_postaldelivs as $id) {
foreach ($shop as $id_shop) {
$id_shops[] = array('id_postaldeliv' => (int)$id['id_postaldeliv'], 'id_shop' => (int)$id_shop);
}
}
if (!Db::getInstance()->insert('postaldeliv_shop', $id_shops)) {
return false;
}
if (!$object->uninstallOverrides()
|| !$object->installOverrides()) {
return false;
}
return true;
}

View File

@@ -0,0 +1,42 @@
<?php
/**
* NOTICE OF LICENSE
*
* This source file is subject to a commercial license from EURL ébewè - www.ebewe.net
* Use, copy, modification or distribution of this source file without written
* license agreement from the EURL ébewè is strictly forbidden.
* In order to obtain a license, please contact us: contact@ebewe.net
* ...........................................................................
* INFORMATION SUR LA LICENCE D'UTILISATION
*
* L'utilisation de ce fichier source est soumise a une licence commerciale
* concedee par la societe EURL ébewè - www.ebewe.net
* Toute utilisation, reproduction, modification ou distribution du present
* fichier source sans contrat de licence ecrit de la part de la EURL ébewè est
* expressement interdite.
* Pour obtenir une licence, veuillez contacter la EURL ébewè a l'adresse: contact@ebewe.net
* ...........................................................................
*
* @author Paul MORA
* @copyright Copyright (c) 2011-2018 EURL ébewè - www.ebewe.net - Paul MORA
* @license Commercial license
* @package Postaldeliv
* Support by mail : contact@ebewe.net
*/
if (!defined('_PS_VERSION_')) {
exit;
}
/**
* Function used to update your module from previous versions to the version 2.1.1,
* Don't forget to create one file per version.
*/
function upgrade_module_2_1_3($object)
{
if (!$object->uninstallOverrides()
|| !$object->installOverrides()) {
return false;
}
return true;
}

View File

@@ -0,0 +1,42 @@
<?php
/**
* NOTICE OF LICENSE
*
* This source file is subject to a commercial license from EURL ébewè - www.ebewe.net
* Use, copy, modification or distribution of this source file without written
* license agreement from the EURL ébewè is strictly forbidden.
* In order to obtain a license, please contact us: contact@ebewe.net
* ...........................................................................
* INFORMATION SUR LA LICENCE D'UTILISATION
*
* L'utilisation de ce fichier source est soumise a une licence commerciale
* concedee par la societe EURL ébewè - www.ebewe.net
* Toute utilisation, reproduction, modification ou distribution du present
* fichier source sans contrat de licence ecrit de la part de la EURL ébewè est
* expressement interdite.
* Pour obtenir une licence, veuillez contacter la EURL ébewè a l'adresse: contact@ebewe.net
* ...........................................................................
*
* @author Paul MORA
* @copyright Copyright (c) 2011-2018 EURL ébewè - www.ebewe.net - Paul MORA
* @license Commercial license
* @package Postaldeliv
* Support by mail : contact@ebewe.net
*/
if (!defined('_PS_VERSION_')) {
exit;
}
/**
* Function used to update your module from previous versions to the version 2.1.1,
* Don't forget to create one file per version.
*/
function upgrade_module_2_1_4($object)
{
if (!$object->uninstallOverrides()
|| !$object->installOverrides()) {
return false;
}
return true;
}

View File

@@ -0,0 +1,38 @@
<?php
/**
* NOTICE OF LICENSE
*
* This source file is subject to a commercial license from EURL ébewè - www.ebewe.net
* Use, copy, modification or distribution of this source file without written
* license agreement from the EURL ébewè is strictly forbidden.
* In order to obtain a license, please contact us: contact@ebewe.net
* ...........................................................................
* INFORMATION SUR LA LICENCE D'UTILISATION
*
* L'utilisation de ce fichier source est soumise a une licence commerciale
* concedee par la societe EURL ébewè - www.ebewe.net
* Toute utilisation, reproduction, modification ou distribution du present
* fichier source sans contrat de licence ecrit de la part de la EURL ébewè est
* expressement interdite.
* Pour obtenir une licence, veuillez contacter la EURL ébewè a l'adresse: contact@ebewe.net
* ...........................................................................
*
* @author Paul MORA
* @copyright Copyright (c) 2011-2018 EURL ébewè - www.ebewe.net - Paul MORA
* @license Commercial license
* @package Postaldeliv
* Support by mail : contact@ebewe.net
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_2_1_7($object)
{
if (!$object->uninstallOverrides()
|| !$object->installOverrides()) {
return false;
}
return true;
}