Skip to content

Commit 7843b8c

Browse files
author
Stanislav Idolov
authored
ENGCOM-2132: [Backport 2.2] Use correct error message for duplicate error key in product import #16389
2 parents 7f2755c + 1870199 commit 7843b8c

File tree

1 file changed

+6
-1
lines changed
  • app/code/Magento/CatalogImportExport/Model/Import

1 file changed

+6
-1
lines changed

app/code/Magento/CatalogImportExport/Model/Import/Product.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2675,7 +2675,12 @@ protected function checkUrlKeyDuplicates()
26752675
);
26762676
foreach ($urlKeyDuplicates as $entityData) {
26772677
$rowNum = $this->rowNumbers[$entityData['store_id']][$entityData['request_path']];
2678-
$this->addRowError(ValidatorInterface::ERROR_DUPLICATE_URL_KEY, $rowNum);
2678+
$message = sprintf(
2679+
$this->retrieveMessageTemplate(ValidatorInterface::ERROR_DUPLICATE_URL_KEY),
2680+
$entityData['request_path'],
2681+
$entityData['sku']
2682+
);
2683+
$this->addRowError(ValidatorInterface::ERROR_DUPLICATE_URL_KEY, $rowNum, 'url_key', $message);
26792684
}
26802685
}
26812686
}

0 commit comments

Comments
 (0)