Skip to content

Commit 9d9513a

Browse files
committed
ACP2E-3236: small refactoring, changed error message and regenerated all content for en_US.csv catalog file
1 parent f62f1ee commit 9d9513a

File tree

2 files changed

+163
-120
lines changed

2 files changed

+163
-120
lines changed

app/code/Magento/Catalog/Model/ProductRepository.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -527,9 +527,9 @@ public function save(ProductInterface $product, $saveOptions = false)
527527
$tierPrices = $product->getData('tier_price');
528528
$productDataToChange = $product->getData();
529529

530-
if (!$product->getSku() && !$product->getId()) {
531-
throw new \Magento\Framework\Exception\CouldNotSaveException(
532-
__('Invalid product data: %1', 'The SKU or ID of the product must be set before saving the product.')
530+
if (!$product->getSku()) {
531+
throw new CouldNotSaveException(
532+
__("The \"%1\" attribute value is empty. Set the attribute and try again.", "sku")
533533
);
534534
}
535535

0 commit comments

Comments
 (0)