Unable to import products whatever I set for Categories column

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
3 years ago
I am trying to import quite a few products with different categories. I first tried to upload a small subset, then just one, but whatever I do, and whatever I put to Categories column in excel (or omit it completely), I always get
" Categories with the same name are not supported in the same category level. Check your category list in "Catalog -> Categories" page"

On Configuration >> Settings >> Catalog Settings I checked option "Export/Import products with category breadcrumb"
I tried clearing cache, restarting application, etc. but nothing helps.
Any idea of what I am doing wrong?
3 years ago
See if this helps
https://www.nopcommerce.com/en/boards/topic/55216/categories-with-the-same-name-are-not-supported-in-the-same-category-level
3 years ago
Thanks, but after some debugging of ImportProductsFromXlsx in ImportManager.cs I realized that the exception was ocurring because there were duplicate items in the dictionary, namely this part:

allCategories = allCategoryList
                    .ToDictionary(c => new CategoryKey(c, _categoryService, allCategoryList, _storeMappingService), c => c);

And because the database was "unclean" (apparently there were duplicated category names, but with different Ids, although on the frontend you could see just one), once I sorted that out that I managed to sucessfully import the product feed with named categories.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.