synchronizer->synchronizeAll(); if ($summary['errors'] !== []) { $this->messageManager->addErrorMessage(__( 'ERP SKU synchronization completed with %1 Website error(s). Review Synchronization Logs.', count($summary['errors']) )); } $this->messageManager->addSuccessMessage(__( 'Processed %1 Website(s) and %2 pair(s): %3 mapped, %4 products remain without an ERP SKU.', $summary['websites'], $summary['pairs'], $summary['mapped'], $summary['unmapped'] )); } catch (\Throwable $exception) { $this->messageManager->addErrorMessage(__('ERP SKU synchronization failed: %1', $exception->getMessage())); } return $this->resultRedirectFactory->create()->setPath('esun_lingxing/store/index'); } }