Skip to content

Commit

Permalink
Merge branch 'issue-1602-Category-manufacturer-import-export-doesn't-…
Browse files Browse the repository at this point in the history
…work' into develop
  • Loading branch information
skoshelev committed Jul 25, 2016
2 parents 4891361 + f3a6018 commit 9cb1330
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Libraries/Nop.Services/ExportImport/ExportManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@ public virtual byte[] ExportManufacturersToXlsx(IEnumerable<Manufacturer> manufa
new PropertyByName<Manufacturer>("MetaKeywords", p => p.MetaKeywords),
new PropertyByName<Manufacturer>("MetaDescription", p => p.MetaDescription),
new PropertyByName<Manufacturer>("MetaTitle", p => p.MetaTitle),
new PropertyByName<Manufacturer>("SeName", p => p.GetSeName(0)),
new PropertyByName<Manufacturer>("Picture", p => GetPictures(p.PictureId)),
new PropertyByName<Manufacturer>("PageSize", p => p.PageSize),
new PropertyByName<Manufacturer>("AllowCustomersToSelectPageSize", p => p.AllowCustomersToSelectPageSize),
Expand Down Expand Up @@ -380,6 +381,7 @@ public virtual byte[] ExportCategoriesToXlsx(IEnumerable<Category> categories)
new PropertyByName<Category>("MetaKeywords", p => p.MetaKeywords),
new PropertyByName<Category>("MetaDescription", p => p.MetaDescription),
new PropertyByName<Category>("MetaTitle", p => p.MetaTitle),
new PropertyByName<Category>("SeName", p => p.GetSeName(0)),
new PropertyByName<Category>("ParentCategoryId", p => p.ParentCategoryId),
new PropertyByName<Category>("Picture", p => GetPictures(p.PictureId)),
new PropertyByName<Category>("PageSize", p => p.PageSize),
Expand Down
10 changes: 10 additions & 0 deletions src/Libraries/Nop.Services/ExportImport/ImportManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -883,6 +883,7 @@ public virtual void ImportManufacturersFromXlsx(Stream stream)
new PropertyByName<Manufacturer>("MetaKeywords"),
new PropertyByName<Manufacturer>("MetaDescription"),
new PropertyByName<Manufacturer>("MetaTitle"),
new PropertyByName<Manufacturer>("SeName"),
new PropertyByName<Manufacturer>("Picture"),
new PropertyByName<Manufacturer>("PageSize"),
new PropertyByName<Manufacturer>("AllowCustomersToSelectPageSize"),
Expand Down Expand Up @@ -948,6 +949,10 @@ public virtual void ImportManufacturersFromXlsx(Stream stream)
else
_manufacturerService.UpdateManufacturer(manufacturer);

//search engine name
var seName = manager.GetProperty("SeName").StringValue;
_urlRecordService.SaveSlug(manufacturer, manufacturer.ValidateSeName(seName, manufacturer.Name, true), 0);

iRow++;
}
}
Expand All @@ -968,6 +973,7 @@ public virtual void ImportCategoriesFromXlsx(Stream stream)
new PropertyByName<Category>("MetaKeywords"),
new PropertyByName<Category>("MetaDescription"),
new PropertyByName<Category>("MetaTitle"),
new PropertyByName<Category>("SeName"),
new PropertyByName<Category>("ParentCategoryId"),
new PropertyByName<Category>("Picture"),
new PropertyByName<Category>("PageSize"),
Expand Down Expand Up @@ -1039,6 +1045,10 @@ public virtual void ImportCategoriesFromXlsx(Stream stream)
else
_categoryService.UpdateCategory(category);

//search engine name
var seName = manager.GetProperty("SeName").StringValue;
_urlRecordService.SaveSlug(category, category.ValidateSeName(seName, category.Name, true), 0);

iRow++;
}
}
Expand Down

0 comments on commit 9cb1330

Please sign in to comment.