Skip to content

Commit 1870199

Browse files
ENGCOM-2132: [Backport 2.2] Use correct error message for duplicate error key in product import #16389
- Merge Pull Request #16389 from gelanivishal/magento2:2.2-develop-PR-port-15980 - Merged commits: 1. 9c9ac11 2. fa7801f
2 parents aa4b734 + fa7801f commit 1870199

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)