File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
app/code/Magento/CatalogImportExport/Model/Import Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -2733,14 +2733,12 @@ protected function getUrlKey($rowData)
27332733 }
27342734
27352735 /**
2736- * If the product already exists, do not overwrite its
2737- * URL Key with a value generated from the provided name.
2736+ * If the product exists, assume it already has a URL Key and even
2737+ * if a name is provided in the import data, it should not be used
2738+ * to overwrite that existing URL Key the product already has.
27382739 */
2739- if ($ this ->isSkuExist ($ rowData [self ::COL_SKU ])) {
2740- return '' ;
2741- }
2742-
2743- if (!empty ($ rowData [self ::COL_NAME ])) {
2740+ $ isSkuExist = $ this ->isSkuExist ($ rowData [self ::COL_SKU ]);
2741+ if (!$ isSkuExist && !empty ($ rowData [self ::COL_NAME ])) {
27442742 return $ this ->productUrl ->formatUrlKey ($ rowData [self ::COL_NAME ]);
27452743 }
27462744
You can’t perform that action at this time.
0 commit comments