Jump to content

Product import in different languages


Recommended Posts

  • 4 months later...

Thanks, I got OpenOffice and use Calc to save in UTF8. now it works like a charm.

But another problem I encounter is that when I choose in the importation menu the file, and click for the language to be Russian, it changes the categories for the whole store, and I want it to change only when users are using that language.

Any help would be great.

Link to comment
Share on other sites

well, in the category name I did name them
01.name1
02.name2
03.name3
and so on, in order to keep them in the order i want them to be.
I did the same thing for the Russian language. Basically I have two files; one for the English csv and the other for the Russian csv. After I already imported the English categories csv file, I want to import the Russian file - but it overwrites the English.

How can I make it not overwrite the other language? Can you please explain step by step? ( I am newbie, sorry, and thanks for the help).

Link to comment
Share on other sites

I see what you mean now. There is only one easy solution - you have to import in one language and then manually change the other language. The other option is to import via phpmyadmin directly to your database but as you beint newbie I am not goint to explain the latter now. I do it via phpmyadmin for products myself.

Link to comment
Share on other sites

Thanks.
It should be considerably easy, as I already have an existing csv file ready, I will just merge them.

But is that the easiest way to do so? Why in the Importation part there is a question about the language of the file? I thought that was for importing exactly to the other language??? Or wasn't it?

Link to comment
Share on other sites

Oh, thanks to your question I just discovered that there is indeed such a field as language in PS1.3.1 import but I am on1.2.5 myself so can'thelp you there. Is it a bug - that it has import in different lang but that's not working properly?

Link to comment
Share on other sites

one of the two. Or I am doing something wrong (but what?), or its a bug...

If I am doing something wrong, what is it? i am using all the same variables for the ID, active, parent directory, url rewritwe, img url... did not export to russian language.

I tried to change the ID numbers - it did not work...

Any ideas?

Link to comment
Share on other sites

as for the 1.3 language option in the importation it might be due to what rocky said in this post: "I believe the language option is to choose the encoding of the CSV file, not which language the CSV will be imported into."

and as you have posted here about Import CSV in different languages also helps.

Thanks.

still will be looking into this bug issue

Link to comment
Share on other sites

anyways, I got it working through the method you told me - phpmyadmin. It works like a charm.
I went to PS_category_lang in my database, and exported it. Then I modified the file.
Before importing it back I had to 'empty' PS_category_lang, (it gave me ""#1062 - Duplicate entry '1-1' for key 1"" error)
Finally I imported the modified file and it works smoothly. (made backup too) :-)

Thanks for the help.

Link to comment
Share on other sites

  • 2 weeks later...

I personally did not had this error. But I found this post. There the guy claims that the error was his.

I figured out what was going on - It had already assigned a bunch of blank keys from a previous failed attempt at the upload, and it was importing all the new data starting at row two-hundred and somthing- Which is why all the blank keys were showing up.

I had to empty the entire table, and run the import again.

The key to getting the import to work was to [1] have a 'key' field in the CSV file that contained no data, and also to add a comma to the end of every line that didn't have a value for the correction field.

It now seems to have uploaded corectly, and I can query it and have it spit out all the contents as expected.


I recommend you to:
1. Backup that database.
2. Empty it.
3. Upload your new csv file to the clean database.

Let me know if it helps...
Link to comment
Share on other sites

Just wondering this one: have you actually downloaded the original "PS_category_lang" database and tried to modify it?

Access MyPhpAdmin, browse the database, and export it as CSV for MS Excel. It opens it for me in the browser and then i Copied it to note. changed the file extension to csv and it worked just fine. I edited it in openOffice saved it as csv and kept the coding to utf-8. then uploaded it.

Link to comment
Share on other sites

I am not sure how to help you. But try to download Xampp and installing local host server with mysql. Use heidisql to connect to your local host database and see if you can import you csv file through heidisql to the database.

Maybe importing it locally to the database and then exporting it as sql databse and importing it again your live database...

Or maybe I am just confusing myself. Anyhow I hope that if you do try it that it will work for you. Good luck...

Link to comment
Share on other sites

  • 2 weeks later...
  • 3 months later...
kingsinnersoul thank you for opening my eyes.
HeidiSQl is GREAT!
it work the first time right out of the box!
just great. I finally got my ps_product_lang table update and can move on with the eshop construction.
Thank you very much for the tip.


Hi I am searching the forum for help on importing csv files I can export them edit them but they will just not import I have tried heitSQL compressing + not compressed changed the fields emptied the ps_product_lang table and left it full but I keep getting the same message Invalid field count in CSV input on line 1. can anyone give some more help
Link to comment
Share on other sites

When uploading to prestashop are you ignoring the first line? if you upload directly to phpmyadmin - are you emitting the first header line?

have you tried this:
1. Backup ps_product and ps_product_lang.
2. empty the above tables.

Edit your csv file and make sure that:
1. your cvs file's column names matchs your table column names
2. saved it as utf-8

when uploading it to phpmyadmin:
1. Navigate to the empty ps_product_lang table
2. Import > Choose File > browse and locate your csv file > Open
3. make sure the Character set of the file is set to utf-8
4. in the: Number of records(queries) to skip from start > enter 1 to ignore the header line
5. Make sure the you check the Replace tabel data with file - afetr selecting CSV using load data
6. in Fields terminated by box type ,
7. in Fields enclosed by box "
8. in Fields escaped by box \
9. in Lines terminated by box auto

I hope it will help.
if not we will see what else we can try.

Link to comment
Share on other sites

Hi kingsinnersoul

i have tried that about 50 times in different ways and I am still doing some thing wrong because nothing is being added to the products-lang.
what else can I be doing wrong. i have tried just importing a csv with 2 items nothing seems to work for me

Link to comment
Share on other sites

When uploading to prestashop are you ignoring the first line? if you upload directly to phpmyadmin - are you emitting the first header line?

have you tried this:
1. Backup ps_product and ps_product_lang.
2. empty the above tables.

Edit your csv file and make sure that:
1. your cvs file's column names matchs your table column names
2. saved it as utf-8

when uploading it to phpmyadmin:
1. Navigate to the empty ps_product_lang table
2. Import > Choose File > browse and locate your csv file > Open
3. make sure the Character set of the file is set to utf-8
4. in the: Number of records(queries) to skip from start > enter 1 to ignore the header line
5. Make sure the you check the Replace tabel data with file - afetr selecting CSV using load data
6. in Fields terminated by box type ,
7. in Fields enclosed by box "
8. in Fields escaped by box \
9. in Lines terminated by box auto

I hope it will help.
if not we will see what else we can try.


Hi, yes I have tried this and have everything exactly the same only problem is "edit the csv 2. save as utf-8" I do not have an option to save as utf-8 in my excel program. I save as csv (comma delimited ) file, could this be the problem.
I still get the message invalid field count in CSV input on line 1.
I have even tried
1. exporting the prestashop original ps_product_lang DB as csv excel not editing it
2. emptying the ps_product_lang
3. importing the csv file with all the above 9 queries checked
still the same Invalid field count in CSV input on line 1.
I must have something wrong, please help. I have now tried changing all the comas in the text to stops, this aloud 10 rows to upload then stopped. I have only edited the last 500 rows so the first are the same as when they were exported. I have attached the excel file so if there is someone out there who could spend a few minuets to look at it and let me know where it is going wrong I will be a very happy lad
I have found the problem. Some of my first products have descriptions written with HTML and there are loads of " in the script. So I have changed the " for ' and it all loaded, but the descriptions that had HTML have lost their content.
Can and how do I substitute the " in Fields enclosed by for another symbol and which can I use?

ps_product_lang-stops.zip

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