don't use 1.7 controllers lifecycle

This commit is contained in:
Pavel 2020-05-18 14:47:20 +03:00 committed by GitHub
parent 06fcce2dec
commit 7db8ff5044
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 36 deletions

View File

@ -53,18 +53,7 @@ class RetailcrmConsultantModuleFrontController extends ModuleFrontController
header('Content-Type: application/json');
}
if (Tools::substr(_PS_VERSION_, 0, 3) == '1.6') {
echo $response;
} else {
try {
parent::initContent();
$this->ajaxRender($response);
} catch (\Exception $exception) {
// Sometimes ps_shoppingcart throws exception which breaks our controller.
// We don't care about ps_shoppingcart here, so, we will fallback to old way.
echo $response;
}
}
echo $response;
}
/**

View File

@ -53,18 +53,7 @@ class RetailcrmDaemonCollectorModuleFrontController extends ModuleFrontControlle
header('Content-Type: application/json');
}
if (Tools::substr(_PS_VERSION_, 0, 3) == '1.6') {
echo $response;
} else {
try {
parent::initContent();
$this->ajaxRender($response);
} catch (\Exception $exception) {
// Sometimes ps_shoppingcart throws exception which breaks our controller.
// We don't care about ps_shoppingcart here, so, we will fallback to old way.
echo $response;
}
}
echo $response;
}
/**

View File

@ -53,18 +53,7 @@ class RetailcrmJobsModuleFrontController extends ModuleFrontController
header('Content-Type: application/json');
}
if (Tools::substr(_PS_VERSION_, 0, 3) == '1.6') {
echo $response;
} else {
try {
parent::initContent();
$this->ajaxRender($response);
} catch (\Exception $exception) {
// Sometimes ps_shoppingcart throws exception which breaks our controller.
// We don't care about ps_shoppingcart here, so, we will fallback to old way.
echo $response;
}
}
echo $response;
}
/**