Skip to content

Commit 3265373

Browse files
author
Oleksii Korshenko
authored
MAGETWO-70195: Include attribute code in error message #10047
2 parents 03c279a + ccc0f6c commit 3265373

File tree

1 file changed

+4
-4
lines changed
  • app/code/Magento/ConfigurableImportExport/Model/Import/Product/Type

1 file changed

+4
-4
lines changed

app/code/Magento/ConfigurableImportExport/Model/Import/Product/Type/Configurable.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ class Configurable extends \Magento\CatalogImportExport\Model\Import\Product\Typ
4040
* @var array
4141
*/
4242
protected $_messageTemplates = [
43-
self::ERROR_ATTRIBUTE_CODE_IS_NOT_SUPER => 'Attribute with this code is not super',
44-
self::ERROR_INVALID_OPTION_VALUE => 'Invalid option value',
43+
self::ERROR_ATTRIBUTE_CODE_IS_NOT_SUPER => 'Attribute with code "%s" is not super',
44+
self::ERROR_INVALID_OPTION_VALUE => 'Invalid option value for attribute "%s"',
4545
self::ERROR_INVALID_WEBSITE => 'Invalid website code for super attribute',
4646
self::ERROR_DUPLICATED_VARIATIONS => 'SKU %s contains duplicated variations',
4747
];
@@ -291,12 +291,12 @@ protected function _isParticularAttributesValid(array $rowData, $rowNum)
291291

292292
if (!$this->_isAttributeSuper($superAttrCode)) {
293293
// check attribute superity
294-
$this->_entityModel->addRowError(self::ERROR_ATTRIBUTE_CODE_IS_NOT_SUPER, $rowNum);
294+
$this->_entityModel->addRowError(self::ERROR_ATTRIBUTE_CODE_IS_NOT_SUPER, $rowNum, $superAttrCode);
295295
return false;
296296
} elseif (isset($rowData['_super_attribute_option']) && strlen($rowData['_super_attribute_option'])) {
297297
$optionKey = strtolower($rowData['_super_attribute_option']);
298298
if (!isset($this->_superAttributes[$superAttrCode]['options'][$optionKey])) {
299-
$this->_entityModel->addRowError(self::ERROR_INVALID_OPTION_VALUE, $rowNum);
299+
$this->_entityModel->addRowError(self::ERROR_INVALID_OPTION_VALUE, $rowNum, $superAttrCode);
300300
return false;
301301
}
302302
}

0 commit comments

Comments
 (0)