1. General information
- CSV file has to be UTF-8 (without BOM) encoded.
- Only CSV files with ',' (comma) or ';' (semicolon) separators and single or double-quoted (' or ") text limiters/enclosures are supported.
- CSV file must contain column headers, e. g. 'name', 'description'.
- Order of columns within CSV file is not important.
- All ID columns (e.g. product ID, category ID, group ID, etc.) should contain valid IDs (pointing to values that already exist in the database). Be carefull, as those values are not being validated.
- If you want to import images and/or attachments they has to be uploaded before, via FTP, repectively to:
/media/djcatalog2/import/images/
/media/djcatalog2/import/files/
- Depending on which type of data (product, category, producer) you want to import, you can choose default values for some columns (if they are not provided in CSV file). For example, if you do not provide
cat_id
value (or column, at all) for a product, then chosen 'Default Category' will be used instead. - Some server settings may not allow you to import large amount of data and the import process may be stopped in the middle. If you exceed 'maximum execution time' or 'memory limit', try importing data in smaller portions - for example 50-100 products at a time.
- Please make a back-up of your website, before importing, especially if you use import function to update existing records in your database.
2. Product import
List of valid column names and their description:
Column name | Required | Notice | |
---|---|---|---|
id | No | If provided, has to point to existing product. Product will be updated then with the provided data for CSV file. If ID is empty (or 0), a new product will be created. | |
name | Yes | Should be unique within product's category, because based on product's name, an alias is being generated. Therefore there cannot be two products with the same alias. | |
alias | No | --- | |
group_id | No | ID of product's field group. | |
parent_id | No | ID of product's parent (default: 0). 0 - means that product does not have parent | |
cat_id | No | ID of product's category. | |
producer_id | No | ID of product's producer. | |
sku | No | SKU of a product | |
description | No | Full description. Can contain HTML code. | |
intro_desc | No | Short description. Can contain HTML code. | |
price | No | Regular price. Should be a valid floating point number or an integer. Dot should be used as decimal point, e.g. 1099.95 | |
special_price | No | Discount price. Should be a valid floating point number or an integer. Dot should be used as decimal point, e.g. 1099.95 | |
tax_rule_id | No | ID of VAT rule assigned to a product (default: 0) | |
stock | No | Decimal number (e.g 12.1234) representing current stock level | |
on_stock | No | Integer [0,1,2], where 0 = no, 1 = yes, 2 = always | |
available | No | Integer [0,1] - whether product can be added to cart | |
unit_id | No | ID of measurement unit | |
address | No | Name of the street or other address details (Location related field) | |
city | No | City name (Location related field) | |
postcode | No | Postcode / ZIP (Location related field) | |
country | No | ID of the country | |
state | No | ID of the state | |
| No | Phone number (Location related field) | |
| No | Mobile phone number (Location related field) | |
| No | Fax number (Location related field) | |
| No | URL of the website (Location related field) | |
| No | Contact e-mail address, needs to be empty or valid e-mail address (Location related field) | |
latitude | No | Geographical latitude coordinate, decimal degrees (Location related field) | |
longitude | No | Geographical longitude coordinate, decimal degrees (Location related field) | |
metatitle | No | meta-title. | |
metakey | No | meta-keywords. | |
metadesc | No | meta-description. | |
published | No | State [0/1]. 0 = un-published, 1 = published. | |
featured | No | Featured product flag [0/1]. 0 = not featured, 1 = featured. | |
ordering | No | Integer number indicating product's order within its category. | |
created | No | Creation date in Date-Time format: [RRRR-MM-DD HH:MM:SS] or [RRRR-MM-DD]. | |
created_by | No | ID of the Joomla! user who should be the owner of the product. | |
images | No | Comma-separated list of file names that should be located in /media/djcatalog2/import/images/ directory. For example: image1.jpg,image2.jpg,image3.jpg | |
files | No | Comma-separated list of file names that should be located in /media/djcatalog2/import/files/ directory. For example: chart1.pdf,manual.pdf |
Please note that the list of valid columns depends on component version. Usually when there is a new attribute added into the component then by default it will also be accepted during import. You can examine the structure of #__djc2_items table in order to find out which columns are supported by the table.
Example 1
name | description | intro_desc | price | special_price | featured | images | files |
---|---|---|---|---|---|---|---|
Crystal vase | Very beautiful crystal vase from XVI century. | Nice crystal vase. | 1200.00 | 99.95 | 1 | vase1.jpg, vase2.jpg | |
TV set | 40", Full HD LCD television set | Real must-have | 2999.00 | 2699.95 | 0 | tv40.jpg | manual.pdf, chart.xls |
Example 2
id | cat_id | producer_id | name | price |
---|---|---|---|---|
24 | 2 | 4 | Updated product | 599.00 |
25 | 2 | 5 | Updated product #2 | 499 |
2 | 6 | New product #1 | 1999 | |
2 | 6 | New product #2 | 300.00 |
3. Category import
List of valid column names and their description:
Column name | Required | Notice |
---|---|---|
id | No | If provided, has to point to existing category. Category will be updated then with the provided data for CSV file. If ID is empty (or 0), a new category will be created. |
name | Yes | Should be unique within category's parent category, because based on category name, an alias is being generated. Therefore there cannot be two sibling categories with the same alias. |
alias | No | --- |
description | No | Full description. Can contain HTML code. |
metatitle | No | meta-title. |
metakey | No | meta-keywords. |
metadesc | No | meta-description. |
published | No | State [0/1]. 0 = un-published, 1 = published. |
ordering | No | Integer number indicating category's order within its parent category. |
created | No | Creation date in Date-Time format: [RRRR-MM-DD HH:MM:SS] or [RRRR-MM-DD]. |
created_by | No | ID of the Joomla! user who should be the owner of the category. |
images | No | Comma-separated list of file names that should be located in /media/djcatalog2/import/images/ directory. For example: image1.jpg,image2.jpg,image3.jpg |
Example 3
id | parent_id | name | description | images |
---|---|---|---|---|
1 | Cars | All available cars. | cars.jpg | |
1 | Motorbikes | Full range of our motorcycles. | bikes.jpg | |
1 | Trucks | The biggest 18-wheelers. | truck.png |
4. Producer import
List of valid column names and their description:
Column name | Required | Notice |
---|---|---|
id | No | If provided, has to point to existing producer. Producer will be updated then with the provided data for CSV file. If ID is empty (or 0), a new producer will be created. |
name | Yes | Should be unique, because based on producer's name, an alias is being generated. Therefore there cannot be two producers with the same alias. |
alias | No | --- |
description | No | Full description. Can contain HTML code. |
metatitle | No | meta-title. |
metakey | No | meta-keywords. |
metadesc | No | meta-description. |
published | No | State [0/1]. 0 = un-published, 1 = published. |
ordering | No | Integer number indicating producer's order. |
created | No | Creation date in Date-Time format: [RRRR-MM-DD HH:MM:SS] or [RRRR-MM-DD]. |
created_by | No | ID of the Joomla! user who should be the owner of the category. |
images | No | Comma-separated list of file names that should be located in /media/djcatalog2/import/images/ directory. For example: image1.jpg,image2.jpg,image3.jpg |
Example 4
id | name | description | images |
---|---|---|---|
1 | Car manufacturer 1 | Lorem ipsum dolor sit amet... | cf1.jpg,cf2.jpg |
2 | Car manufacturer 2 | Lorem ipsum dolor sit amet... | cf3.jpg,cf4.jpg |
Car manufacturer 3 | Lorem ipsum dolor sit amet... | cf5.jpg | |
Car manufacturer 4 | Lorem ipsum dolor sit amet... | ||
Car manufacturer 5 | Lorem ipsum dolor sit amet... | cf6.png,cf7.jpg |
Check the video with this tutorial: