Following the article about importing locations to DJ-Classifieds, here's a tutorial on importing categories and subcategories the same way.
Firstly prepare the .csv file with all the categories and subcategories you want to add (You’ll find the exemplary .csv file below the table of database structure).
The database structure of the categories in DJ-Classifieds looks like in the table below:
DB column |
what is it? |
data format |
id |
category ID |
number |
name |
category name |
text |
alias |
category URL alias |
text |
parent_id |
parent category id |
number |
price |
price for the advert submitted to the category |
number |
price_special |
unused |
please leave it blank |
description |
description of the category |
text (HTML) |
icon_url |
unused (category image is in #__djcf_images table) |
please leave it blank |
ordering |
category ordering |
number |
published |
published or not |
0 - unpublished, 1 - published |
auto publish |
set if the ad should be automatically published |
0 - global setting, 1- yes, 2 - no |
metakey |
meta keywords |
text |
metadesc |
meta description |
text |
access |
access to submission of adverts restricted for specific Joomla groups |
0 - no restriction 1 - restricted (restrictions can be set in "#__djcf_categories_groups" [id, cat_id, group_id]) |
points |
price in points |
number |
ads_disabled |
setting if adverts can be submitted or not to this category |
type 0 to allow submission, set 1 to restrict submission to this category |
theme |
theme for category |
text (theme's name) |
access_view |
Viewing Access Level restriction for viewing this category |
number (ID of the Viewing Access Level) |
access_item_view |
Viewing Access Level restriction for viewing adverts from this category |
number (ID of the Viewing Access Level) |
restriction_18 |
adults restriction |
0 not restricted, 1 restricted |
rev_group_id |
DJ-Reviews group id used in this category |
number |
schema_type |
the setting for AMP - if using AMP type "product." |
text |
meta robots |
meta robots |
text |
meta title |
meta title |
text |
There's a slight difference in columns order. Below you can find a video tutorial on how to reorganize columns in phpMyAdmin if needed.