Dolke Posted May 10, 2013 Share Posted May 10, 2013 (edited) Hi to all,I have made some categories for my web shop and imported them using CSV import feature.Now I'm going to add some products in those categories.I have one problem.There are 2 or more categories that has the same name, and it is just their parent category that puts them apart.In the product CSV file that I want to import I have filed that says: category.When I enter the name of that category my product is imported into one category and not in the other. How can I tell which category I want to import to?Please check printscreens that I made.Thank youDean Edited September 18, 2013 by Dolke (see edit history) Link to comment Share on other sites More sharing options...
Dolke Posted May 13, 2013 Author Share Posted May 13, 2013 Anybody? 2 Link to comment Share on other sites More sharing options...
laurix Posted May 13, 2013 Share Posted May 13, 2013 (edited) Hi Dolke! Since I don't see like thousand categories, why don't you try with the categories' ID instead of its name? I mean: Product ID;product name;desc.;subcategory1 ID,subcategory2 ID;whatever; I had the same problem and also some names were long and included comas "," so we solved it this way Edited May 13, 2013 by laurix (see edit history) 1 Link to comment Share on other sites More sharing options...
Dolke Posted May 21, 2013 Author Share Posted May 21, 2013 (edited) Hi Laurix, ty for the suggestion. It is a solution but it lacks some automatism, because we import product by their category names more easily then using IDs (we are using product list from our business software) but as there is no other solution to this problem we decided to go with the category IDs. One correction. You don't need to put category ID and then subcategory ID. You just put ID where your product belongs as IDs are unique identifiers. So if your category structure is something like: --65 FirstCategory ---------- 23 Subcategory ----------12 Subcategory ------------------92 SubSubcategory ----------37 Subcategory --43 Second Category ----------55 Subcategory and you want to put product into SubSubcategory, you just add 92 in the proper field. You don't need to write: 65, 12, 92 Correct me if I'm wrong. Ty, Dean Edited May 21, 2013 by Dolke (see edit history) 2 Link to comment Share on other sites More sharing options...
RCP90 Posted May 23, 2013 Share Posted May 23, 2013 (edited) Thanks for this! Didn't find this post when i looked though forum, just found though Google though! Exactly the answer I needed, thank you! It works! Edited May 23, 2013 by RCP90 (see edit history) Link to comment Share on other sites More sharing options...
Eunick Posted August 24, 2013 Share Posted August 24, 2013 Hi, I was looking at this solution. However, I cannot find a field in Prestashop product's csv import field that correspond with category ID. Where is the category ID? Thanks! Link to comment Share on other sites More sharing options...
Dolke Posted August 24, 2013 Author Share Posted August 24, 2013 Its where ever you put it in the import CSV file. You can just add one additional column where you will write category IDs. Then, during the import you will get the page where you can select what column in your CSV file represent category ID, prize, quantity, product name and all other fields you need. After you do this, you should be able to import your products properly. I hope this helps. Dean Link to comment Share on other sites More sharing options...
Eunick Posted August 24, 2013 Share Posted August 24, 2013 Understand. But I have a problem. I could not find '"Category ID'' in Prestashop's available field to link with. Could it be the new version 1.5.3.1 does not have this field? Can I insert available filed at Prestashop side? 1 Link to comment Share on other sites More sharing options...
fenmar Posted September 18, 2013 Share Posted September 18, 2013 It is NOT Solved!!! New prestashop doesn't have Category ID column in importing option. All I can see is just "ID", "ID of tax..", "ID shop name" ! Where is Category ID? What should I do now? How to fix it? what to write etc? Which prestashop do have category ID in importing? Should I install presta 1.5.0 after that upgrade? Link to comment Share on other sites More sharing options...
RCP90 Posted September 18, 2013 Share Posted September 18, 2013 In the product category column on your CSV you use the category IDs seperated by commas. Link to comment Share on other sites More sharing options...
Dolke Posted September 18, 2013 Author Share Posted September 18, 2013 Hi guys, Sorry I wasn't around for quite a while.@Eunick Sorry for not replaying sooner. What version of PS do you use?@fenmarHi. Nobody said it is SOLVED. Keep it calm and somebody will assist you. I know how something problems be frustrating but frustration wont fix them... OK, I need to know what version of the PS do you use also?@RCPWell that's what I explained in the post above but it seems they have some issues. Maybe they are using 1.5.5 PS, don't know. Link to comment Share on other sites More sharing options...
RCP90 Posted September 18, 2013 Share Posted September 18, 2013 Using the IDs separated by commas works in 1.5.4.1 and 1.5.5.0 perfectly for me. Link to comment Share on other sites More sharing options...
fenmar Posted September 18, 2013 Share Posted September 18, 2013 Thats right... I will tell everybodie in simpliest way so anybody could understand... 1. First you should create categories and after that 2. you should put number of category instead of your old category1,category2,category3. So it should look like "7" or "15" under this poll "category (x,y,z)" Exactly in this column. Exactly over there you should put just number or numbers if you have got the same product in many categories. Presta will put your thing in right place. Thank youo for help! 2 Link to comment Share on other sites More sharing options...
Dolke Posted September 18, 2013 Author Share Posted September 18, 2013 exactly Link to comment Share on other sites More sharing options...
i10anniavanti Posted September 26, 2013 Share Posted September 26, 2013 Thats right... I will tell everybodie in simpliest way so anybody could understand... 1. First you should create categories and after that 2. you should put number of category instead of your old category1,category2,category3. So it should look like "7" or "15" under this poll "category (x,y,z)" Exactly in this column. Exactly over there you should put just number or numbers if you have got the same product in many categories. Presta will put your thing in right place. Thank youo for help! Can you publish your example?! Link to comment Share on other sites More sharing options...
MrMuffin'sTrains Posted October 15, 2013 Share Posted October 15, 2013 Should the category number be in the CSV in quotes or without quotes?..... Thanks Link to comment Share on other sites More sharing options...
Dolke Posted October 15, 2013 Author Share Posted October 15, 2013 Should the category number be in the CSV in quotes or without quotes?..... Thanks HI, Without quotes. Can you publish your example?! I will publish you with example later on today. Cheers Dean Link to comment Share on other sites More sharing options...
hetspoor Posted January 8, 2014 Share Posted January 8, 2014 Hi, but what if we have subcategories with the same name ? We have a name : Lego and then subcategories like 1 - 99 ; 100 - 199 ; 200-299 .... Also for other categories we have subcategories with the same 1-99 : 100 - 199 ... How can we import these ???? Thanks Henri Link to comment Share on other sites More sharing options...
Dolke Posted January 8, 2014 Author Share Posted January 8, 2014 By using IDs.Each category or a subcategory has a different ID no matter if the name is the same.So instead using names (labels) you should use IDs. Link to comment Share on other sites More sharing options...
hetspoor Posted January 8, 2014 Share Posted January 8, 2014 Hello, look her,this is a copy of the subcategories... The 11 is the ID , the 1---- is the name of the categorie. 11 1---- 2 Maybe was this helpfull ? Link to comment Share on other sites More sharing options...
Dolke Posted January 8, 2014 Author Share Posted January 8, 2014 It doesn't matter what the name of the subcategory is. Every category/subcategory has its own unique ID. Just use the ID which is for that category 11. 1 Link to comment Share on other sites More sharing options...
George.Gall Posted April 25, 2014 Share Posted April 25, 2014 Ok , but what if we want to stick with category names ? What is the right syntax ? Something like HOME > Subcat1 or |HOME||Subcat1| ? Link to comment Share on other sites More sharing options...
RCP90 Posted April 26, 2014 Share Posted April 26, 2014 Just use the category ID, much easier. Link to comment Share on other sites More sharing options...
prerana Posted July 21, 2014 Share Posted July 21, 2014 @RCP90, Can you please attach a screenshot or an example of how to use the category id? Link to comment Share on other sites More sharing options...
arkantos_a Posted December 13, 2014 Share Posted December 13, 2014 With prestashop_1.5.6.2, you can't put category ID, only category Name [PrestaShopException]Parent category does not existat line 385 in file classes/Category.php Link to comment Share on other sites More sharing options...
RochelleJones Posted June 17, 2015 Share Posted June 17, 2015 (edited) Solved! Importing Products to Categories and Sub-Categories thru CSV Import Hello everyone, this has been trial and era but I have finally figured it out and it is working great. I have listed below how your csv file should be formatted on your csv file. Your HEADER LINE (ID,Name. etc.) should be formatted exactly the way it is shown below in order for it to work. All Categories and Sub-Categories should be on the same line. Home here is the root category so it has to be in the last position. If your root category is not home just put the name of it in last position. Also, the example below would be in 3 excel spaces not one. Good luck with your imports and with your store. ID Name *;Parent category;Root category(0/1); 25 iPhone iPhone;Phones;Home Edited June 18, 2015 by RochelleJones (see edit history) Link to comment Share on other sites More sharing options...
jecisa Posted October 17, 2015 Share Posted October 17, 2015 (edited) i have a problem this is my categories_import.csv content, Name * Parent category Accessories Womens Sunglasses Accessories Sunglasses Mens this is my products_import.csv content Name * Categories (x,y,z...) Gucci Youngster GG-Temple Sunglasses, Havana Womens,Accessories,Sunglasses Gucci Round Sunglasses, Havana Mens,Sunglasses i found my products (Gucci Youngster GG-Temple Sunglasses, Havana) is classified to Mens directories,it should be classified to women catalog? how to solve it? Edited October 17, 2015 by jecisa (see edit history) Link to comment Share on other sites More sharing options...
AbdullahBasit Posted January 5, 2016 Share Posted January 5, 2016 Can we use Category IDs insteadof name in Prestashop 1.6.1.2 ? Link to comment Share on other sites More sharing options...
dfwproducts Posted April 1, 2016 Share Posted April 1, 2016 I am wondering why we have to use category id instead of just simply using category names. The use of ID's simply makes a simple process complicated. Link to comment Share on other sites More sharing options...
careware Posted October 15, 2016 Share Posted October 15, 2016 Thats right... I will tell everybodie in simpliest way so anybody could understand... 1. First you should create categories and after that 2. you should put number of category instead of your old category1,category2,category3. So it should look like "7" or "15" under this poll "category (x,y,z)" Exactly in this column. Exactly over there you should put just number or numbers if you have got the same product in many categories. Presta will put your thing in right place. Thank youo for help! This solution worked for me with v1.6 Thanks a lot I have tried following solution for v1.6 Just mention the category "number" under Categories (x,y,z...) Example: Instead of "Sony" mention its category number "45" where 45 is the number associated with Sony category and can be checked from Category menu in backend 1 Link to comment Share on other sites More sharing options...
Ronaldo Perez Posted January 24, 2017 Share Posted January 24, 2017 If somebody still interested in the solution without replacing Category name on ID, you can use hierarchy for the same name subcategories and your value should looks like Category/SubCategory/SubSubCategory etc. The reason you can find in Category::searchByPath method with line $categories = explode('/', trim($path)); Link to comment Share on other sites More sharing options...
Recommended Posts