Skip to content

Commit a10f074

Browse files
[Backport] Fix SKU limit in import new products
1 parent e59dee0 commit a10f074

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -159,11 +159,6 @@ class Product extends \Magento\ImportExport\Model\Import\Entity\AbstractEntity
159159
*/
160160
const URL_KEY = 'url_key';
161161

162-
/**
163-
* SKU max length
164-
*/
165-
const DB_MAX_SKU_LENGTH = 65;
166-
167162
/**
168163
* Attribute cache
169164
*

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
use Magento\CatalogImportExport\Model\Import\Product;
99
use Magento\Framework\Validator\AbstractValidator;
10+
use Magento\Catalog\Model\Product\Attribute\Backend\Sku;
1011

1112
/**
1213
* Class Validator
@@ -70,7 +71,7 @@ protected function textValidation($attrCode, $type)
7071
if ($type == 'text') {
7172
$valid = $this->string->strlen($val) < Product::DB_MAX_TEXT_LENGTH;
7273
} else if ($attrCode == Product::COL_SKU) {
73-
$valid = $this->string->strlen($val) < Product::DB_MAX_SKU_LENGTH;
74+
$valid = $this->string->strlen($val) < SKU::SKU_MAX_LENGTH;
7475
} else {
7576
$valid = $this->string->strlen($val) < Product::DB_MAX_VARCHAR_LENGTH;
7677
}

0 commit comments

Comments
 (0)