Jump to content

Mutliple categories and subcategories CSV import


romper

Recommended Posts

Hello,

 

I import products through CSV import and it works great. However I can not import multiple categories and its subcategories. I have following tree of categories and subcategories that one of my product belongs to.

 

  • Backpacks (main category)
    •          Bicycle backpacks(subcategory)

  • Backpacks (main category)
    •          Bags(subcategory)

  • Travel (main category)
    •          Bags (subcategory)

 

In my .CSV file I refer to this category tree in this way:

 

Categories (x,y,z...)

Backpack, Bicycle backpacks, Backpacks, Bags, Travel, Bags.

 

CSV importer links some but not all categories and subcategories with a product. How to solve it. How can I match all categories and subcategories with a product.

 

Thank you,

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

I solved my issue. If you want to transform your category and subcategory tree into csv import format , you should use slash / to specify dependencies between your category and subcategories. If you have more than one category, you should separate them by comma.

 

So my csv import category table looks like this:

 

Backpacks/Bicycle backpacks, Backpack/Bags, Travel/Bags

Edited by romper (see edit history)
  • Like 1
Link to comment
Share on other sites

  • 8 months later...

I've been struggling with this for over a month.

My Categories csv loads perfectly but when I import Products, additional categories are created. The / method leaves me with a a tree with sub categories within Parent categories and vice versa. Prestashop support are useless, Teapot never get back to me, I have spent nearly £1000 on 'Experts' who just seem interested in taking money.

 

Are there any Experts on here that can give me real advice on how to correctly format these sheets?

 

 

Link to comment
Share on other sites

  • 1 year later...
  • 3 months later...

I managed to sort out the issues. Its a easy work around...

Basically you need to do a level by level import...

1. In the import CSV file, first import your main Categories under the Name coloum and under Parent you add "HOME", this essentially adds your main categories under HOME as the parent...

2. Import the CSV again, this time replace the HOME with the name of the categories in file 1 in the parent coloum. Please see example below

My Categories are Printers > HP Printer

IMPORT FILE 1

Name = Printers | Parent = HOME

IMPORT FILE 2- Do not delete old categories, remove the tick this will update the current categories

Name = HP Printer | Parent = Printers

Regards

 

 

  • Like 1
Link to comment
Share on other sites

  • 1 year later...
On 1/11/2020 at 2:39 PM, christokieser said:

I managed to sort out the issues. Its a easy work around...

Basically you need to do a level by level import...

1. In the import CSV file, first import your main Categories under the Name coloum and under Parent you add "HOME", this essentially adds your main categories under HOME as the parent...

2. Import the CSV again, this time replace the HOME with the name of the categories in file 1 in the parent coloum. Please see example below

My Categories are Printers > HP Printer

IMPORT FILE 1

Name = Printers | Parent = HOME

IMPORT FILE 2- Do not delete old categories, remove the tick this will update the current categories

Name = HP Printer | Parent = Printers

Regards

 

 

I Know this is an old thread but I've come across it a few times so far so hope this helps someone!

Category Import is a right pain in PS.

It uses a parent category to build the tree, but if the parent doesn't exist, it doesn't create it. Therefore you need to organise your import CSV (excel sheet easiest) by tree level.

I have added a new column in my import sheet and ignore this, but I order by A>Z in this column and it keeps the import in the correct order for PS. (highlighted in green)

Note the Cat ID is all over the place, this is because the categories were initially added manually as we built the store. You need to "manually" work out (could prob do a formula) what the category level is, but PS imports line by line, so it will create HOME, then Accessories and so on. In the end, you'll then end up with an organised tree.

As for product import, I am not sure (as so far we have stayed away from categories with the same name under different parents) but as far as I am aware, you can do one of two things: 

1. In Categories (x,y,z...) you can put Parent/Category - so lets say in our case we want Accessories under home, and Accessories under Scenics. We could put Home/Accessories, Scenics/Accessories. I would need to do some testing to see if you need the full tree - ie. Home/Accessories, Home/Scenics/Accessories.

2. We can use ID. I have again not tested this yet as not had the need, but if we can use the ID, its fairly straightforward to setup a formula to pick the IDs. Currently for us, we use 5 category columns in our product import sheet. These are data validated against our Category sheet (in screenshot) to ensure they are valid. They are then Concatenated if they are not empty cells. So it would be very easy to just take the Category ID instead.

I am happy to share the formulas etc we use for this if anyone wants. I've tried to make it as simple as possible for the end user who is actually populating the product imports when new items are announced.

1823584043_Screenshot2021-07-07at08_51_17.thumb.png.ec34c6ec20288580e0b6d8ec82117d0c.png

Link to comment
Share on other sites

  • 3 months later...
On 7/7/2021 at 9:06 AM, madpugger said:

I Know this is an old thread but I've come across it a few times so far so hope this helps someone!

Category Import is a right pain in PS.

It uses a parent category to build the tree, but if the parent doesn't exist, it doesn't create it. Therefore you need to organise your import CSV (excel sheet easiest) by tree level.

I have added a new column in my import sheet and ignore this, but I order by A>Z in this column and it keeps the import in the correct order for PS. (highlighted in green)

Note the Cat ID is all over the place, this is because the categories were initially added manually as we built the store. You need to "manually" work out (could prob do a formula) what the category level is, but PS imports line by line, so it will create HOME, then Accessories and so on. In the end, you'll then end up with an organised tree.

As for product import, I am not sure (as so far we have stayed away from categories with the same name under different parents) but as far as I am aware, you can do one of two things: 

1. In Categories (x,y,z...) you can put Parent/Category - so lets say in our case we want Accessories under home, and Accessories under Scenics. We could put Home/Accessories, Scenics/Accessories. I would need to do some testing to see if you need the full tree - ie. Home/Accessories, Home/Scenics/Accessories.

2. We can use ID. I have again not tested this yet as not had the need, but if we can use the ID, its fairly straightforward to setup a formula to pick the IDs. Currently for us, we use 5 category columns in our product import sheet. These are data validated against our Category sheet (in screenshot) to ensure they are valid. They are then Concatenated if they are not empty cells. So it would be very easy to just take the Category ID instead.

I am happy to share the formulas etc we use for this if anyone wants. I've tried to make it as simple as possible for the end user who is actually populating the product imports when new items are announced.

1823584043_Screenshot2021-07-07at08_51_17.thumb.png.ec34c6ec20288580e0b6d8ec82117d0c.png

i would like this if you still using prestashop

Edited by cookie84
forgot to add text (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...