| @@ 80-96 (lines=17) @@ | ||
| 77 | * connect module. The function is used to save store data. |
|
| 78 | * @return string |
|
| 79 | */ |
|
| 80 | public function saveGeneralAction() |
|
| 81 | { |
|
| 82 | try { |
|
| 83 | $data = $this->Request()->getParam('data'); |
|
| 84 | unset($data['id']); |
|
| 85 | $this->getConfigComponent()->setGeneralConfigs($data); |
|
| 86 | ||
| 87 | $this->View()->assign([ |
|
| 88 | 'success' => true |
|
| 89 | ]); |
|
| 90 | } catch (\Exception $e) { |
|
| 91 | $this->View()->assign([ |
|
| 92 | 'success' => false, |
|
| 93 | 'message' => $e->getMessage() |
|
| 94 | ]); |
|
| 95 | } |
|
| 96 | } |
|
| 97 | ||
| 98 | public function changeLoggingAction() |
|
| 99 | { |
|
| @@ 342-360 (lines=19) @@ | ||
| 339 | ]); |
|
| 340 | } |
|
| 341 | ||
| 342 | public function activateArticlesAction() |
|
| 343 | { |
|
| 344 | $articleIds = $this->request->getParam('ids', 0); |
|
| 345 | ||
| 346 | try { |
|
| 347 | $this->getImportService()->activateArticles($articleIds); |
|
| 348 | } catch (\Exception $e) { |
|
| 349 | $this->getLogger()->write(true, $e->getMessage(), $e); |
|
| 350 | $this->View()->assign([ |
|
| 351 | 'success' => false, |
|
| 352 | 'error' => 'There is a problem with products activation!', |
|
| 353 | ]); |
|
| 354 | ||
| 355 | return; |
|
| 356 | } |
|
| 357 | ||
| 358 | $this->View()->assign([ |
|
| 359 | 'success' => true, |
|
| 360 | ]); |
|
| 361 | } |
|
| 362 | ||
| 363 | /** |
|