Import categories from a file
Updated on Wednesday, August 23, 2023
PrestaShop allows you to import a large number of categories from a file to build up your catalog. Follow the guide!
To access: Advanced settings > Import
The process of importing categories (2) is very similar to that of importing files. To import your categories, simply download the template file (4) available on the Advanced Settings page > Import (1).
How do you prepare your category file?
Open the downloaded template file to start filling it in. Each column corresponds to a back-office field. The number of fields to be filled in depends on the nature of the items you wish to import (3).
- ID: the unique identifier of your products. You can find it in your product sheet.
- Active: 0 lets you add this category to your store but keep it deactivated, 1 lets you add it and activate it.
- Name: the name of the category.
- Parent category: your category's main category.
- Root category: the category that can be used as the starting point for a category tree. This type of category is particularly used in multi-boutiques.
- Description: the description of your category.
- Title tag: the clickable link that will appear in search engines.
- Meta keywords: keywords used to find your store on search engines.
- Meta-description: the two lines of text that appear below your link in search engines.
- Rewritten URL: if you don't use multi-shop, leave this field blank to use the default store.
- Image URL: theURL associated with your image.
- ID or store name: if you don't use multi-shop, leave this field blank to use the default store.
Once your file is complete, don't forget to save it, then select it (6).
How do you set up your file?
Once you have selected your file, specify its settings so that it can be read by PrestaShop. In this way, the elements entered will be correctly rendered in your back-office once the file import has been finalized.
- File language: select the language of imported categories (one file per language).
- Field separator: leave the default value ";" . You can change the separator in the case of a .csv file that does not contain the value ";".
- Multi-value field separator: leave the default value ",". You can change the separator in the case of a differently designed .csv file.
Then select the import parameters:
- Delete all categories: click on "yes" to delete all existing sample categories from your back-office.
- Ignore thumbnail regeneration: leave the default value "No", especially if your catalog is large.
- Force IDs: select "yes" if you have not filled in the "ID" column in the file, PrestaShop will create the IDs automatically. Leave on "No" if you have already defined a category ID.
- Send e-mail notification: receive an e-mail to confirm that the import is complete. This option can be useful if the file to be imported is large, as the more elements there are to import, the longer it will take.
Click on the "Next step" button to display the data correspondence. Use this tool to match the columns in your file with the fields you need at PrestaShop .
|💡 Click on the ">" and "<" buttons to move through the columns, matching them all to the correct headings.|
In our example, we've used the first line to write the column names. Since we don't want to import this line, we enter "1" in the "Skip X lines" field.
When all your columns have found a match, click on the "Import data" button to start the import process. Once you've finished, you'll return to the main screen, which, depending on the result, will either confirm that everything has been imported, or notify you of any problems encountered. In the second case, relisez carefully check your .csv files, as you may have misplaced an item.