Skip to content

Commit 98715ca

Browse files
author
stani
committed
magento-engcom/import-export-improvements#93: show errors and link to download csv error report on success page
1 parent 2e036c4 commit 98715ca

File tree

1 file changed

+14
-0
lines changed
  • app/code/Magento/ImportExport/Controller/Adminhtml/Import

1 file changed

+14
-0
lines changed

app/code/Magento/ImportExport/Controller/Adminhtml/Import/Start.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,20 @@ public function execute()
9393
$this->addErrorMessages($resultBlock, $errorAggregator);
9494
} else {
9595
$this->importModel->invalidateIndex();
96+
97+
$noticeHtml = $this->historyModel->getSummary();
98+
99+
if($this->historyModel->getErrorFile()) {
100+
$noticeHtml .= '<div class="import-error-wrapper">' . __('Only the first 100 errors are shown. ')
101+
. '<a href="'
102+
. $this->createDownloadUrlImportHistoryFile($this->historyModel->getErrorFile())
103+
. '">' . __('Download full report') . '</a></div>';
104+
}
105+
106+
$resultBlock->addNotice(
107+
$noticeHtml
108+
);
109+
96110
$this->addErrorMessages($resultBlock, $errorAggregator);
97111
$resultBlock->addSuccess(__('Import successfully done'));
98112
}

0 commit comments

Comments
 (0)