Login

New to DJ-Extensions?

Import guidelines

General information

  1. CSV file has to be UTF-8 (without BOM) encoded.
  2. Only CSV files with ',' (comma) or ';' (semicolon)  separators  and single or double-quoted (' or ")  text limiters/enclosures  are supported.
  3. CSV file must contain column  headers , e. g. 'name', 'description'.
  4. Order of columns within CSV file is not important.
  5. 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.
  6. If you want to import  images  and/or  attachments  they has to be uploaded before, via FTP, respectively to:
/media/djcatalog2/import/images/
/media/djcatalog2/import/files/
  1. 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.
  2. 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.
  3. Please make a back-up of your website, before importing, especially if you use import function to update existing records in your database.

Product import

List of valid column names and their description:

COLUMN NAME REQUIRED NOTICE
id NO If provided, it has to point to the existing product. The product will be updated then with the provided data for the CSV file. If ID is empty (or 0), a new product will be created.
name YES It should be unique within the product's category because, based on its name, an alias is being generated. Therefore there cannot be two products with the same alias.
alias NO ---
group_id NO The ID of the product's field group.
parent_id NO The ID of the product's parent (default: 0). 0 - means that the product does not have a parent.
cat_id NO The ID of the product's category.
producer_id NO The ID of the 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. It should be a valid floating-point number or an integer. Dot should be used as a decimal point, e.g., 1099.95
special_price NO Discount price. It should be a valid floating-point number or an integer. Dot should be used as a decimal point, e.g., 1099.95
tax_rule_id NO The 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).
cit NO City name (Location-related field).
postcode NO Postcode / ZIP (Location related field.
country NO The ID of the country.
state NO The ID of the state.
phone NO Phone number (Location-related field).
mobile NO Mobile phone number (Location-related field).
fax NO Fax number (Location-related field).
website NO URL of the website (Location-related field).
email NO The contact e-mail address needs to be empty or valid (Location-related field).
latitude NO Geographical latitude coordinate, decimal degrees (Location related field).
longitude NO Geographical longitude coordinate, decimal degrees (Location related field).
metatitl 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 The ID of the JoomlThethe 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 the 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 the #__djc2_items table to find out which columns are supported by the table.

Example 1

NAME DESCRIPTION INTRO_DESC PRICE SPECIAL_PRICE FEATURED IMAGES FILES
Crystal vase Stunning crystal vase from the 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

Notice that some records don't have any values in the 'id' column - there will be new products in the database.
Also, 'cat_id' and 'producer_id' are IDs of already existing categories and producers.
ID CAT_ID PRODUCER_ID NAME PRICE
24 2 4 Updated product #1 599.00
25 2 5 Updated product #2 499
2 6 New product #1 1999
2 6 New product #2 300.00

Category import

List of valid column names and their description:
COLUMN NAME REQUIRED NOTICE
id NO If provided, it has to point to the existing category. The category will be updated then with the provided data for the CSV file. If ID is empty (or 0), a new category will be created.
name YES It should be unique within the category's parent category because an alias is being generated based on the category name. Therefore there cannot be two sibling categories with the same alias.
alias NO ---
description NO Full description. Can contain HTML code.
meta title NO meta-title.
meta key 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 The ID of the JoomlThethe user who should be the owner of the category.
images NO A comma-separated list of filenames should be located in the/media/djcatalog2/import/images directory. For example, image1.jpg, image2.jpg, image3.jpg

Example 3

Notice that all ID columns are empty. This script will only add new categories, assuming that there already exists a category with ID=1.
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

Producer import

List of valid column names and their description:
COLUMN NAME REQUIRED NOTICE
id NO If provided, it has to point to an existing producer. The producer will be updated then with the provided data for the CSV file. If ID is empty (or 0), a new producer will be created.
name YES It should be unique because, based on the 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.
meta title NO meta-title.
meta key 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 The ID of the Joomla! a user who should be the owner of the producer.
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

The following example will add 3 new producers and update 2 existing ones (IDs 1 & 2).
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

© 2023 DJ-Extensions.com. All rights reserved.