Jump to content

Help needed with csv import of categories


webhosting-hotel

Recommended Posts

Hi there,

I am getting desperate.

I needed to do a clean install of Prestashop 1.6.1.12 since the database

on the old install got corrupted.

I have exported all categories into a csv file but I can't import it,

I get the following error:

107 errors

  1. The category ID cannot be the same as the Root category ID or the Home category ID.
  2. Golfvogne (ID: 14) cannot be saved
  3. etc.

I have tried everything but nothing works, probably I haven't tried the right way,

hope someone can help.

This is how my import settings looks like:

CSV1.jpg

 

And next page:

CSV2.jpg

kategoriera.csv.txt

Edited by webhosting-hotel (see edit history)
Link to comment
Share on other sites

Hello, 

 

If I understood you correctly, you are exporting categories from one store and use this file to import category tree to clean store. Respectively, there are no categories, but in the import file you have IDs for parent categories. In this way you are assigning subcategories to parent categories by their IDs, through no categories exist at new PrestaShop store and respectively no IDs can be used. Instead you need to specify parent category names in Parent Category columns of your file. 

 

post-783503-0-48380800-1490713712_thumb.png

Link to comment
Share on other sites

So if you have installed a new version of PS v1.6.1.12, then you already have some categories (ROOT, HOME etc...)

 

Did you delete these default categories from this new store?  If not, then you cannot import categories that use the same Category ID.  I would suggest removing those entries from your CSV file.

Link to comment
Share on other sites

I have exported all categories into a csv

 

First of all, if you have all categories in csv file:

- make database backup

- make database backup again, for sure ;-)

- mark "Delete all categories before import" set to Yes. You clear all categories tables.

- in next window put "2" in field "Line to skip", because categories with ID 1 and Id 2 are created by Prestashop automatically. If you will do it, You don't need edit csv file.

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

  • 1 year later...

I have a similar problem. The difference is that I need to import a .csv file that is exported by another software and it contains categories with IDs 1 and 2, which are already used by the 2 root categories. These IDs are also used in the products.csv so I can't skip those lines or give them another number because then I need to rename all products.category_id every time there's an export/import (every 24 hours).

So, can I delete the 2 root categories? Or can I give them another (negative?) ID?

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...