Thursday, 14 May 2015 04:57
Modified: Monday, 11 May 2020 18:15

import categories and subcategories to djcf

Following the article about importing locations to DJ-Classifieds here's tutorial on how to import categories and subcategories the same way!

Creating one easy .csv allows you to import all your categories and subcategories to DJ-Classifieds.

To do it you’ll need to be able to access your database via phpMyAdmin.

Firstly prepare the .csv file with all the categories and subcategories you want to add (You’ll find the exemplary .csv file at the end of the article).

To prepare the file, you first need to have the list of your categories and subcategories in any format and then create the .csv file that reflects the database structure of categories in DJ-Classifieds.

The database structure of the categories in DJ-Classifieds looks like in the table below, and the exemplary file you find here: Sample DJ-Classifieds categories

db columnwhat is it?data format
idcategory IDnumber
namecategory nametext
aliascategory URL aliastext
parent_idparent category idnumber
priceprice for the advert submitted to the categorynumber
price_specialunusedleave it blank
descriptiondescription of the categorytext (HTML)
icon_urlunused (category image is in #__djcf_images table)leave it blank
orderingcategory orderingnumber
publishedpublished or not0 - unpublished, 1 - published
auto publishset if the ad should be automatically published0 - global setting, 1- yes, 2 - no
metakeymeta keywordstext
metadescmeta descriptiontext
accessaccess to submission of adverts restricted for specific Joomla groups0 - no restriction 1 - restricted (restrictions can be set in "#__djcf_categories_groups" [id, cat_id, group_id])
pointsprice in pointsnumber
ads_disabledsetting if adverts can be submitted or not to this categorytype 0 to allow submission, set 1 to restrict submission to this category
themetheme for categorytext (theme's name)
access_viewViewing Access Level restriction for viewing this categorynumber (ID of the Viewing Access Level)
access_item_viewViewing Access Level restriction for viewing adverts from this categorynumber (ID of the Viewing Access Level)
restriction_18adults restriction0 not restricted, 1 restricted
rev_group_idDJ-Reviews group id used in this categorynumber
schema_typesetting for AMP - if using AMP type "product"text
meta robotsmeta robotstext
meta titlemeta titletext


Download sample .csv file: Sample DJ-Classifieds categories (23.41 kB 2019-03-18 13:41:16)

NOTE: If your DJ-Classifieds version is 3.4 or lower - make sure the order of columns is the same as in our example file. If it's not - you can easily adjust it with "Move columns" in phpMyAdmin. 

Once you’re ready with your .csv file you can move to import it to the database.

First open your Cpanel account, open phpMyAdmin


When in phpMyAdmin:

  1. open your database
  2. and find dj-classifieds categories table and open it (the name of the table will be [yourdbprefix]_djcf_categories)


Next (when in categories table) click „Import” in the top bar
Import categories phpmyadmin


Now you’re ready to import the .csv file

Import categories to DJ-Classifieds

  1. browse for the .csv file here
  2. make sure to skip the first row (insert „1”)
  3. insert „;” (semicolon) in Columns separated with:
  4. click „Go”

Imported categories/subcategories are now visible in your DJ-Classifieds installation

There's a slight difference in columns order. Below you can find a video tutorial on how to reorganize columns in phpMyAdmin if needed.



Ultimate classified ads solution for Joomla.

Learn more