9 min read
Migrate your products from PrestaShop to WooCommerce through Excel
By Quentin Delepierre, Salesforce Commerce Cloud consultant
You are leaving PrestaShop for WooCommerce and you don't want to retype your product pages. WooCommerce's importer reads a CSV file: the whole job is to get, from the PrestaShop export, a table whose columns carry the names it expects. Here is the full path, what ExcelifyXML does in it (the XML-to-spreadsheet part) and what it does not do.
Got your own XML? Drop it in and see it as a table, free and with no account. For an Excel file you can edit and then rebuild into an XML that keeps its structure, a free account is all you need.
Simple Excel table, free with no account, for files up to 1 MB. File that rebuilds into XML: free account, 3 free credits, no credit card.
Who does what in this migration
The trip has three stages: PrestaShop exports your products, a spreadsheet puts them in WooCommerce's format, WooCommerce's importer creates them. ExcelifyXML only serves a part of the second stage, and only if your PrestaShop export is XML.
If your export is already a CSV (the export of the product list, for example), you don't need ExcelifyXML: open it in the spreadsheet and go to “The columns WooCommerce's importer expects”. If the source is XML (PrestaShop's webservice, a feed, an export module), ExcelifyXML turns it into a table, one row per product.
ExcelifyXML does not convert your data to WooCommerce's format: it does not rename the columns for you, does not download the images, does not replace a category id by its name. That work happens in the spreadsheet, and the XML rebuild step has no place here, since the destination is a CSV.
Where your PrestaShop products come from
- The CSV export of the product list: in the back office, Catalog › Products, “Export” button. PrestaShop's developer documentation states that the CSV holds the complete product list with the columns displayed on screen. What the list does not show, descriptions for example, is therefore not in it: enough for a simple catalog, too short for a full migration.
- PrestaShop's webservice, in XML: after creating an access key (it acts as the user name, with no password), the product list is read at /api/products. Add display=full to get every field, and limit to cut a large catalog into pages. The webservice answers in XML; output_format=JSON switches it to JSON, which ExcelifyXML does not read.
- An export module, which outputs CSV or XML depending on the module. Its content depends on the module: check what the file holds before starting from it.
- In the webservice export, a product's categories, images and combinations are identifiers (id), not names or image addresses. Keep that in mind: part of the work in the spreadsheet is finding them again.
The columns WooCommerce's importer expects
The importer is under Products › All Products, Import button. It reads a CSV and shows a column mapping screen: the headers it recognizes are matched on their own, the others are set to “Do not import” until you pick a field in the list. The headers below are those of the official import schema (“Product CSV Import Schema”):
- Type: simple, variable, variation, grouped, external.
- SKU: the product reference; the importer generates one if the cell is empty.
- Name: the product name.
- Published: 1 published, 0 private, -1 draft.
- Regular price and Sale price: the normal price and the sale price.
- Stock: a quantity, which turns on stock management; In stock?: 1 or 0.
- Categories: a comma-separated list; the > sign marks the hierarchy (Clothing > T-shirts).
- Images: addresses (URLs) separated by commas; the first one is the featured image.
- Short description and Description: the two texts.
- Parent: for a variation, the SKU of the variable product (or id: followed by its number).
- Attribute 1 name and Attribute 1 value(s): one attribute and its comma-separated values; Attribute 2 name, and so on for the next ones.
The method, step by step
- Export your products from PrestaShop, as CSV or XML (see above). If you have a CSV, go to step 3.
- Drop the XML on ExcelifyXML. The free preview shows the element chosen to make a row: for the webservice, it is product, one product per row. Confirm (1 credit), then choose “Excel file (.xlsx)”: everything in it is written as text, which protects EANs and references with leading zeros. An export larger than your plan's limit (4 MB free, 30 MB Pro) is first cut down with “Prepare your file”.
- In the spreadsheet, keep the useful columns and rename their headers like WooCommerce's (Name, SKU, Regular price…). Add the missing ones (Type, Published). Replace the category ids with names, and the image ids with addresses.
- Save as “CSV UTF-8”. Do not reopen that CSV by double-click in Excel: it would rewrite the codes with leading zeros.
- In WooCommerce, open the importer and choose the file. If your CSV is separated by semicolons, open the advanced options of the upload screen to set the separator. Check the column mapping screen, then run the import.
- Try with two or three rows first. Tick “Update existing products” to re-import a corrected file: the importer finds products by their ID or SKU instead of duplicating them.
Example: from a webservice export to WooCommerce's CSV
An invented, shortened export with two products (the first has two combinations, the second has none). Here is the XML extract, then the columns ExcelifyXML draws from it, then the CSV WooCommerce reads for the second product.
- One row per product, one column per field: names and descriptions have one column per language, and lists (categories, images, combinations) one column per value.
- The columns name.language[0] and name.language[1] are the shop's two languages; the number in name.language[0].@id is the language's number in PrestaShop, not its code.
- The mug has a single category and a single image: the second columns are empty. The numbers 5 and 50 are identifiers: “Home > Mugs” and the image address come from elsewhere.
- The mug has an EAN that starts with zero. The Excel file (.xlsx) keeps it; the CSV reopened by double-click in Excel would rewrite it without the zero.
<prestashop xmlns:xlink="http://www.w3.org/1999/xlink">
<products>
<product>
<id>12</id>
<reference>TS-100</reference>
<ean13>3760001234567</ean13>
<price>19.90</price>
<quantity>25</quantity>
<name>
<language id="1">Tee-shirt coton</language>
<language id="2">Cotton t-shirt</language>
</name>
<description>
<language id="1"><![CDATA[<p>Coupe droite.</p>]]></language>
<language id="2"><![CDATA[<p>Straight cut.</p>]]></language>
</description>
<associations>
<categories><category><id>3</id></category><category><id>7</id></category></categories>
<images><image><id>41</id></image><image><id>42</id></image></images>
<combinations><combination><id>101</id></combination><combination><id>102</id></combination></combinations>
</associations>
</product>
<product>
<id>13</id>
<reference>MUG-200</reference>
<ean13>0123456789012</ean13>
<price>8.00</price>
<quantity>0</quantity>
<name>
<language id="1">Mug blanc</language>
<language id="2">White mug</language>
</name>
<description>
<language id="1"><![CDATA[<p>300 ml.</p>]]></language>
<language id="2"><![CDATA[<p>300 ml.</p>]]></language>
</description>
<associations>
<categories><category><id>5</id></category></categories>
<images><image><id>50</id></image></images>
<combinations/>
</associations>
</product>
</products>
</prestashop>id,reference,ean13,price,quantity,name.language[0].@id,name.language[0],name.language[1].@id,name.language[1],description.language[0].@id,description.language[0],description.language[1].@id,description.language[1],associations.categories.category[0].id,associations.categories.category[1].id,associations.images.image[0].id,associations.images.image[1].id,associations.combinations.combination[0].id,associations.combinations.combination[1].id,associations.combinations
12,TS-100,3760001234567,19.90,25,1,Tee-shirt coton,2,Cotton t-shirt,1,<p>Coupe droite.</p>,2,<p>Straight cut.</p>,3,7,41,42,101,102,
13,MUG-200,0123456789012,8.00,0,1,Mug blanc,2,White mug,1,<p>300 ml.</p>,2,<p>300 ml.</p>,5,,50,,,,Type,SKU,Name,Published,Regular price,Stock,Categories,Images,Description
simple,MUG-200,Mug blanc,1,8.00,0,Home > Mugs,https://shop.example/img/mug-200.jpg,<p>300 ml.</p>Import pitfalls
- CSV separator and encoding: WooCommerce expects a UTF-8 file, and its field separator is the comma by default. A French-language Excel tends to save with semicolons: set it in the importer's advanced options. A CSV that opens as a single column, or whose accents are garbled, has a separator or encoding problem.
- EAN, GTIN and references with leading zeros: an EAN-13 such as 0123456789012 loses its zero, and a 3760001234567 turns into “3.76E+12”, as soon as Excel takes it for a number. Keep these columns as text from start to finish. WooCommerce's import schema page has no GTIN column; the plugin's documentation mentions, from WooCommerce 11.2, a “Global Unique ID” field (GTIN, UPC, EAN or ISBN) on the mapping screen. Depending on your version it may be missing: a column whose header starts with meta: is imported as a custom field, as text.
- Several images or categories: in WooCommerce these are comma-separated lists in a single cell. From numbered columns (image[0], image[1]…), the TEXTJOIN function (Excel 2019 and later, Excel 365, Google Sheets, LibreOffice) joins them: TEXTJOIN(", ",TRUE,column1:column2). If a list arrives with one line break per value in the cell, replace those breaks with a comma.
- Prices: check whether the source prices exclude tax or include it, and compare with your WooCommerce tax settings. Also watch the decimal separator: a 21,9 produced by a formula in a French-language Excel is not read as 21.9 everywhere. Check the price on your first imported rows.
- Column names: a header WooCommerce does not recognize is not imported. If a column is missing after the import, check its header on the mapping screen first.
PrestaShop combinations become variable products
A PrestaShop combination (size S, size M…) becomes a variation of a variable product in WooCommerce. WooCommerce's CSV writes them as rows: one row of type variable for the product, then one row of type variation per combination, whose Parent column holds the product's SKU.
In PrestaShop's webservice, combinations are a resource of their own (combinations). Each combination carries, among other things, id_product, reference, ean13, price and quantity, and its attribute values are identifiers. The product only lists the numbers of its combinations. So you need a second export, transformed separately (one row per combination, a second credit), then you match the two tables in the spreadsheet: id_product gives the product, and the attribute numbers are to be replaced by their names.
One point to check on a combination before importing everything: a combination's price field accepts negative values, which points to a difference from the product's price, whereas a variation's Regular price column expects the final price. Work it out (product price plus difference) in the spreadsheet.
ExcelifyXML does not do this matching: it puts each file into a table, and you build the variable and variation rows.
Type,SKU,Name,Published,Parent,Attribute 1 name,Attribute 1 value(s),Regular price,Stock
variable,TS-100,Tee-shirt coton,1,,Size,"S, M",19.90,
variation,TS-100-S,Tee-shirt coton - S,1,TS-100,Size,S,19.90,10
variation,TS-100-M,Tee-shirt coton - M,1,TS-100,Size,M,21.90,15Several languages
PrestaShop's webservice gives each text in all the shop's languages, one language tag per language marked by its number (id). ExcelifyXML turns that into one column per language. WooCommerce's file has a single Name column and a single Description column: choose the language of each import and keep the matching column.
For a multilingual WooCommerce shop, read the documentation of the translation plugin you use: it says how to give it the other languages.
For a large export, “Prepare your file” recognizes languages through the xml:lang attribute only. A PrestaShop file marks them another way (a language tag with an id attribute): the “Languages” panel does not appear, and you untick the fields one by one in “Attributes and fields”.
What ExcelifyXML does for you, and its limits
- It reads your PrestaShop XML and puts it in a table, one row per product (or per combination). The preview is free: you see the chosen row, the number of rows and columns before any charge. The transformation costs 1 credit.
- You choose the output: an Excel file (.xlsx), which keeps zeros and long codes, or a CSV. The headers keep the names of your XML's tags: renaming them like WooCommerce is up to you.
- It does not generate WooCommerce's CSV, does not resolve identifiers, does not fetch images and does not convert combinations into variable products.
- No XML coming back: for WooCommerce the destination is a CSV, which you save yourself from the spreadsheet.
Is your PrestaShop export XML? Drop it to see the free preview, no account needed:
Transform a file