Jump to content

Import attributes in multiple languages using CSV


vmn

Recommended Posts

Hi,

I'm investigating conversion from an OSCMax web shop to Prestashop 1.6.0.9.

 

I've managed to import both categories and products via CSV files built using SQL queries in two languages.

 

Importing attributes/product combinations is still my problem. I cannot figure out how to support two languages (English and Finnish) in attribues.

 

I've built to files:

english.attributes.csv

sample:

"product id"|"attribute"|"value"
"6"|"color:select:0"|"blue and brown panther/silve:0"
"6"|"color:select:0"|"red/red:0"
"6"|"color:select:0"|"blue/gold:0"
"6"|"color:select:0"|"orange/silver:0"
"6"|"color:select:0"|"green/gold:0"
"6"|"color:select:0"|"blue/blue:0"
"6"|"color:select:0"|"black/gold:0"
"6"|"color:select:0"|"dark red/gold:0"
"6"|"color:select:0"|"black/silver:0"
 

 

finnish.attributes.csv

sample:

"product id"|"attribute"|"value"
"6"|"color:select:0"|"sininen/hopea:0"
"6"|"color:select:0"|"harmaa/hopea:0"
"6"|"color:select:0"|"harmaa/kulta:0"
"6"|"color:select:0"|"violetti/violetti:0"
"6"|"color:select:0"|"turkoosinsin./hopea:0"
"6"|"color:select:0"|"turkoosinsin./kulta:0"
"6"|"color:select:0"|"musta/musta:0"
"6"|"color:select:0"|"punainen/hopea:0"
"6"|"color:select:0"|"valkoinen/hopea:0"
 

When I import the first file using English language and the second one using Finnish language, the attributes are duplicated. How can I match the translation of each English language attribute with a Finnish one? Should I use the reference colunn?

 

Thanks,

Veli-Matti

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

Hi again,

I ended up do about the same as someone else in the forum:

 

1. upload attributes/combinations in English. The import function adds the attribute values with both English and Finnish language id, i.e. with the same value.

2. Export the table attribute_lang from the db.

3. Translate the Finnish values of which most can be translated quickly with search and replace.

4. Import the table back to the db.

 

BR,

Veli-Matti

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

×
×
  • Create New...