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,25 @@
<?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_1_1_0()
{
$sql = 'ALTER TABLE `' . _DB_PREFIX_ . 'fb_category_match` ADD `is_parent_category` TINYINT(1) NOT NULL AFTER `google_category_id`;';
return Db::getInstance()->execute($sql);
}

View File

@@ -0,0 +1,27 @@
<?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_1_2_0()
{
$sql = 'ALTER TABLE `' . _DB_PREFIX_ . 'fb_category_match` DROP PRIMARY KEY;';
$sql .= 'ALTER TABLE `' . _DB_PREFIX_ . 'fb_category_match` ADD `id_shop` INT(11) NOT NULL AFTER `is_parent_category`;';
$sql .= 'ALTER TABLE `' . _DB_PREFIX_ . 'fb_category_match` ADD PRIMARY KEY (id_category, id_shop);';
return Db::getInstance()->execute($sql);
}

View File

@@ -0,0 +1,25 @@
<?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_1_4_1(Module $module)
{
$module->registerHook('actionFacebookCallPixel');
return true;
}

View File

@@ -0,0 +1,27 @@
<?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_1_6_0()
{
$sql = 'ALTER TABLE `' . _DB_PREFIX_ . 'fb_category_match` ADD `google_category_parent_id` INT(64) NOT NULL AFTER `google_category_id`;';
$sql .= 'ALTER TABLE `' . _DB_PREFIX_ . 'fb_category_match` ADD `google_category_parent_name` VARCHAR(255) NOT NULL AFTER `google_category_parent_id`;';
$sql .= 'ALTER TABLE `' . _DB_PREFIX_ . 'fb_category_match` ADD `google_category_name` VARCHAR(255) NOT NULL AFTER `google_category_id`;';
return Db::getInstance()->execute($sql);
}

View File

@@ -0,0 +1,32 @@
<?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
*/
/**
* @param Ps_facebook $module
*
* @return bool
*/
function upgrade_module_1_7_0($module)
{
$module->unregisterHook('actionSubmitAccountBefore');
$module->unregisterHook('displayPersonalInformationTop');
return true;
}

View File

@@ -0,0 +1,50 @@
<?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
*/
/**
* @param Ps_facebook $module
*
* @return bool
*/
function upgrade_module_1_9_2($module)
{
$moduleManagerBuilder = \PrestaShop\PrestaShop\Core\Addon\Module\ModuleManagerBuilder::getInstance();
$moduleManager = $moduleManagerBuilder->build();
try {
// - Install will run upgrade if already installed
// - PS Accounts upgrade will install EventBus
$moduleManager->install('ps_accounts');
} catch (Exception $e) {
$module->getService(
PrestaShop\Module\PrestashopFacebook\Handler\ErrorHandler\ErrorHandler::class
)->handle(
new \PrestaShop\Module\PrestashopFacebook\Exception\FacebookInstallerException(
'Failed to upgrade PS Accounts',
\PrestaShop\Module\PrestashopFacebook\Exception\FacebookInstallerException::PS_ACCOUNTS_UPGRADE_EXCEPTION,
$e
),
$e->getCode(),
false
);
}
return true;
}

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;