4

Thanks for your help, It's been hours now that I'm trying to upload a csv of products on Magento, everything goes alright, but products are not linked to the category I specify on "category_ids"

This is a sample of data I try to import :

"category_ids","name","url_key","sku","price","special_price","meta_description","meta_keywords","meta_title","weight","quantity","short_description","description","_type","_attribute_set","status","visibility","tax_class_id","manage_stock","use_config_manage_stock","_product_websites","_store"

"895655","High & Low Beam 2014","mp-2014","48465","279,99","139,99","Your search ime Warranty.","s, Yamaps,","Led Kit.com","2","1000","The new and improved technology!","long description","simple","Default","1","4","0","1","1","base","1"

By the way the category ID 895655 exists, and the sample above is copied as it is from the CSV file with notpad++.

Thanks for you advices.

2
  • Your category ID is 895655? In other words, you have 895K+ categories? Jan 27, 2015 at 1:21
  • Yes @PhilB the category ID 895655 exists.
    – WebHunter
    Jan 27, 2015 at 9:02

4 Answers 4

7

ImportExport doesn't support assigning categories by category IDs. You have to use the name of the category and its root category as follows:

_root,_category,...
Default Category,Electronics/Cameras/Digital Cameras,...

You can find more details about the import format (including categories) at http://www.integer-net.com/2012/04/04/importing-products-with-the-import-export-interface/.

The category_ids column isn't specified anymore and will simply be ignored if you don't have a custom attribute with that code.

3

Please check if you are using excel to update CSV, If so, excel might be formatting your category ids in number format and add "comma" like '895655' might be converted to 8,95,655. this is common problem when you are using excel, you might have to select that column and format it as text...

3
  • I cheked that and it's exactly how I print it in my question, I am a developper, and I open the CSV with notpad++ and don't see something wrong with the ID.
    – WebHunter
    Jan 27, 2015 at 9:04
  • Ok...did you try any other category id ? if it is only problem with this category or all ? Jan 27, 2015 at 9:07
  • I tried a csv with 10 records not only the one in the sample
    – WebHunter
    Jan 27, 2015 at 22:09
1

You can use the Magento 2 extension below to import products with the category ID, instead of using the category path.

https://github.com/EnochDataSystems/ProductImportCategoryId

0

You cannot use category id while importing. you have to use name of your particular category with it's parent and root categories.

assume that your category structure is like this:

Default Category -> Test1 ->Test2

if you want to assign a product to category Test2 then try as below:

Default Category,Default Category/Test1/Test2

Hope it will work for you

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.