first commit

This commit is contained in:
2024-12-17 13:43:22 +01:00
commit 8e6cd8b410
21292 changed files with 3514826 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
<?php
/**
* Copyright since 2007 PrestaShop SA and Contributors
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License version 3.0
* that is bundled with this package in the file LICENSE.md.
* 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 and Contributors <contact@prestashop.com>
* @copyright Since 2007 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0
*/
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,23 @@
<?php
/**
* Copyright since 2007 PrestaShop SA and Contributors
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License version 3.0
* that is bundled with this package in the file LICENSE.md.
* 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 and Contributors <contact@prestashop.com>
* @copyright Since 2007 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0
*/
function upgrade_module_3_2_0()
{
return true;
}

View File

@@ -0,0 +1,95 @@
<?php
/**
* Copyright since 2007 PrestaShop SA and Contributors
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License version 3.0
* that is bundled with this package in the file LICENSE.md.
* 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 and Contributors <contact@prestashop.com>
* @copyright Since 2007 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0
*/
function upgrade_module_3_2_1()
{
/** @var Ps_accounts $module */
$module = Module::getInstanceByName('ps_accounts');
$hooks = [
'actionObjectShopUrlUpdateAfter',
'actionObjectProductDeleteAfter',
'actionObjectCategoryDeleteAfter',
'actionObjectProductAddAfter',
'actionObjectProductUpdateAfter',
'actionObjectCartAddAfter',
'actionObjectCartUpdateAfter',
'actionObjectOrderAddAfter',
'actionObjectOrderUpdateAfter',
'actionObjectCategoryAddAfter',
'actionObjectCategoryUpdateAfter',
];
$sqlQueries = [];
$sqlQueries[] = 'DROP TABLE IF EXISTS `' . _DB_PREFIX_ . 'accounts_sync`';
$sqlQueries[] = 'CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'accounts_type_sync`
(
`type` VARCHAR(50) NOT NULL,
`offset` INT(10) UNSIGNED NOT NULL DEFAULT 0,
`id_shop` INT(10) UNSIGNED NOT NULL,
`lang_iso` VARCHAR(3),
`full_sync_finished` TINYINT(1) NOT NULL DEFAULT 0,
`last_sync_date` DATETIME NOT NULL
) ENGINE = ENGINE_TYPE
DEFAULT CHARSET = utf8;';
$sqlQueries[] = 'CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'accounts_sync`
(
`job_id` VARCHAR(200) NOT NULL,
`created_at` DATETIME NOT NULL
) ENGINE = ENGINE_TYPE
DEFAULT CHARSET = utf8;';
$sqlQueries[] = 'CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'accounts_deleted_objects`
(
`type` VARCHAR(50) NOT NULL,
`id_object` INT(10) UNSIGNED NOT NULL,
`id_shop` INT(10) UNSIGNED NOT NULL,
`created_at` DATETIME NOT NULL,
PRIMARY KEY (`type`, `id_object`, `id_shop`)
) ENGINE = ENGINE_TYPE
DEFAULT CHARSET = utf8;';
$sqlQueries[] = 'CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'accounts_incremental_sync`
(
`type` VARCHAR(50) NOT NULL,
`id_object` INT(10) UNSIGNED NOT NULL,
`id_shop` INT(10) UNSIGNED NOT NULL,
`lang_iso` VARCHAR(3),
`created_at` DATETIME NOT NULL,
PRIMARY KEY (`type`, `id_object`, `id_shop`, `lang_iso`)
) ENGINE = ENGINE_TYPE
DEFAULT CHARSET = utf8;';
$sqlQueries[] = 'ALTER TABLE `' . _DB_PREFIX_ . 'accounts_type_sync` ADD `id_shop` INT(10) NOT NULL AFTER `offset`; ';
$sqlQueries[] = 'ALTER TABLE `' . _DB_PREFIX_ . 'accounts_type_sync` ADD `lang_iso` VARCHAR(3) AFTER `id_shop`; ';
$sqlQueries[] = 'ALTER TABLE `' . _DB_PREFIX_ . 'accounts_type_sync` ADD `full_sync_finished` TINYINT(1) NOT NULL DEFAULT 0 AFTER `lang_iso`; ';
$sqlQueries[] = 'ALTER TABLE `' . _DB_PREFIX_ . 'accounts_type_sync` ADD `last_sync_date` DATETIME NOT NULL AFTER `full_sync_finished`; ';
foreach ($sqlQueries as $sqlQuery) {
try {
Db::getInstance()->execute($sqlQuery);
} catch (Exception $exception) {
}
}
foreach ($hooks as $hook) {
$module->registerHook($hook);
}
return true;
}

View File

@@ -0,0 +1,14 @@
<?php
/**
* @param Ps_accounts $module
*/
function upgrade_module_4_0_0($module)
{
$moduleInstaller = $module->getService(\PrestaShop\Module\PsAccounts\Installer\Installer::class);
// Ignore fail on ps_eventbus install
$moduleInstaller->installModule('ps_eventbus');
return true;
}