File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed
app/code/Magento/CatalogImportExport/Model/Import Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -2409,17 +2409,9 @@ public function validateRow(array $rowData, $rowNum)
24092409 */
24102410 private function isNeedToValidateUrlKey ($ rowData )
24112411 {
2412- /**
2413- * If the product exists, assume it already has a URL Key and even
2414- * if a name is provided in the import data, it should not be used
2415- * to overwrite that existing URL Key the product already has.
2416- */
2417- $ isSkuExist = $ this ->isSkuExist ($ rowData [self ::COL_SKU ]);
2418- if ($ isSkuExist && !array_key_exists (self ::URL_KEY , $ rowData )) {
2419- return false ;
2420- }
2412+ $ urlKey = $ this ->getUrlKey ($ rowData );
24212413
2422- return (!empty ($ rowData [ self :: URL_KEY ]) || ! empty ( $ rowData [ self :: COL_NAME ] ))
2414+ return (!empty ($ urlKey ))
24232415 && (empty ($ rowData [self ::COL_VISIBILITY ])
24242416 || $ rowData [self ::COL_VISIBILITY ]
24252417 !== (string )Visibility::getOptionArray ()[Visibility::VISIBILITY_NOT_VISIBLE ]);
You can’t perform that action at this time.
0 commit comments