Fix updater for old clients

* fixed problem with updater error
* preserve last run remove status
This commit is contained in:
Pavel 2020-04-16 18:18:08 +03:00 committed by GitHub
parent 006bd960e3
commit 302c6dd18c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 5 deletions

View File

@ -1,3 +1,6 @@
## v3.0.3
* Исправлена ошибка при обновлении со старой версии для некоторых клиентов
## v3.0.2
* Подкатегории неактивной категории и товары в них больше не попадают в ICML

View File

@ -1 +1 @@
3.0.2
3.0.3

View File

@ -116,7 +116,7 @@ class RetailCRM extends Module
{
$this->name = 'retailcrm';
$this->tab = 'export';
$this->version = '3.0.2';
$this->version = '3.0.3';
$this->author = 'DIGITAL RETAIL TECHNOLOGIES SL';
$this->displayName = $this->l('retailCRM');
$this->description = $this->l('Integration module for retailCRM');

View File

@ -62,17 +62,17 @@ function upgrade_module_3_0_1($module)
// API v4 is deprecated, so API version flag is removed for now.
if (Configuration::hasKey($apiVersion)) {
$result = Configuration::deleteByName($apiVersion);
Configuration::deleteByName($apiVersion);
}
// Fixes consequences of old fixed bug in JobManager
// Fixes consequences of old fixed bug in JobManager. Also, this field format was changed in new version.
if (Configuration::hasKey($lastRun)) {
$result = $result && Configuration::deleteByName($lastRun);
}
// Immediate cart synchronization is not safe anymore (causes data inconsistency)
if (Configuration::hasKey($syncCarts) && Configuration::get($syncCarts) == "0") {
$result = $result && Configuration::set($syncCarts, "900");
Configuration::set($syncCarts, "900");
}
return $result && Db::getInstance()->execute(