Jump to content

Yet another CSV import issue post


Recommended Posts

Hi, I'm trying to import a CSV file of categories for my site, but when uploading I get these errors (screenshot also attached): 

 

  • The category ID cannot be the same as the Root category ID or Home category ID.
  • blah blah blah (ID: 3) cannot be saved

The "blah blah blah" is my category name and I get this error for every single category, except for 'ID:1 - Root' and 'ID:2 - Shop'.

 

I have done everything I can find out correctly, and I am also only using the 11 column titles that the import page seems to allow: id, active, name,parent category,root,description,meta title, meta keywords, meta description, seo friendly-url,path to img.  I have also tried saving it as UTF-8.

 

If I download my current category list, and reupload that, it doesnt work either because that also has lots of other couln titles which arent allowed!

 

These are the first few lines of my CSV file:

 

id_category;active;name;id_parent;is_root_category;description;meta_title;meta_keywords;meta_description;link_rewrite;image link 1;1;Root;0;0;;;;;; 2;1;Shop;1;1;;;;;; 3;1;Clothing & Accessories;2;0;;;;;; 4;1;Chassis ;2;0;;;;;; 5;1;Handlebar & Foot Controls;2;0;;;;;; 6;1;Electrical ;2;0;;;;;; 7;1;Engines ;2;0;;;;;;

 

My category ID's are all unique, so I don;t know why I get that first error, and the Root and Shop categories which dont seem to get any errors, dont have any different values.

 

Can anybody point me to an actual userguide from Prestashop that works? Thank you.

post-1176840-0-50168100-1463245061_thumb.png

Link to comment
Share on other sites

Try the import without the id column. I think PS will assign it's own id's.

Can't do that, because I need to refer to it's parent category by ID, so if I rely on PS doing it itself, I won't know the parent category ID until after I've uploaded it. I have 3 layers of categories.

Link to comment
Share on other sites

  • 2 weeks later...

yeh I understand trial and error, but I thought the whole point of the forum is to save everyone from having to try whats been tried before. Surely somebody has done this before and explain how it is done?

Link to comment
Share on other sites

  • 3 weeks later...
  • 3 weeks later...

I have the same issue. I give child categories the id of their parent, but get an error

 

"Property Category->is_root_category is not valid"

 

during import. I have been designing databases for years and never have an issue when I create my tables. This is just werid!

Link to comment
Share on other sites

  • 3 weeks later...

I have been loosing 2 full days of work trying to import CSV file to categories, customers, products and so on... Nothing is importing. I am receiving plenty of error messages.

 

I have tried averything, with the Column titles and without. With UTF8 or ISO 1, with Mac encoding or Windows. Nothing worked.

 

I have imported my files directly into the appropriate PHP database and it works. It is just to proof that the file is ok for the database.

 

The imports in the PS interface should generate records in other Tables. That's why I don't recommend to import right in the DataBase.

 

I have downloaded the sample csv files of each topics and tried to import them right away without opening it in order to avoid any modification. I didn't work aswell.

 

I simply think that the import tool of PrestaShop is not working.

Link to comment
Share on other sites

The supplied PS .csv files need to be altered. Open them in notepad and add a single quote before ID

 

'ID

 

and save the file. It will them open in Excel. Some of their supplied files do open without having to do this, maybe because the first field is not labeled ID.

 

It took me a while to get them all to work, but now I have a template to create my .xls master files.

 

I also have these notes, which may help. Since Combinations contain commas within a single field, the entire file cannot be comma separated. I did a replacement using Notepad again. Some of their supplied files were also ; delimited, so I had to do a replacement there as well.

 

BETTER:
open file in notepade
replace , with -
replace ; with ,
save file. done



FOR COMBINATIONS:
Replace all , with `
This will be the Multiple value separator (fields are still delimited with a comma)

 

I hope this is helpful. It's been a few weeks since I played around with modifying their supplied files but I am able to use everything.

 

LMK how you do.

Link to comment
Share on other sites

  • 3 years later...
  • 6 months later...

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