This commit is contained in:
2025-04-01 00:38:54 +02:00
parent d4d4c0c09d
commit 87da06293a
22351 changed files with 5168854 additions and 7538 deletions

View File

@@ -0,0 +1,46 @@
<?php
/**
* NOTICE OF LICENSE
*
* This source file is subject to a trade license awarded by
* Garamo Online L.T.D.
*
* Any use, reproduction, modification or distribution
* of this source file without the written consent of
* Garamo Online L.T.D It Is prohibited.
*
* @author Reaction Code <info@reactioncode.com>
* @copyright 2015-2020 Garamo Online L.T.D
* @license Commercial license
*/
function upgrade_module_3_3_0()
{
$success = true;
$upgrade_default_values = array(
'RC_PGANALYTICS_EVENT_ST' => '0',
'RC_PGANALYTICS_EVENT_PC' => '0',
'RC_PGANALYTICS_EVENT_AC' => '0',
'RC_PGANALYTICS_EVENT_RC' => '0',
'RC_PGANALYTICS_EVENT_CHO' => '0'
);
$upgrade_sql = 'ALTER TABLE `'._DB_PREFIX_.'rc_pganalytics_orders_sent`
MODIFY `id_order` INT(10) UNSIGNED NOT NULL,
MODIFY `id_shop` INT(10) UNSIGNED NOT NULL,
ADD `sent_from` VARCHAR(2) NOT NULL,
ADD `sent_at` DATETIME NOT NULL';
foreach ($upgrade_default_values as $key => $value) {
// Set default Products Rate
if (!Configuration::updateGlobalValue($key, $value)) {
$success = false;
}
}
if (!Db::getInstance()->execute($upgrade_sql)) {
$success = false;
}
return $success;
}

View File

@@ -0,0 +1,70 @@
<?php
/**
* NOTICE OF LICENSE
*
* This source file is subject to a trade license awarded by
* Garamo Online L.T.D.
*
* Any use, reproduction, modification or distribution
* of this source file without the written consent of
* Garamo Online L.T.D It Is prohibited.
*
* @author Reaction Code <info@reactioncode.com>
* @copyright 2015-2020 Garamo Online L.T.D
* @license Commercial license
*/
function upgrade_module_4_0_0($module)
{
$success = true;
$upgrade_default_values = array(
'RC_PGANALYTICS_SSSR' => 1,
'RC_PGANALYTICS_D4' => 4,
'RC_PGANALYTICS_OPT_ID' => '',
'RC_PGANALYTICS_OPT_HCN' => 'optimize-loading',
'RC_PGANALYTICS_OPT_HTO' => 4000
);
$remove_old_values = array(
'RC_PGANALYTICS_EVENT_ST',
'RC_PGANALYTICS_EVENT_PC',
'RC_PGANALYTICS_EVENT_AC',
'RC_PGANALYTICS_EVENT_RC',
'RC_PGANALYTICS_EVENT_CHO',
);
$remove_hook = 'productFooter';
// create new tables
$upgrade_sql = 'CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'rc_pganalytics_client_id` (
`id_customer` INT(10) UNSIGNED NOT NULL,
`id_shop` INT(10) UNSIGNED NOT NULL,
`client_id` VARCHAR(50) NOT NULL,
PRIMARY KEY (`id_customer`, `id_shop`)
) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8;'
;
// set default values from new vars
foreach ($upgrade_default_values as $key => $value) {
// Set default Products Rate
if (!Configuration::updateGlobalValue($key, $value)) {
$success = false;
}
}
// remove old values from db
foreach ($remove_old_values as $old_value) {
Configuration::deleteByName($old_value);
}
$module->unregisterHook($remove_hook);
// remove js cache
Media::clearCache();
if (!Db::getInstance()->execute($upgrade_sql)) {
$success = false;
}
return $success;
}

View File

@@ -0,0 +1,28 @@
<?php
/**
* NOTICE OF LICENSE
*
* This source file is subject to a trade license awarded by
* Garamo Online L.T.D.
*
* Any use, reproduction, modification or distribution
* of this source file without the written consent of
* Garamo Online L.T.D It Is prohibited.
*
* @author Reaction Code <info@reactioncode.com>
* @copyright 2015-2020 Garamo Online L.T.D
* @license Commercial license
*/
function upgrade_module_4_1_0($module)
{
$add_hooks = array(
'displayAdminOrderTabOrder',
'displayAdminOrderContentOrder'
);
$module->registerHook($add_hooks);
Media::clearCache();
return true;
}

View File

@@ -0,0 +1,31 @@
<?php
/**
* NOTICE OF LICENSE
*
* This source file is subject to a trade license awarded by
* Garamo Online L.T.D.
*
* Any use, reproduction, modification or distribution
* of this source file without the written consent of
* Garamo Online L.T.D It Is prohibited.
*
* @author Reaction Code <info@reactioncode.com>
* @copyright 2015-2020 Garamo Online L.T.D
* @license Commercial license
*/
function upgrade_module_4_1_2()
{
$remove_old_values = array(
'RC_PGANALYTICS_DEBUG'
);
// remove old values from db
foreach ($remove_old_values as $old_value) {
Configuration::deleteByName($old_value);
}
Media::clearCache();
return true;
}

View File

@@ -0,0 +1,40 @@
<?php
/**
* NOTICE OF LICENSE
*
* This source file is subject to a trade license awarded by
* Garamo Online L.T.D.
*
* Any use, reproduction, modification or distribution
* of this source file without the written consent of
* Garamo Online L.T.D It Is prohibited.
*
* @author Reaction Code <info@reactioncode.com>
* @copyright 2015-2020 Garamo Online L.T.D
* @license Commercial license
*/
function upgrade_module_4_2_0()
{
$success = true;
$upgrade_default_values = array(
'RC_PGANALYTICS_REL' => parse_url(Tools::getHttpHost(true), PHP_URL_HOST)
);
// set default values from new vars
foreach ($upgrade_default_values as $key => $value) {
// Set default Products Rate
if (!Configuration::updateGlobalValue($key, $value)) {
$success = false;
}
}
// clear all PS cache
Tools::clearSmartyCache();
Tools::clearXMLCache();
Media::clearCache();
Tools::generateIndex();
return $success;
}

View File

@@ -0,0 +1,43 @@
<?php
/**
* NOTICE OF LICENSE
*
* This source file is subject to a trade license awarded by
* Garamo Online L.T.D.
*
* Any use, reproduction, modification or distribution
* of this source file without the written consent of
* Garamo Online L.T.D It Is prohibited.
*
* @author Reaction Code <info@reactioncode.com>
* @copyright 2015-2020 Garamo Online L.T.D
* @license Commercial license
*/
function upgrade_module_4_4_0()
{
$success = true;
$upgrade_default_values = array(
'RC_PGANALYTICS_D5' => 5,
'RC_PGANALYTICS_D6' => 6,
'RC_PGANALYTICS_D7' => 7,
'RC_PGANALYTICS_D8' => 8,
);
// set default values from new vars
foreach ($upgrade_default_values as $key => $value) {
// Set default Products Rate
if (!Configuration::updateGlobalValue($key, $value)) {
$success = false;
}
}
// clear all PS cache
Tools::clearSmartyCache();
Tools::clearXMLCache();
Media::clearCache();
Tools::generateIndex();
return $success;
}

View File

@@ -0,0 +1,35 @@
<?php
/*
* 2007-2011 PrestaShop
*
* 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
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2011 PrestaShop SA
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
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;