Files
drmaterac.pl/modules/rc_pganalytics/upgrade/Upgrade-4.4.0.php
2025-01-06 20:47:25 +01:00

44 lines
1.0 KiB
PHP

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