Imported data file must be in text-file, using the CSV format (Coma Separated Value), and the accompanying .cvs file extension. We recommend using a semicolon ";" as a separator.
You can create such a file using any text editor (we recommend Notepad++), but we do advise you to use a spreadsheet program, such as the commercial Microsoft Excel or the free software OpenOffice.org Calc. Using a spreadsheet program enables you to have an easier and more visual grasp of your data, in comparison to the plain text file.
Here is a sample import file, for a list of products:
"Enabled";"Name";"Categories";"Price";"Tax rule ID";"Buying price";"On sale";"Reference";"Weight";"Quantity";"Short desc.";"Long desc";"Images URL"
1;"Test";"1,2,3";130;1;75;0;"PROD-TEST";"0.500";10;"'Tis a short desc.";"This is a long description.";"http://www.myprestashop/images/product1.gif"
0;"Test 02";"1,5";110;1;65;0;"PROD-TEST2";"0.500";10;"'Tis also a short desc.";"This is a long description too.";"http://www.myprestashop/images/product2.gif"
1;"Test 03";"4,5";150;1;85;0;"PROD-TEST3";"0.500";10;"'Tis a short desc. again";"This is also a long description.";"http://www.myprestashop/images/product3.gif"
The first row should be a descriptive name for the data column (you will be able to skip it during the import process). There must be the same number of columns on each row.
You will note that:
- The price column will use your store’s default currency.
- Categories are to be specified using their existing IDs (so you should have imported them first), and separated with a comma.
- The URL of the image must be specified in full. In other words, the link that may
be used in a web browser to display the image. Example: http://www.myprestashop/images/productXXX.gif
Uploading the file
Once you have all your data in CSV format, you can upload it using the form in the "Import" sub-tab of the "Tools" tab. Load your file from your computer by clicking "Browse", confirm by clicking "Upload".
The page is updated, and a form appears:
The name of your file will appear in the drop-down menu “select named "Select your .CSV file." Next, select ". Then:
- Select the type of data contained in your file
- , using the drop-down menu named "Select which entity to
- import". In our case
- , we are
- importing products. Once you have selected the type of data, a list of the available fields will appear on the right, which could help you refine your CSV file – at least for the order of the columns, which will soon prove handy.
- Select the language of the imported content. If the target language is not available, you must install it first, in Tools > Languages.
- Select the file encoding. Simply indicate if the file is iso-8859-1 or not. If not, then it is assumed the files used UTF-8.
- Select the field separators.
- We suggest that you leave the default values
- ("field separator" with a semicolon ";"
- , "multiple value separators" with a comma ","). But obviously, if your CSV file is built differently, you should change these values accordingly.
- If you want to remove all the products in your catalog before importing, select the appropriate option.
You will note that:
- The price column will use your store’s default currency
- In-stock text. The text that appears on your shop when your product is in stock
- Supplier. If the provider does not exist, it will be automatically created during import
- Ordering Text. This is the text displayed on the front office of your store when your product is out of stock.
- Image URL. The URL of the image must be specified in full. In other words, the link that may
be used in a web browser to display the image. Example: http://www.monhebergement.com/images/product/125
Import values and file format
You can import the following values (PrestaShop 1.1):
- Categories (x,y,z…)
- Tax rate
- On sale
- Reference #
- Supplier reference #
- Short description
- Tags (x,y,z…)
- Text when in-stock
- Text if back-order allowed
- Image URLs (x,y,z…)
- Once all your choices have been made, click "Next step".
Note that all import files are uploaded directly in the admin folder's "import" sub-folder. If the CSV File drop-down menu gets too crowded, you can delete imports directly using your FTP client.
The second steps will be worked out on this screen:
Presented in this table are the rows from your CSV file, placed under arbitrary columns mateched to PrestaShop's database needs. It is up to you to make sure that all the columns from your CSV file are matched with the correct column header, using each header's drop-down menu, so as to import your content correctly.
For instance, in the above screen capture:
- First column. We marked it as "Enabled", PrestaShop presents "ID" as a header. Click on the header's drop-down menu, and select "Active (0/1)".
- Second column. Marked "Name", header indicates "Active (0/1)". Let's change the header for "Name *".
- Third column. You get the idea...
The screen cannot contain all of your data's columns, so click the ">>" and "<<" buttons to move around the columns, and match them all correctly.
In our example, we used the first row for columns indicators. Since we don't we these imported, enter "1" in the "Skip X lines" text-field.
Once you are done match your columns, click the "Import CSV data" button, and you're done!
The matching process can be a tedious task if you cannot customize your CSV file's columns order, and even more so if you have to do that repeatedly or frequently. That is why PrestaShop includes a small tool to save the current matching order that you have set up using all the headers drop-down menus:
- Saving. Enter a descriptive name in the field, and click "Save".
- Loading. Select a matching configuration in the drop-down menu, and click "Load".
- Deleting. Select a matching configuration in the drop-down menu, and click "Delete".
Authentication on PrestaShop is partly based on HTTP cookies, which are very small file stored by your browser to remember crucial part of your login credentials, or of your navigating state. By design, cookies are limited to one domain (or sub-domain): a cookie created on www.myprestashop.com will not work for www.myprestashop2.com or www2.myprestashop.com.