Jump to content

[SOLVED]Importing products in subcategories with the same name using CSV import.


Recommended Posts

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.

post-525426-0-22597300-1368188885_thumb.jpg

post-525426-0-31638800-1368189097_thumb.jpg

Thank you
Dean

Edited by Dolke (see edit history)
Link to comment
Share on other sites

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 by laurix (see edit history)
  • Like 1
Link to comment
Share on other sites

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 by Dolke (see edit history)
  • Like 2
Link to comment
Share on other sites

  • 3 months later...

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

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?

  • Like 1
Link to comment
Share on other sites

  • 4 weeks later...

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

Hi guys,

 

Sorry I wasn't around for quite a while.

@Eunick 
Sorry for not replaying sooner. What version of PS do you use?

@fenmar
Hi. 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?

@RCP

Well 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

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!

  • Like 2
Link to comment
Share on other sites

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

  • 3 weeks later...
  • 2 months later...

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

  • 3 months later...
  • 2 months later...
  • 4 months later...
  • 6 months later...

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 by RochelleJones (see edit history)
Link to comment
Share on other sites

  • 3 months later...

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 by jecisa (see edit history)
Link to comment
Share on other sites

  • 2 months later...
  • 2 months later...
  • 6 months later...

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

  • Like 1
Link to comment
Share on other sites

  • 3 months later...

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

×
×
  • Create New...