File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed
app/code/Magento/CatalogImportExport/Model/Import/Product Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -115,22 +115,14 @@ protected function createCategory($name, $parentId)
115
115
if (!($ parentCategory = $ this ->getCategoryById ($ parentId ))) {
116
116
$ parentCategory = $ this ->categoryFactory ->create ()->load ($ parentId );
117
117
}
118
-
119
- // Set StoreId to 0 to generate URL Keys global and prevent generating url rewrites just for default website
120
- $ category ->setStoreId (0 );
121
118
$ category ->setPath ($ parentCategory ->getPath ());
122
119
$ category ->setParentId ($ parentId );
123
120
$ category ->setName ($ this ->unquoteDelimiter ($ name ));
124
121
$ category ->setIsActive (true );
125
122
$ category ->setIncludeInMenu (true );
126
123
$ category ->setAttributeSetId ($ category ->getDefaultAttributeSetId ());
127
- try {
128
- $ category ->save ();
129
- $ this ->categoriesCache [$ category ->getId ()] = $ category ;
130
- } catch (\Exception $ e ) {
131
- $ this ->addFailedCategory ($ category , $ e );
132
- }
133
-
124
+ $ category ->save ();
125
+ $ this ->categoriesCache [$ category ->getId ()] = $ category ;
134
126
return $ category ->getId ();
135
127
}
136
128
You can’t perform that action at this time.
0 commit comments